From 5b25c008b8c22daf9e7fe3891158f47dea07fbd7 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sun, 19 Nov 2023 13:18:11 -0500 Subject: [PATCH 1/4] .github: bump actions/checkout to v4 --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 71c122e..e2338b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: rust: [stable] profile: [dev, release] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} @@ -48,7 +48,7 @@ jobs: name: Build using minimum versions of dependencies runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Nightly Rust uses: actions-rs/toolchain@v1 with: @@ -70,7 +70,7 @@ jobs: name: Check code formatting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: nightly @@ -81,7 +81,7 @@ jobs: name: Lint with clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -94,7 +94,7 @@ jobs: env: RUSTDOCFLAGS: '-D warnings -D rustdoc::broken_intra_doc_links' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: stable From e08b08e5e15e3a33f135c67f5edbfd6b6453aa27 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sun, 19 Nov 2023 13:20:05 -0500 Subject: [PATCH 2/4] .github: replace actions-rs with dtolnay/rust-toolchain actions-rs is no longer maintained. --- .github/workflows/test.yml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2338b3..7d3e788 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,11 +23,9 @@ jobs: profile: [dev, release] steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - profile: minimal - override: true - if: ${{ matrix.profile == 'dev' }} name: Build & test dev run: | @@ -50,19 +48,14 @@ jobs: steps: - uses: actions/checkout@v4 - 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.56 - default: true - uses: Swatinem/rust-cache@v2 - name: Build run: cargo build --locked --all-features @@ -71,22 +64,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly components: rustfmt - override: true - run: cargo +nightly fmt -- --check clippy: name: Lint with clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - 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 rustdoc: name: Generate documentation @@ -95,8 +82,5 @@ jobs: RUSTDOCFLAGS: '-D warnings -D rustdoc::broken_intra_doc_links' steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - run: cargo doc --no-deps From acf589cadbd9e7adad5d24ba3714dc33d838aedc Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sun, 19 Nov 2023 13:23:29 -0500 Subject: [PATCH 3/4] .github: remove duplicate logic f979a7df059be1cf1a27abfa9273936488569ee2 bumped MSRV to 1.56. --- .github/workflows/test.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d3e788..e205ce8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,18 +26,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - if: ${{ matrix.profile == 'dev' }} - name: Build & test dev - run: | - cargo build - cargo build --all-features - cargo test - # We need to duplicate the logic here, because up to 1.56 Cargo - # considers the --profile option unstable. Once our minimum - # supported Rust version is above that, we should remove the above - # block. - - if: ${{ matrix.rust == 'stable' && matrix.profile != 'dev'}} - name: Build & test release + - name: Build & test run: | cargo build --profile=${{ matrix.profile }} cargo build --all-features --profile=${{ matrix.profile }} From 64e01b95b61ebcecbbad9054def4c05bc4e682a8 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sun, 19 Nov 2023 13:26:26 -0500 Subject: [PATCH 4/4] .github: add rust cache action This should reduce CI time. --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e205ce8..ebebde2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,9 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} + - uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.profile }} - name: Build & test run: | cargo build --profile=${{ matrix.profile }} @@ -63,6 +66,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 - run: cargo clippy --no-deps --all-targets --all-features -- -A unknown_lints -D warnings rustdoc: name: Generate documentation @@ -72,4 +76,5 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 - run: cargo doc --no-deps