diff options
author | Daniel McCarney <daniel@binaryparadox.net> | 2023-07-10 15:17:28 -0400 |
---|---|---|
committer | Daniel McCarney <daniel@binaryparadox.net> | 2023-07-11 10:25:47 -0400 |
commit | 85be9d4b4918f843f128ac5bdc6207d41130d7e2 (patch) | |
tree | 454678895103f0e93dba846d28de822d92d361fc | |
parent | 9a6bfa28989de418a05ad43a6ff1b92cb2794331 (diff) |
ci: actions-rs/toolchain -> dtolnay/rust-toolchain.
The `actions-rs/toolchain` workflow action is abandoned and its use
generates deprecation warnings from GitHub actions.
In the other Rustls ecosystems projects we've switched to the maintained
`dtolnay/rust-toolchain` action as an alternative.
This commit makes that change for the rustls-ffi actions. One additional
change is required to `tests/verify-static-libraries.py` to tell `cargo`
to always skip using color when we're building with the intent to regex
match output.
-rw-r--r-- | .github/workflows/test.yaml | 71 | ||||
-rwxr-xr-x | tests/verify-static-libraries.py | 2 |
2 files changed, 16 insertions, 57 deletions
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ee8acf1..3250a61 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,10 +36,9 @@ jobs: persist-credentials: false - name: Install ${{ matrix.rust }} toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - override: true - env: CARGO_UNSTABLE_HTTP_REGISTRY: true run: make CC=${{ matrix.cc }} PROFILE=release test @@ -78,11 +77,7 @@ jobs: with: persist-credentials: false - name: Install nightly rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - default: true + uses: dtolnay/rust-toolchain@nightly - name: Configure CMake run: cmake -S . -B build - name: Build, debug configuration @@ -100,11 +95,7 @@ jobs: with: persist-credentials: false - name: Install nightly rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - default: true + uses: dtolnay/rust-toolchain@nightly - name: Configure CMake run: cmake -S . -B build - name: Build, release configuration @@ -119,11 +110,7 @@ jobs: with: persist-credentials: false - name: Install nightly rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - default: true + uses: dtolnay/rust-toolchain@nightly - run: touch src/lib.rs - run: cbindgen --version - run: make src/rustls.h @@ -139,11 +126,7 @@ jobs: persist-credentials: false - name: Install rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - default: true + uses: dtolnay/rust-toolchain@nightly - name: cargo doc (all features) run: cargo doc --all-features --no-deps --workspace @@ -160,11 +143,7 @@ jobs: persist-credentials: false - name: Install rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - default: true + uses: dtolnay/rust-toolchain@nightly - name: cargo test (debug; all features; -Z minimal-versions) run: cargo -Z minimal-versions test --all-features @@ -178,17 +157,12 @@ jobs: with: persist-credentials: false - name: Install rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: 1.67.1 - override: true - default: true components: rustfmt - name: Check formatting - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check clippy: name: Clippy @@ -199,17 +173,12 @@ jobs: with: persist-credentials: false - name: Install rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: 1.67.1 - override: true - default: true components: clippy - - name: Check formatting - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --workspace -- -D warnings + - name: Check clippy + run: cargo clippy --workspace -- -D warnings clippy-nightly-optional: name: Clippy nightly (optional) @@ -220,17 +189,11 @@ jobs: with: persist-credentials: false - name: Install rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly - override: true - default: true components: clippy - - name: Check formatting - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --workspace -- -D warnings + - name: Check clippy + run: cargo clippy --workspace -- -D warnings clang-tidy: name: Clang Tidy @@ -253,11 +216,7 @@ jobs: persist-credentials: false - name: Install nightly Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - override: true + uses: dtolnay/rust-toolchain@nightly - run: rustup override set "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" - run: rustup component add miri - run: cargo miri test diff --git a/tests/verify-static-libraries.py b/tests/verify-static-libraries.py index c4c914b..3204f3e 100755 --- a/tests/verify-static-libraries.py +++ b/tests/verify-static-libraries.py @@ -36,7 +36,7 @@ def main(): want = "" build = subprocess.run( - ["cargo", "build"], + ["cargo", "build", "--color", "never"], stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, env=dict(os.environ, RUSTFLAGS="--print native-static-libs") |