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
This commit is contained in:
Clement Tsang 2024-01-15 06:01:04 -05:00 committed by GitHub
parent f760ce1080
commit 7be98344e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 24 deletions

View file

@ -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

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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

View file

@ -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"