ci.yml (ripgrep-12.1.1) | : | ci.yml (ripgrep-13.0.0) | ||
---|---|---|---|---|
skipping to change at line 46 | skipping to change at line 46 | |||
- nightly-musl | - nightly-musl | |||
- nightly-32 | - nightly-32 | |||
- nightly-mips | - nightly-mips | |||
- nightly-arm | - nightly-arm | |||
- macos | - macos | |||
- win-msvc | - win-msvc | |||
- win-gnu | - win-gnu | |||
include: | include: | |||
- build: pinned | - build: pinned | |||
os: ubuntu-18.04 | os: ubuntu-18.04 | |||
rust: 1.41.0 | rust: 1.52.1 | |||
- build: stable | - build: stable | |||
os: ubuntu-18.04 | os: ubuntu-18.04 | |||
rust: stable | rust: stable | |||
- build: beta | - build: beta | |||
os: ubuntu-18.04 | os: ubuntu-18.04 | |||
rust: beta | rust: beta | |||
- build: nightly | - build: nightly | |||
os: ubuntu-18.04 | os: ubuntu-18.04 | |||
rust: nightly | rust: nightly | |||
- build: nightly-musl | - build: nightly-musl | |||
skipping to change at line 110 | skipping to change at line 110 | |||
- name: Install Rust | - name: Install Rust | |||
uses: actions-rs/toolchain@v1 | uses: actions-rs/toolchain@v1 | |||
with: | with: | |||
toolchain: ${{ matrix.rust }} | toolchain: ${{ matrix.rust }} | |||
profile: minimal | profile: minimal | |||
override: true | override: true | |||
- name: Use Cross | - name: Use Cross | |||
if: matrix.target != '' | if: matrix.target != '' | |||
run: | | run: | | |||
# FIXME: to work around bugs in latest cross release, install master. | cargo install cross | |||
# See: https://github.com/rust-embedded/cross/issues/357 | echo "CARGO=cross" >> $GITHUB_ENV | |||
cargo install --git https://github.com/rust-embedded/cross | echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV | |||
echo "::set-env name=CARGO::cross" | echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV | |||
echo "::set-env name=TARGET_FLAGS::--target ${{ matrix.target }}" | ||||
echo "::set-env name=TARGET_DIR::./target/${{ matrix.target }}" | ||||
- name: Show command used for Cargo | - name: Show command used for Cargo | |||
run: | | run: | | |||
echo "cargo command is: ${{ env.CARGO }}" | echo "cargo command is: ${{ env.CARGO }}" | |||
echo "target flag is: ${{ env.TARGET_FLAGS }}" | echo "target flag is: ${{ env.TARGET_FLAGS }}" | |||
- name: Build ripgrep and all crates | - name: Build ripgrep and all crates | |||
run: ${{ env.CARGO }} build --verbose --all ${{ env.TARGET_FLAGS }} | run: ${{ env.CARGO }} build --verbose --workspace ${{ env.TARGET_FLAGS }} | |||
- name: Build ripgrep with PCRE2 | - name: Build ripgrep with PCRE2 | |||
run: ${{ env.CARGO }} build --verbose --all --features pcre2 ${{ env.TARGE T_FLAGS }} | run: ${{ env.CARGO }} build --verbose --workspace --features pcre2 ${{ env .TARGET_FLAGS }} | |||
# This is useful for debugging problems when the expected build artifacts | # This is useful for debugging problems when the expected build artifacts | |||
# (like shell completions and man pages) aren't generated. | # (like shell completions and man pages) aren't generated. | |||
- name: Show build.rs stderr | - name: Show build.rs stderr | |||
shell: bash | shell: bash | |||
run: | | run: | | |||
set +x | set +x | |||
stderr="$(find "${{ env.TARGET_DIR }}/debug" -name stderr -print0 | xarg s -0 ls -t | head -n1)" | stderr="$(find "${{ env.TARGET_DIR }}/debug" -name stderr -print0 | xarg s -0 ls -t | head -n1)" | |||
if [ -s "$stderr" ]; then | if [ -s "$stderr" ]; then | |||
echo "===== $stderr ===== " | echo "===== $stderr ===== " | |||
cat "$stderr" | cat "$stderr" | |||
echo "=====" | echo "=====" | |||
fi | fi | |||
set -x | set -x | |||
- name: Run tests with PCRE2 (sans cross) | - name: Run tests with PCRE2 (sans cross) | |||
if: matrix.target == '' | if: matrix.target == '' | |||
run: ${{ env.CARGO }} test --verbose --all --features pcre2 ${{ env.TARGET _FLAGS }} | run: ${{ env.CARGO }} test --verbose --workspace --features pcre2 ${{ env. TARGET_FLAGS }} | |||
- name: Run tests without PCRE2 (with cross) | - name: Run tests without PCRE2 (with cross) | |||
# These tests should actually work, but they almost double the runtime. | # These tests should actually work, but they almost double the runtime. | |||
# Every integration test spins up qemu to run 'rg', and when PCRE2 is | # Every integration test spins up qemu to run 'rg', and when PCRE2 is | |||
# enabled, every integration test is run twice: one with the default | # enabled, every integration test is run twice: one with the default | |||
# regex engine and once with PCRE2. | # regex engine and once with PCRE2. | |||
if: matrix.target != '' | if: matrix.target != '' | |||
run: ${{ env.CARGO }} test --verbose --all ${{ env.TARGET_FLAGS }} | run: ${{ env.CARGO }} test --verbose --workspace ${{ env.TARGET_FLAGS }} | |||
- name: Test for existence of build artifacts (Windows) | - name: Test for existence of build artifacts (Windows) | |||
if: matrix.os == 'windows-2019' | if: matrix.os == 'windows-2019' | |||
shell: bash | shell: bash | |||
run: | | run: | | |||
outdir="$(ci/cargo-out-dir "${{ env.TARGET_DIR }}")" | outdir="$(ci/cargo-out-dir "${{ env.TARGET_DIR }}")" | |||
ls "$outdir/_rg.ps1" && file "$outdir/_rg.ps1" | ls "$outdir/_rg.ps1" && file "$outdir/_rg.ps1" | |||
- name: Test for existence of build artifacts (Unix) | - name: Test for existence of build artifacts (Unix) | |||
if: matrix.os != 'windows-2019' | if: matrix.os != 'windows-2019' | |||
skipping to change at line 199 | skipping to change at line 197 | |||
- name: Install Rust | - name: Install Rust | |||
uses: actions-rs/toolchain@v1 | uses: actions-rs/toolchain@v1 | |||
with: | with: | |||
toolchain: stable | toolchain: stable | |||
override: true | override: true | |||
profile: minimal | profile: minimal | |||
components: rustfmt | components: rustfmt | |||
- name: Check formatting | - name: Check formatting | |||
run: | | run: | | |||
cargo fmt --all -- --check | cargo fmt --all -- --check | |||
docs: | ||||
name: Docs | ||||
runs-on: ubuntu-20.04 | ||||
steps: | ||||
- name: Checkout repository | ||||
uses: actions/checkout@v2 | ||||
- name: Install Rust | ||||
uses: actions-rs/toolchain@v1 | ||||
with: | ||||
toolchain: stable | ||||
profile: minimal | ||||
override: true | ||||
- name: Check documentation | ||||
env: | ||||
RUSTDOCFLAGS: -D warnings | ||||
run: cargo doc --no-deps --document-private-items --workspace | ||||
End of changes. 7 change blocks. | ||||
11 lines changed or deleted | 9 lines changed or added |