diff options
| author | Ralf Jung <post@ralfj.de> | 2022-10-14 09:45:40 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-10-14 09:45:40 +0200 |
| commit | a1bc9ad6ed3ad4adfa23927e780fc3998eea3b2e (patch) | |
| tree | b1269a07a83c008302697b69627676bb3ababa48 | |
| parent | d8761c02bf02456dc97fc6ac100bff18ce924108 (diff) | |
| download | rust-a1bc9ad6ed3ad4adfa23927e780fc3998eea3b2e.tar.gz rust-a1bc9ad6ed3ad4adfa23927e780fc3998eea3b2e.zip | |
CI improvements
- cache RTIM for the style checks - disable fail-fast for main checks so that we can see whether the other jobs are green
| -rw-r--r-- | src/tools/miri/.github/workflows/ci.yml | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/src/tools/miri/.github/workflows/ci.yml b/src/tools/miri/.github/workflows/ci.yml index 923f8391366..e6c6e8bf950 100644 --- a/src/tools/miri/.github/workflows/ci.yml +++ b/src/tools/miri/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: RUST_BACKTRACE: 1 HOST_TARGET: ${{ matrix.host_target }} strategy: + fail-fast: false matrix: build: [linux64, macos, win32] include: @@ -89,11 +90,46 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install required toolchain - # We need a toolchain that can actually build Miri, just a nightly won't do. + + # This is exactly duplicated from above. GHA is pretty terrible when it comes + # to avoiding code duplication. + + # Cache the global cargo directory, but NOT the local `target` directory which + # we cannot reuse anyway when the nightly changes (and it grows quite large + # over time). + - name: Add cache for cargo + id: cache + uses: actions/cache@v3 + with: + path: | + # Taken from <https://doc.rust-lang.org/nightly/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci>. + ~/.cargo/bin + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git/db + # contains package information of crates installed via `cargo install`. + ~/.cargo/.crates.toml + ~/.cargo/.crates2.json + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo + + - name: Install rustup-toolchain-install-master + if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} + shell: bash + run: | + cargo install -f rustup-toolchain-install-master + + - name: Install "master" toolchain + shell: bash run: | - cargo install rustup-toolchain-install-master # TODO: cache this? ./rustup-toolchain "" -c clippy + + - name: Show Rust version + run: | + rustup show + rustc -Vv + cargo -V + - name: rustfmt run: ./miri fmt --check - name: clippy |
