diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bb191381..8f2cccfc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,7 +141,7 @@ jobs: - uses: dtolnay/rust-toolchain@nightly - name: "Install cargo-fuzz" run: | - cargo install cargo-fuzz + cargo install -f cargo-fuzz - run: | cargo fuzz run --fuzz-dir ${{ matrix.item.fuzz-dir }} --jobs 2 ${{ matrix.item.target }} -- -max_total_time=${{ matrix.item.max-total-time }} @@ -187,28 +187,28 @@ jobs: - run: | cargo clippy --workspace -- -D warnings -D rust-2021-compatibility -W unreachable-pub - udeps: - if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} - runs-on: ubuntu-latest - needs: test - steps: - - uses: actions/checkout@v4 - - uses: abbbi/github-actions-tune@v1 - - uses: actions/cache@v3 - with: - key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }} - path: | - ~/.cargo/bin/ - ~/.cargo/git/db/ - ~/.cargo/registry/cache/ - ~/.cargo/registry/index/ - target/ - - uses: dtolnay/rust-toolchain@nightly - - name: "Install `cargo-udeps`" - run: | - cargo install -f cargo-udeps - - run: | - cargo udeps --workspace + # udeps: + # if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} + # runs-on: ubuntu-latest + # needs: test + # steps: + # - uses: actions/checkout@v4 + # - uses: abbbi/github-actions-tune@v1 + # - uses: actions/cache@v3 + # with: + # key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }} + # path: | + # ~/.cargo/bin/ + # ~/.cargo/git/db/ + # ~/.cargo/registry/cache/ + # ~/.cargo/registry/index/ + # target/ + # - uses: dtolnay/rust-toolchain@nightly + # - name: "Install `cargo-udeps`" + # run: | + # cargo install -f cargo-udeps + # - run: | + # cargo udeps --workspace audit: if: ${{ github.ref == 'refs/heads/main' }} diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index dbeb90a0a..c745c3247 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -9,9 +9,9 @@ jobs: audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: abbbi/github-actions-tune@v1 - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: key: ${{ runner.os }}-cargo-stable-${{ hashFiles('**/Cargo.toml') }} path: | @@ -20,10 +20,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/registry/index/ target/ - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - uses: actions-rs/audit-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -31,9 +28,9 @@ jobs: upgrades: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: abbbi/github-actions-tune@v1 - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }} path: | @@ -42,12 +39,9 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/registry/index/ target/ - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - - run: | + - uses: dtolnay/rust-toolchain@stable + - name: "Install `cargo-upgrades`" + run: | cargo install -f cargo-upgrades - run: | cargo upgrades diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9cfa355f6..0068c51b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,7 @@ on: - 'v*' env: - # RUSTFLAGS: -D warnings -W unreachable-pub -W rust-2021-compatibility - RUSTFLAGS: -D warnings -W rust-2021-compatibility + RUSTFLAGS: -D warnings -W unreachable-pub -W rust-2021-compatibility RUSTUP_MAX_RETRIES: 10 CARGO_INCREMENTAL: 0 @@ -42,8 +41,8 @@ jobs: steps: - name: "Print glibc version" run: ldd --version - - uses: actions/checkout@v3 - - uses: actions/cache@v2 + - uses: actions/checkout@v4 + - uses: actions/cache@v3 with: key: ${{ runner.os }}-cargo-stable-${{ matrix.target.triple }}-glibc${{ matrix.target.glibc }}-${{ hashFiles('**/Cargo.toml') }} path: | @@ -61,22 +60,15 @@ jobs: - name: "Install packages (CentOS)" if: ${{ startsWith(matrix.target.image, 'centos') }} run: yum install gcc -y - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable target: ${{ matrix.target.triple }} - profile: minimal - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --workspace - name: "Run prepare tests" run: ci/prepare-tests.sh - - uses: actions-rs/cargo@v1 - with: - command: test - args: --release --workspace + - run: | + cargo build --release --workspace + cargo test --release --workspace - name: "Strip release binary" run: | # strip target/release/pica-lint @@ -111,8 +103,8 @@ jobs: - { triple: x86_64-pc-windows-msvc, variant: "MSVC" } - { triple: x86_64-pc-windows-gnu, variant: "GNU" } steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v2 + - uses: actions/checkout@v4 + - uses: actions/cache@v3 with: key: ${{ runner.os }}-cargo-stable-${{ matrix.target.triple }}-${{ hashFiles('**/Cargo.toml') }} path: | @@ -121,22 +113,16 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/registry/index/ target/ - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable target: ${{ matrix.target.triple }} - profile: minimal override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --workspace - name: "Run prepare tests" run: ci/prepare-tests.sh - - uses: actions-rs/cargo@v1 - with: - command: test - args: --release --workspace + - run: | + cargo build --release --workspace + cargo test --release --workspace - name: "Build release archive" id: build-archive shell: bash @@ -163,8 +149,8 @@ jobs: target: - { triple: x86_64-apple-darwin } steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v2 + - uses: actions/checkout@v4 + - uses: actions/cache@v3 with: key: ${{ runner.os }}-cargo-stable-${{ matrix.target.triple }}-${{ hashFiles('**/Cargo.toml') }} path: | @@ -173,23 +159,16 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/registry/index/ target/ - - name: Install Rust - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable target: ${{ matrix.target.triple }} - profile: minimal override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --workspace - name: "Run prepare tests" run: ci/prepare-tests.sh - - uses: actions-rs/cargo@v1 - with: - command: test - args: --release --workspace + - run: | + cargo build --release --workspace + cargo test --release --workspace - name: "Strip release binary" run: | strip target/release/pica-lint @@ -226,9 +205,9 @@ jobs: - { triple: x86_64-unknown-linux-gnu, glibc: 2.35, format: deb } - { triple: x86_64-unknown-linux-gnu, glibc: 2.35, format: rpm } steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download binary release - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: pica-${{ needs.version.outputs.VERSION }}-${{ matrix.target.triple }}-glibc${{ matrix.target.glibc }}.tar.gz - name: Extract binary release @@ -243,7 +222,7 @@ jobs: arch: x86_64 format: ${{ matrix.target.format }} package: .github/actions-rs/package.yaml - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ steps.build_rpm.outputs.package }} path: ${{ steps.build_rpm.outputs.package }} @@ -305,7 +284,7 @@ jobs: - version steps: - name: "Download releases/packages" - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 - name: Assemble data run: | mkdir uploads/