Skip to content

Commit

Permalink
Replace deprecated actions-rs/toolchain usage
Browse files Browse the repository at this point in the history
The actions-rs/toolchain GitHub action is no longer maintained. Switch
over to using dtolnay/rust-toolchain in its stead.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o committed Dec 4, 2023
1 parent 1534aee commit 3d915ec
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 71 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/publish-capi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- name: Publish
run: cargo publish --package blazesym-c --token "${CARGO_REGISTRY_TOKEN}"
env:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- name: Publish
run: cargo publish --package blazecli --token "${CARGO_REGISTRY_TOKEN}"
env:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- name: Dry-run package creation
run: cargo package --no-verify
- name: Create git tag
Expand Down
66 changes: 13 additions & 53 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ jobs:
args: "--no-default-features"
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.rust }}-${{ matrix.profile }}
Expand Down Expand Up @@ -68,11 +66,7 @@ jobs:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@nightly
- name: Install required tools
run: sudo apt-get install -y llvm-14
- name: Check incremental rebuilds
Expand All @@ -91,11 +85,7 @@ jobs:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@nightly
- name: Install required tools
run: sudo apt-get install -y llvm-14
- name: Install cargo-llvm-cov
Expand All @@ -117,11 +107,7 @@ jobs:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@nightly
- name: Enable debug symbols
run: |
# to get the symbolizer for debug symbol resolution
Expand All @@ -148,22 +134,16 @@ jobs:
- uses: actions/checkout@v4
- name: Install required tools
run: sudo apt-get install -y llvm-14
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --workspace --release
test-miri:
name: Test with Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
# Miri would honor our custom test runner, but doesn't work with it. We
# could conceivably override that by specifying
# CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER, except it appears as if Miri
Expand All @@ -178,11 +158,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --package=blazesym-c --features=generate-c-header
- name: Check that C header is up-to-date
run: git diff --exit-code ||
Expand All @@ -198,11 +174,7 @@ jobs:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@nightly
- name: Install required tools
run: sudo apt-get install -y llvm-14
- uses: Swatinem/rust-cache@v2
Expand All @@ -224,24 +196,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
override: true
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --workspace --no-deps --all-targets --features=dont-generate-unit-test-files -- -A unknown_lints -D clippy::todo
rustfmt:
name: Check code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
profile: minimal
components: rustfmt
override: true
- run: cargo +nightly fmt --all -- --check
cargo-doc:
name: Generate documentation
Expand All @@ -250,9 +214,5 @@ jobs:
RUSTDOCFLAGS: '-D warnings'
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc --workspace --no-deps

0 comments on commit 3d915ec

Please sign in to comment.