Skip to content

Commit

Permalink
Merge pull request #422 from bgilbert/deprecations
Browse files Browse the repository at this point in the history
Fix GitHub Actions deprecation warnings; switch away from unmaintained `actions-rs/toolchain`
  • Loading branch information
cgwalters authored Jan 9, 2023
2 parents 0b247d5 + 5e41b94 commit e8e25d0
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: "stable"
default: true
toolchain: stable
- name: cargo build
run: cargo build
- name: cargo test
Expand All @@ -36,12 +35,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: "stable"
default: true
toolchain: stable
- name: cargo build (release)
run: cargo build --release
- name: cargo test (release)
Expand All @@ -51,18 +49,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Detect crate MSRV
run: |
msrv=$(cargo metadata --format-version 1 --no-deps | \
jq -r '.packages | .[].rust_version')
echo "Crate MSRV: $msrv"
echo "MSRV=$msrv" >> $GITHUB_ENV
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.MSRV }}
default: true
- name: cargo build (release)
run: cargo build --release
- name: cargo test (release)
Expand All @@ -72,12 +69,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env['ACTION_LINTS_TOOLCHAIN'] }}
default: true
components: rustfmt, clippy
- name: cargo clippy (warnings)
run: cargo clippy -- -D warnings
Expand All @@ -94,12 +90,11 @@ jobs:
- "nightly"
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.channel }}
default: true
- name: cargo build
run: cargo build
- name: cargo test
Expand Down

0 comments on commit e8e25d0

Please sign in to comment.