From 7be98344e9dc55912bf8b4f6321640999cf850eb Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Mon, 15 Jan 2024 06:01:04 -0500 Subject: ci: clean up some jobs in CI; bump Rust-related actions (#1388) * ci: clean up some jobs in CI; bump Rust-related actions * also update codecov * rearrange * comments --- .github/workflows/audit.yml | 4 ++-- .github/workflows/build_releases.yml | 8 ++++---- .github/workflows/ci.yml | 22 ++++++++-------------- .github/workflows/coverage.yml | 7 ++++--- Cargo.toml | 2 +- 5 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 61542b3a..44b8d596 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -14,12 +14,12 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up Rust toolchain - uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 with: toolchain: stable - name: Enable Rust cache - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # 2.7.0 + uses: Swatinem/rust-cache@378c8285a4eaf12899d11bea686a763e906956af # 2.7.3 with: cache-targets: false cache-all-crates: true diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index ddd2c7ce..5e7eb006 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -136,7 +136,7 @@ jobs: - name: Set up Rust toolchain if: matrix.info.container == '' - uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 with: toolchain: ${{ matrix.info.rust || 'stable' }} target: ${{ matrix.info.target }} @@ -236,7 +236,7 @@ jobs: args: install -y wixtoolset - name: Set up Rust toolchain - uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 with: toolchain: stable target: x86_64-pc-windows-msvc @@ -335,7 +335,7 @@ jobs: fetch-depth: 1 - name: Set up Rust toolchain - uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 with: toolchain: ${{ matrix.info.rust || 'stable' }} target: ${{ matrix.info.target }} @@ -433,7 +433,7 @@ jobs: fetch-depth: 1 - name: Set up Rust toolchain - uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 with: toolchain: ${{ matrix.info.rust || 'stable' }} target: ${{ matrix.info.target }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dfce3d3..a5b01c1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,14 +89,14 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up Rust toolchain - uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 with: toolchain: stable components: rustfmt, clippy target: ${{ matrix.info.target }} - name: Enable Rust cache - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # 2.7.0 + uses: Swatinem/rust-cache@378c8285a4eaf12899d11bea686a763e906956af # 2.7.3 if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork with: key: ${{ matrix.info.target }} @@ -136,7 +136,8 @@ jobs: RUST_BACKTRACE: full # Try running cargo build on all other platforms. - # TODO: Maybe some of these should be allowed to fail. + # TODO: Maybe some of these should be allowed to fail? If so, I guess we can add back the "unofficial" MSRV, + # I would also put android there. other-check: needs: pre-job runs-on: ${{ matrix.info.os }} @@ -146,7 +147,7 @@ jobs: fail-fast: false matrix: info: - # x86 or x64 + # x86 or x86-64 - { os: "ubuntu-latest", target: "i686-unknown-linux-gnu", @@ -165,6 +166,7 @@ jobs: cross: true, rust: stable, } + - { os: "windows-2019", target: "i686-pc-windows-msvc", @@ -178,14 +180,6 @@ jobs: rust: stable, } - # The unofficial MSRV. - - { - os: "ubuntu-latest", - target: "x86_64-unknown-linux-gnu", - cross: false, - rust: "1.70.0", - } - # Beta - { os: "ubuntu-latest", @@ -253,13 +247,13 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up Rust toolchain - uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 with: toolchain: ${{ matrix.info.rust }} target: ${{ matrix.info.target }} - name: Enable Rust cache - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # 2.7.0 + uses: Swatinem/rust-cache@378c8285a4eaf12899d11bea686a763e906956af # 2.7.3 if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork with: key: ${{ matrix.info.target }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e374896a..7a13d6fa 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -50,12 +50,12 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up Rust toolchain - uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 with: toolchain: stable - name: Enable Rust cache - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # 2.7.0 + uses: Swatinem/rust-cache@378c8285a4eaf12899d11bea686a763e906956af # 2.7.3 if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork with: key: ${{ matrix.info.target }} @@ -70,8 +70,9 @@ jobs: run: | cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info --locked --target=${{ matrix.info.target }} + # TODO: Might be good to allow this to retry. - name: Upload to codecov.io - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # 3.1.1 + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # 3.1.4 with: files: lcov.info fail_ci_if_error: true diff --git a/Cargo.toml b/Cargo.toml index c8780c1f..48e71506 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ exclude = [ "Cross.toml", "rustfmt.toml", ] -rust-version = "1.70.0" +rust-version = "1.70.0" # The oldest version I've tested that should still build bottom - note this is not an MSRV! [[bin]] name = "btm" -- cgit v1.2.3