Extract tools dir #225
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous integration | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-all-targets: | |
| name: Check all targets | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: cargo check --all-targets | |
| - run: cargo check --all-targets --no-default-features | |
| - run: cargo check --all-targets --all-features | |
| test: | |
| name: Tests | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: cargo test | |
| - run: cargo test --no-default-features | |
| # no run because of shuttle feature and non-shuttle tests | |
| - run: cargo test --all-features --no-run | |
| shuttle-tests: | |
| name: Shuttle Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: cargo test --profile shuttle --features shuttle shuttle | |
| docs: | |
| name: Build Docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| # toolchain: nightly # Temporarily disabled due to doc_auto_cfg removal in nightly | |
| - run: cargo doc --features stats --package quick_cache | |
| # env: # Temporarily disabled due to doc_auto_cfg removal in nightly | |
| # RUSTDOCFLAGS: --cfg docsrs | |
| fuzz-tests: | |
| name: Fuzz tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: nightly | |
| override: true | |
| - run: cargo install cargo-fuzz | |
| - run: for fuzz_test in `cargo fuzz list`; do cargo fuzz run $fuzz_test -- -max_total_time=30 -timeout=5 || exit 1; done | |
| lint: | |
| name: Rustfmt & Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: rustup component add rustfmt | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| - run: rustup component add clippy | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: -- -D warnings | |
| - name: Install dependencies for tools | |
| run: sudo apt-get -y install libfontconfig1-dev jq | |
| - name: Check tools | |
| working-directory: tools | |
| run: cargo clippy -- -D warnings | |
| miri: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: nightly | |
| override: true | |
| components: miri | |
| - name: Run Miri | |
| run: cargo miri test |