Skip to content

Commit

Permalink
Migrate actions-rs/* to dtolnay/rust-toolchain (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
skmcgrail authored Jan 11, 2024
1 parent 516ffef commit 60def47
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 89 deletions.
157 changes: 73 additions & 84 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,16 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
profile: minimal
override: true
components: rustfmt
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}

- name: Run cargo fmt
uses: actions-rs/[email protected]
with:
command: fmt
args: -- --check --verbose
run : cargo fmt -- --check --verbose

clippy:
runs-on: ubuntu-latest
Expand All @@ -56,13 +53,13 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
profile: minimal
override: true
components: clippy
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo clippy
working-directory: ${{ matrix.crate_dir }}
run: cargo clippy ${{ matrix.features }} --all-targets -- -W clippy::all -W clippy::pedantic -D warnings
Expand All @@ -79,17 +76,14 @@ jobs:
with:
fetch-depth: 0
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: nightly-2023-08-25
profile: minimal
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Install cargo-public-api
uses: actions-rs/[email protected]
with:
command: install
args: cargo-public-api
run: cargo install cargo-public-api
- name: Perform API Diff (Target Branch)
if: matrix.diff_target == 'branch'
working-directory: ${{ matrix.crate_dir }}
Expand Down Expand Up @@ -122,18 +116,15 @@ jobs:
with:
submodules: 'recursive'

- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
profile: minimal
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}

- name: Install cargo-udeps
uses: actions-rs/[email protected]
with:
command: install
args: cargo-udeps
run: cargo install cargo-udeps

- name: Run cargo udeps
# we only use openssl when the openssl-benchmarks feature is enabled.
Expand Down Expand Up @@ -165,17 +156,15 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
override: true
target: ${{ matrix.target }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Install cross
uses: actions-rs/[email protected]
with:
command: install
args: cross --git https://github.com/cross-rs/cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Cross-compilation
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'i686-unknown-linux-gnu' }}
working-directory: ./aws-lc-rs
Expand All @@ -197,12 +186,13 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
override: true
target: ${{ matrix.target }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
run: cargo test --features bindgen,unstable --target ${{ matrix.target }}
Expand All @@ -221,11 +211,10 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
toolchain: stable
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./sys-testing
run: cargo test --features ${{ matrix.features }} --no-default-features
Expand All @@ -252,11 +241,12 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
run: cargo test ${{ matrix.args }}
Expand Down Expand Up @@ -285,11 +275,12 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
Expand All @@ -314,11 +305,12 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
run: cargo test ${{ matrix.args }}
Expand All @@ -344,11 +336,12 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
run: cargo test ${{ matrix.args }}
Expand All @@ -373,11 +366,12 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: aws-lc-sys
working-directory: ./aws-lc-sys
run: cargo ${{ matrix.args }}
Expand All @@ -398,18 +392,16 @@ jobs:
submodules: 'recursive'
lfs: true

- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
override: true
components: llvm-tools-preview
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}

- name: Install cargo-llvm-cov
uses: actions-rs/[email protected]
with:
command: install
args: cargo-llvm-cov
run: cargo install cargo-llvm-cov

- name: Run coverage
working-directory: ./aws-lc-rs
Expand All @@ -429,12 +421,13 @@ jobs:
submodules: 'recursive'
lfs: true

- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ env.MIRAI_TOOLCHAIN }}
profile: minimal
components: rust-src, rustc-dev, llvm-tools-preview
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}

- name: Cache Cargo
uses: actions/[email protected]
Expand Down Expand Up @@ -477,11 +470,12 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run address sanitizers
env:
ASAN_OPTIONS: detect_leaks=1
Expand All @@ -501,11 +495,10 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
toolchain: stable
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run s2n-quic integration
working-directory: ./aws-lc-rs
run: |
Expand All @@ -522,16 +515,12 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
toolchain: stable
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Install cargo-download
uses: actions-rs/[email protected]
with:
command: install
args: cargo-download
run: cargo install cargo-download
- name: Run rustls integration
working-directory: ./aws-lc-rs
run: |
Expand Down Expand Up @@ -577,11 +566,10 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
toolchain: stable
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
# Doc-tests fail to link with dynamic build
Expand All @@ -600,11 +588,10 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
toolchain: stable
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
Expand All @@ -624,11 +611,14 @@ jobs:
submodules: 'recursive'
lfs: true

- uses: dtolnay/rust-toolchain@stable
id: toolchain

- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}

- name: Install cargo-msrv
uses: actions-rs/[email protected]
with:
command: install
args: cargo-msrv
run: cargo install cargo-msrv

- name: Verify msrv
working-directory: ./aws-lc-rs
Expand All @@ -642,11 +632,10 @@ jobs:
with:
submodules: 'recursive'
lfs: true
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@nightly
id: toolchain
with:
toolchain: nightly
override: true
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Setup to use minimal versions
working-directory: ./aws-lc-rs
run: cargo update -Z minimal-versions
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/deploy-user-guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
with:
persist-credentials: false
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Build and Test User Guide
run: |
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.34/mdbook-v0.4.34-x86_64-unknown-linux-gnu.tar.gz | tar xz
Expand Down

0 comments on commit 60def47

Please sign in to comment.