mirror of
https://github.com/ClementTsang/bottom.git
synced 2024-09-11 03:35:35 +03:00
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:
parent
f760ce1080
commit
7be98344e9
4
.github/workflows/audit.yml
vendored
4
.github/workflows/audit.yml
vendored
@ -14,12 +14,12 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Enable Rust cache
|
- name: Enable Rust cache
|
||||||
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # 2.7.0
|
uses: Swatinem/rust-cache@378c8285a4eaf12899d11bea686a763e906956af # 2.7.3
|
||||||
with:
|
with:
|
||||||
cache-targets: false
|
cache-targets: false
|
||||||
cache-all-crates: true
|
cache-all-crates: true
|
||||||
|
8
.github/workflows/build_releases.yml
vendored
8
.github/workflows/build_releases.yml
vendored
@ -136,7 +136,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
if: matrix.info.container == ''
|
if: matrix.info.container == ''
|
||||||
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.info.rust || 'stable' }}
|
toolchain: ${{ matrix.info.rust || 'stable' }}
|
||||||
target: ${{ matrix.info.target }}
|
target: ${{ matrix.info.target }}
|
||||||
@ -236,7 +236,7 @@ jobs:
|
|||||||
args: install -y wixtoolset
|
args: install -y wixtoolset
|
||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
@ -335,7 +335,7 @@ jobs:
|
|||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.info.rust || 'stable' }}
|
toolchain: ${{ matrix.info.rust || 'stable' }}
|
||||||
target: ${{ matrix.info.target }}
|
target: ${{ matrix.info.target }}
|
||||||
@ -433,7 +433,7 @@ jobs:
|
|||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.info.rust || 'stable' }}
|
toolchain: ${{ matrix.info.rust || 'stable' }}
|
||||||
target: ${{ matrix.info.target }}
|
target: ${{ matrix.info.target }}
|
||||||
|
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@ -89,14 +89,14 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
target: ${{ matrix.info.target }}
|
target: ${{ matrix.info.target }}
|
||||||
|
|
||||||
- name: Enable Rust cache
|
- 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
|
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.info.target }}
|
key: ${{ matrix.info.target }}
|
||||||
@ -136,7 +136,8 @@ jobs:
|
|||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
|
|
||||||
# Try running cargo build on all other platforms.
|
# 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:
|
other-check:
|
||||||
needs: pre-job
|
needs: pre-job
|
||||||
runs-on: ${{ matrix.info.os }}
|
runs-on: ${{ matrix.info.os }}
|
||||||
@ -146,7 +147,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
info:
|
info:
|
||||||
# x86 or x64
|
# x86 or x86-64
|
||||||
- {
|
- {
|
||||||
os: "ubuntu-latest",
|
os: "ubuntu-latest",
|
||||||
target: "i686-unknown-linux-gnu",
|
target: "i686-unknown-linux-gnu",
|
||||||
@ -165,6 +166,7 @@ jobs:
|
|||||||
cross: true,
|
cross: true,
|
||||||
rust: stable,
|
rust: stable,
|
||||||
}
|
}
|
||||||
|
|
||||||
- {
|
- {
|
||||||
os: "windows-2019",
|
os: "windows-2019",
|
||||||
target: "i686-pc-windows-msvc",
|
target: "i686-pc-windows-msvc",
|
||||||
@ -178,14 +180,6 @@ jobs:
|
|||||||
rust: stable,
|
rust: stable,
|
||||||
}
|
}
|
||||||
|
|
||||||
# The unofficial MSRV.
|
|
||||||
- {
|
|
||||||
os: "ubuntu-latest",
|
|
||||||
target: "x86_64-unknown-linux-gnu",
|
|
||||||
cross: false,
|
|
||||||
rust: "1.70.0",
|
|
||||||
}
|
|
||||||
|
|
||||||
# Beta
|
# Beta
|
||||||
- {
|
- {
|
||||||
os: "ubuntu-latest",
|
os: "ubuntu-latest",
|
||||||
@ -253,13 +247,13 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.info.rust }}
|
toolchain: ${{ matrix.info.rust }}
|
||||||
target: ${{ matrix.info.target }}
|
target: ${{ matrix.info.target }}
|
||||||
|
|
||||||
- name: Enable Rust cache
|
- 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
|
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.info.target }}
|
key: ${{ matrix.info.target }}
|
||||||
|
7
.github/workflows/coverage.yml
vendored
7
.github/workflows/coverage.yml
vendored
@ -50,12 +50,12 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Enable Rust cache
|
- 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
|
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.info.target }}
|
key: ${{ matrix.info.target }}
|
||||||
@ -70,8 +70,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info --locked --target=${{ matrix.info.target }}
|
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
|
- name: Upload to codecov.io
|
||||||
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # 3.1.1
|
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # 3.1.4
|
||||||
with:
|
with:
|
||||||
files: lcov.info
|
files: lcov.info
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
@ -31,7 +31,7 @@ exclude = [
|
|||||||
"Cross.toml",
|
"Cross.toml",
|
||||||
"rustfmt.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]]
|
[[bin]]
|
||||||
name = "btm"
|
name = "btm"
|
||||||
|
Loading…
Reference in New Issue
Block a user