From 1730fdc78377656bd41ec9c46a6442d7460bbdd5 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 6 Jan 2024 18:02:00 +0900 Subject: [PATCH 1/4] ci: Update actions/checkout action to v4 --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/release.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7243225..1d0655e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update stable - name: Install cargo-hack @@ -34,7 +34,7 @@ jobs: - 1.31.0 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} - run: cargo build @@ -47,7 +47,7 @@ jobs: - 1.36.0 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} - run: rustup target add thumbv7m-none-eabi @@ -56,7 +56,7 @@ jobs: miri: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup toolchain install nightly --component miri && rustup default nightly - run: cargo miri test --workspace --all-features @@ -67,7 +67,7 @@ jobs: clippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update stable - run: cargo clippy --all-features @@ -75,7 +75,7 @@ jobs: fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update stable - run: cargo fmt --all -- --check @@ -83,7 +83,7 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update nightly && rustup default nightly - run: cargo doc --no-deps --all-features diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2209e4..ba5992a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: if: github.repository_owner == 'tokio-rs' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: taiki-e/create-gh-release-action@v1 with: changelog: CHANGELOG.md From 1fdeca726751be93dc8895c297c6172ccf8e8b70 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 6 Jan 2024 18:04:06 +0900 Subject: [PATCH 2/4] ci: Reduce frequency of scheduled job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d0655e..b24a8fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: branches: - master schedule: - - cron: '0 2 * * *' + - cron: '0 2 * * 0' env: RUSTFLAGS: -Dwarnings From ce3db3382c3cf5f3fdffd876ee0fff57434a90f5 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 6 Jan 2024 18:04:16 +0900 Subject: [PATCH 3/4] ci: Remove no longer needed argument for cargo fmt --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b24a8fb..cf1c7b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust run: rustup update stable - - run: cargo fmt --all -- --check + - run: cargo fmt --all --check docs: runs-on: ubuntu-latest From 664f8f0651728b118797e6b336eebbe1d2d66e88 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 6 Jan 2024 18:31:59 +0900 Subject: [PATCH 4/4] ci: Use cargo-hack's --rust-version flag for minrust job This respects rust-version field in Cargo.toml, so it removes the need to manage MSRV in both the CI file and Cargo.toml. --- .github/workflows/ci.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf1c7b3..7b30b89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,17 +27,12 @@ jobs: - run: cargo test --all-features minrust: - strategy: - matrix: - rust: - # This is the minimum supported Rust version of this crate. - - 1.31.0 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} - - run: cargo build + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - run: cargo hack build --rust-version no-std: strategy: