CI: Update actions and fix warnings (#2435)

* CI: update to checkout@v4 action

Not sure why they decided to bump a major version. It seems like this is
unnecessary churn: https://github.com/actions/checkout/pull/1436#issuecomment-1737711301

* CI: replace archived `actions-rs/toolchain`

It's been unmaintained for four years and has been throwing warnings in
CI:

> The `set-output` command is deprecated and will be disabled soon.

* CI: Bump `cargo-install` action.

This should fix the remaining warnings in CI?

* CI: mdbook-linkcheck: workaround for build error
This commit is contained in:
Mrmaxmeier 2024-07-23 12:44:34 +02:00 committed by GitHub
parent 0dc94a48c5
commit c44d361828
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 55 additions and 84 deletions

View File

@ -23,20 +23,24 @@ jobs:
os: [ ubuntu-latest, windows-latest, macOS-latest ] os: [ ubuntu-latest, windows-latest, macOS-latest ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- if: runner.os == 'Linux' - if: runner.os == 'Linux'
uses: ./.github/workflows/ubuntu-prepare uses: ./.github/workflows/ubuntu-prepare
- name: Install mimetype - name: Install mimetype
if: runner.os == 'Linux' if: runner.os == 'Linux'
run: sudo apt-get install -y libfile-mimeinfo-perl run: sudo apt-get install -y libfile-mimeinfo-perl
- name: install mdbook - name: install mdbook
uses: baptiste0928/cargo-install@v1.3.0 uses: baptiste0928/cargo-install@v3
with: with:
crate: mdbook crate: mdbook
- name: install linkcheck - name: install linkcheck
uses: baptiste0928/cargo-install@v1.3.0 uses: baptiste0928/cargo-install@v3
with: with:
crate: mdbook-linkcheck crate: mdbook-linkcheck
# NOTE: The current crates.io release of mdbook-linkcheck (v0.7.7) is broken
# => https://github.com/Michael-F-Bryan/mdbook-linkcheck/pull/82#issuecomment-2241058491
git: https://github.com/Michael-F-Bryan/mdbook-linkcheck.git
rev: 8c783c5d754d83bcd50c28fb4174854b04ece990
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "ubuntu" } with: { shared-key: "ubuntu" }
if: runner.os == 'Linux' if: runner.os == 'Linux'
@ -71,11 +75,8 @@ jobs:
steps: steps:
- name: Remove Dotnet & Haskell - name: Remove Dotnet & Haskell
run: rm -rf /usr/share/dotnet && rm -rf /opt/ghc run: rm -rf /usr/share/dotnet && rm -rf /opt/ghc
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: - uses: actions/checkout@v4
profile: minimal
toolchain: stable
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "llvm-tester" } with: { shared-key: "llvm-tester" }
- name: Install LLVM and Clang - name: Install LLVM and Clang
@ -88,7 +89,7 @@ jobs:
ubuntu-doc-build: ubuntu-doc-build:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
# ---- doc check ---- # ---- doc check ----
@ -98,7 +99,7 @@ jobs:
ubuntu-doc-test: ubuntu-doc-test:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
# ---- doc check ---- # ---- doc check ----
@ -109,7 +110,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: ubuntu needs: ubuntu
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Add nightly clippy - name: Add nightly clippy
@ -121,7 +122,7 @@ jobs:
ubuntu: ubuntu:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "ubuntu" } with: { shared-key: "ubuntu" }
@ -141,7 +142,7 @@ jobs:
ubuntu-clippy: ubuntu-clippy:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "ubuntu" } with: { shared-key: "ubuntu" }
@ -163,7 +164,7 @@ jobs:
matrix: matrix:
instance_idx: [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17" ] instance_idx: [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17" ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "ubuntu" } with: { shared-key: "ubuntu" }
@ -178,11 +179,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ubuntu needs: ubuntu
steps: steps:
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: - uses: actions/checkout@v4
profile: minimal
toolchain: stable
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "ubuntu" } with: { shared-key: "ubuntu" }
- name: Install smoke test deps - name: Install smoke test deps
@ -193,7 +191,7 @@ jobs:
python-bindings: python-bindings:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "ubuntu" } with: { shared-key: "ubuntu" }
@ -209,7 +207,7 @@ jobs:
cargo-fmt: cargo-fmt:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "ubuntu" } with: { shared-key: "ubuntu" }
@ -222,7 +220,7 @@ jobs:
fuzzers-preflight: fuzzers-preflight:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Fuzzer in CI Check - name: Fuzzer in CI Check
run: ./scripts/check_tested_fuzzers.sh run: ./scripts/check_tested_fuzzers.sh
@ -308,7 +306,7 @@ jobs:
- ./fuzzers/others/tutorial - ./fuzzers/others/tutorial
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/fuzzer-tester-prepare - uses: ./.github/workflows/fuzzer-tester-prepare
- name: Build and run example fuzzers (Linux) - name: Build and run example fuzzers (Linux)
if: runner.os == 'Linux' if: runner.os == 'Linux'
@ -322,7 +320,7 @@ jobs:
outputs: outputs:
qemu: ${{ steps.filter.outputs.qemu }} qemu: ${{ steps.filter.outputs.qemu }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: dorny/paths-filter@v3 - uses: dorny/paths-filter@v3
id: filter id: filter
with: with:
@ -352,7 +350,7 @@ jobs:
runs-on: [ self-hosted, qemu ] runs-on: [ self-hosted, qemu ]
container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/qemu-fuzzer-tester-prepare - uses: ./.github/workflows/qemu-fuzzer-tester-prepare
- name: Build and run example QEMU fuzzers (Linux) - name: Build and run example QEMU fuzzers (Linux)
if: runner.os == 'Linux' if: runner.os == 'Linux'
@ -362,13 +360,10 @@ jobs:
nostd-build: nostd-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@nightly
with: with:
profile: minimal
toolchain: nightly
override: true
components: rust-src components: rust-src
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Add targets - name: Add targets
run: rustup target add arm-linux-androideabi && rustup target add thumbv6m-none-eabi run: rustup target add arm-linux-androideabi && rustup target add thumbv6m-none-eabi
@ -382,13 +377,10 @@ jobs:
nostd-clippy: nostd-clippy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@nightly
with: with:
profile: minimal
toolchain: nightly
override: true
components: clippy, rust-src components: clippy, rust-src
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Add targets - name: Add targets
run: rustup target add arm-linux-androideabi && rustup target add thumbv6m-none-eabi run: rustup target add arm-linux-androideabi && rustup target add thumbv6m-none-eabi
@ -400,7 +392,7 @@ jobs:
build-docker: build-docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build docker - name: Build docker
run: docker build -t libafl . run: docker build -t libafl .
@ -409,7 +401,7 @@ jobs:
needs: needs:
- common - common
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/windows-tester-prepare - uses: ./.github/workflows/windows-tester-prepare
- name: Build fuzzers/frida_libpng - name: Build fuzzers/frida_libpng
run: cd fuzzers/frida/frida_libpng/ && cargo make test run: cd fuzzers/frida/frida_libpng/ && cargo make test
@ -419,7 +411,7 @@ jobs:
needs: needs:
- common - common
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/windows-tester-prepare - uses: ./.github/workflows/windows-tester-prepare
- name: Build fuzzers/stb/libfuzzer_stb_image - name: Build fuzzers/stb/libfuzzer_stb_image
run: cd fuzzers/stb/libfuzzer_stb_image && cargo build --release run: cd fuzzers/stb/libfuzzer_stb_image && cargo build --release
@ -429,7 +421,7 @@ jobs:
needs: needs:
- common - common
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/windows-tester-prepare - uses: ./.github/workflows/windows-tester-prepare
- name: Build fuzzers/frida/frida_gdiplus - name: Build fuzzers/frida/frida_gdiplus
run: cd fuzzers/frida/frida_gdiplus/ && cargo make test && cargo make test_cmplog run: cd fuzzers/frida/frida_gdiplus/ && cargo make test && cargo make test_cmplog
@ -439,7 +431,7 @@ jobs:
needs: needs:
- common - common
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/workflows/windows-tester-prepare - uses: ./.github/workflows/windows-tester-prepare
- name: install cxx bridge - name: install cxx bridge
run: cargo install cxxbridge-cmd run: cargo install cxxbridge-cmd
@ -451,11 +443,8 @@ jobs:
needs: needs:
- common - common
steps: steps:
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: - uses: actions/checkout@v4
profile: minimal
toolchain: stable
- uses: actions/checkout@v3
- uses: ./.github/workflows/windows-tester-prepare - uses: ./.github/workflows/windows-tester-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Run real clippy, not the fake one - name: Run real clippy, not the fake one
@ -465,17 +454,14 @@ jobs:
macos: macos:
runs-on: macOS-latest runs-on: macOS-latest
steps: steps:
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
- name: Add nightly clippy - name: Add nightly clippy
run: rustup toolchain install nightly --component clippy --allow-downgrade && rustup default nightly run: rustup toolchain install nightly --component clippy --allow-downgrade && rustup default nightly
- name: Install deps - name: Install deps
run: brew install z3 gtk+3 run: brew install z3 gtk+3
- name: Install cxxbridge - name: Install cxxbridge
run: cargo install cxxbridge-cmd run: cargo install cxxbridge-cmd
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: MacOS Build - name: MacOS Build
run: cargo build --verbose run: cargo build --verbose
@ -489,13 +475,10 @@ jobs:
ios: ios:
runs-on: macOS-latest runs-on: macOS-latest
steps: steps:
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
- name: install ios - name: install ios
run: rustup target add aarch64-apple-ios run: rustup target add aarch64-apple-ios
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Build iOS - name: Build iOS
run: cargo build --target aarch64-apple-ios && cd libafl_frida && cargo build --target aarch64-apple-ios && cd .. run: cargo build --target aarch64-apple-ios && cd libafl_frida && cargo build --target aarch64-apple-ios && cd ..
@ -503,10 +486,7 @@ jobs:
android: android:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
- uses: nttld/setup-ndk@v1 - uses: nttld/setup-ndk@v1
with: with:
ndk-version: r25b ndk-version: r25b
@ -514,7 +494,7 @@ jobs:
run: rustup target add aarch64-linux-android run: rustup target add aarch64-linux-android
- name: install cargo ndk - name: install cargo ndk
run: cargo install cargo-ndk run: cargo install cargo-ndk
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Build Android - name: Build Android
run: cd libafl && cargo ndk -t arm64-v8a build --release run: cd libafl && cargo ndk -t arm64-v8a build --release
@ -533,7 +513,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
name: Simple build in FreeBSD name: Simple build in FreeBSD
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Test in FreeBSD - name: Test in FreeBSD
id: test id: test
uses: vmactions/freebsd-vm@v1 uses: vmactions/freebsd-vm@v1

View File

@ -3,7 +3,7 @@ description: Sets up the Rust environment for the CI workflow
runs: runs:
using: composite using: composite
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
@ -26,15 +26,15 @@ runs:
shell: bash shell: bash
run: rustup target add wasm32-unknown-unknown run: rustup target add wasm32-unknown-unknown
- name: install cargo-make - name: install cargo-make
uses: baptiste0928/cargo-install@v1.3.0 uses: baptiste0928/cargo-install@v3
with: with:
crate: cargo-make crate: cargo-make
- name: install wasm-pack - name: install wasm-pack
uses: baptiste0928/cargo-install@v1.3.0 uses: baptiste0928/cargo-install@v3
with: with:
crate: wasm-pack crate: wasm-pack
- name: install cxxbridge-cmd - name: install cxxbridge-cmd
uses: baptiste0928/cargo-install@v1.3.0 uses: baptiste0928/cargo-install@v3
with: with:
crate: cxxbridge-cmd crate: cxxbridge-cmd
- name: install chrome - name: install chrome

View File

@ -3,7 +3,7 @@ description: Sets up the QEMU fuzzers environment
runs: runs:
using: composite using: composite
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
@ -13,10 +13,7 @@ runs:
- uses: ./.github/workflows/ubuntu-prepare - uses: ./.github/workflows/ubuntu-prepare
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: { shared-key: "${{ runner.os }}-shared-fuzzer-cache" } with: { shared-key: "${{ runner.os }}-shared-fuzzer-cache" }
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
- name: pip install - name: pip install
shell: bash shell: bash
run: python3 -m pip install msgpack jinja2 find_libpython run: python3 -m pip install msgpack jinja2 find_libpython
@ -24,6 +21,6 @@ runs:
shell: bash shell: bash
run: export MAKEFLAGS="-j$(expr $(nproc) \+ 1)" run: export MAKEFLAGS="-j$(expr $(nproc) \+ 1)"
- name: install cargo-make - name: install cargo-make
uses: baptiste0928/cargo-install@v1.3.0 uses: baptiste0928/cargo-install@v3
with: with:
crate: cargo-make crate: cargo-make

View File

@ -6,10 +6,7 @@ runs:
- name: Install and cache deps - name: Install and cache deps
shell: bash shell: bash
run: sudo apt-get update && sudo apt-get install -y curl lsb-release wget software-properties-common gnupg ninja-build shellcheck pax-utils nasm libsqlite3-dev libc6-dev libgtk-3-dev gcc g++ gcc-arm-none-eabi gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev build-essential run: sudo apt-get update && sudo apt-get install -y curl lsb-release wget software-properties-common gnupg ninja-build shellcheck pax-utils nasm libsqlite3-dev libc6-dev libgtk-3-dev gcc g++ gcc-arm-none-eabi gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev build-essential
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
- name: Add stable clippy - name: Add stable clippy
shell: bash shell: bash
run: rustup toolchain install stable --component clippy --allow-downgrade run: rustup toolchain install stable --component clippy --allow-downgrade

View File

@ -3,13 +3,10 @@ description: Sets up the Rust environment for the CI workflow
runs: runs:
using: composite using: composite
steps: steps:
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@nightly
with: with:
profile: minimal
toolchain: nightly
components: llvm-tools, clippy, rustfmt components: llvm-tools, clippy, rustfmt
default: true - uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Build docs - name: Build docs
shell: pwsh shell: pwsh