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.
  • Loading branch information
d-e-s-o committed Jun 18, 2024
1 parent 8fb9a78 commit 4312314
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 34 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2023 The apca Developers
# Copyright (C) 2023-2024 The apca Developers
# SPDX-License-Identifier: GPL-3.0-or-later

name: Publish
Expand All @@ -8,7 +8,6 @@ on:

jobs:
version:
name: Retrieve version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
Expand Down Expand Up @@ -38,12 +37,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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
34 changes: 8 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (C) 2022-2023 The apca Developers
# Copyright (C) 2022-2024 The apca Developers
# SPDX-License-Identifier: GPL-3.0-or-later

name: Test

on:
push:
pull_request:
push:
workflow_call:

env:
Expand Down Expand Up @@ -35,11 +35,7 @@ jobs:
args: --all-features
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@stable
- name: Build ${{ matrix.profile }}
run: cargo build --profile=${{ matrix.profile }} --all-targets ${{ matrix.args }}
build-minimum:
Expand All @@ -48,19 +44,14 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install Nightly Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
uses: dtolnay/rust-toolchain@nightly
- run: cargo +nightly -Z minimal-versions update
- name: Install minimum Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
# Please adjust README and rust-version field in Cargo.toml files when
# bumping version.
toolchain: 1.63.0
default: true
- name: Build
run: cargo build --features=vendored-openssl --locked
test:
Expand All @@ -84,22 +75,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --no-deps --all-targets --all-features -- -A unknown_lints -D warnings
rustfmt:
name: Check code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: rustfmt
override: true
- run: cargo +nightly fmt -- --check
cargo-doc:
name: Generate documentation
Expand All @@ -108,10 +93,7 @@ jobs:
RUSTDOCFLAGS: '-D warnings'
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- run: |
cargo doc --no-deps
# Explicitly run doc tests as cargo-llvm-cov currently does not.
Expand Down

0 comments on commit 4312314

Please sign in to comment.