From 97399e8c8ce584d005577604c10bd391e5da7268 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 2 Apr 2023 03:27:14 +0100 Subject: [PATCH] simplify CI --- .github/workflows/ci-post-merge.yml | 2 +- .github/workflows/ci.yml | 36 ++++++++--------------------- .github/workflows/clippy-fmt.yml | 13 ++++------- .github/workflows/coverage.yml | 14 ++--------- 4 files changed, 17 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci-post-merge.yml b/.github/workflows/ci-post-merge.yml index 6ca17ef63..d47083575 100644 --- a/.github/workflows/ci-post-merge.yml +++ b/.github/workflows/ci-post-merge.yml @@ -48,7 +48,7 @@ jobs: - name: Install ${{ matrix.version }} uses: actions-rs/toolchain@v1 with: - toolchain: ${{ matrix.version }}-${{ matrix.target.triple }} + toolchain: ${{ matrix.version }} profile: minimal override: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8867ce22..4c9149722 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,9 +29,7 @@ jobs: name: ${{ matrix.target.name }} / ${{ matrix.version }} runs-on: ${{ matrix.target.os }} - env: - CI: 1 - CARGO_INCREMENTAL: 0 + env: {} steps: - uses: actions/checkout@v3 @@ -43,12 +41,10 @@ jobs: if: matrix.target.os == 'windows-latest' run: echo 'OPENSSL_DIR=C:\Program Files\OpenSSL-Win64' | Out-File -FilePath $env:GITHUB_ENV -Append - - name: Install ${{ matrix.version }} - uses: actions-rs/toolchain@v1 + - name: Install Rust (${{ matrix.version }}) + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: ${{ matrix.version }}-${{ matrix.target.triple }} - profile: minimal - override: true + toolchain: ${{ matrix.version }} - name: Install cargo-hack uses: taiki-e/install-action@cargo-hack @@ -60,12 +56,6 @@ jobs: cargo add const-str@0.3 --dev -p=actix-web cargo add const-str@0.3 --dev -p=awc - - name: Generate Cargo.lock - uses: actions-rs/cargo@v1 - with: { command: generate-lockfile } - - name: Cache Dependencies - uses: Swatinem/rust-cache@v1.2.0 - - name: workaround MSRV issues if: matrix.version != 'stable' run: | @@ -104,12 +94,9 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - - - name: Generate Cargo.lock - run: cargo generate-lockfile - - name: Cache Dependencies - uses: Swatinem/rust-cache@v1.3.0 + - name: Install Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: { toolchain: nightly } - name: tests (io-uring) timeout-minutes: 60 @@ -123,12 +110,9 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@nightly - - - name: Generate Cargo.lock - run: cargo generate-lockfile - - name: Cache Dependencies - uses: Swatinem/rust-cache@v1.3.0 + - name: Install Rust (nightly) + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: { toolchain: nightly } - name: doc tests run: cargo ci-doctest diff --git a/.github/workflows/clippy-fmt.yml b/.github/workflows/clippy-fmt.yml index 90e3b3a98..a7da9b1c5 100644 --- a/.github/workflows/clippy-fmt.yml +++ b/.github/workflows/clippy-fmt.yml @@ -35,16 +35,11 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: { components: clippy } - - name: Generate Cargo.lock - run: cargo generate-lockfile - - name: Cache Dependencies - uses: Swatinem/rust-cache@v1.2.0 - - - name: Check with Clippy - uses: actions-rs/clippy-check@v1 + - uses: giraffate/clippy-action@v1 with: - args: --workspace --tests --examples --all-features - token: ${{ secrets.GITHUB_TOKEN }} + reporter: 'github-pr-check' + github_token: ${{ secrets.GITHUB_TOKEN }} + clippy_flags: --workspace --all-features --tests --examples --bins -- -Dclippy::todo lint-docs: runs-on: ubuntu-latest diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 11538c3d6..d537031c3 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -21,18 +21,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable-x86_64-unknown-linux-gnu - profile: minimal - override: true - - - name: Generate Cargo.lock - uses: actions-rs/cargo@v1 - with: { command: generate-lockfile } - - name: Cache Dependencies - uses: Swatinem/rust-cache@v1.2.0 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: { toolchain: nightly } - name: Generate coverage file run: |