From 7ad5a53debd723b188042805b441c1b52c3e9a97 Mon Sep 17 00:00:00 2001 From: Kyryl R Date: Thu, 29 Oct 2026 12:07:16 +0200 Subject: [PATCH] ci: restore fuzz workflow on supported runner --- .github/workflows/fuzz.yml | 27 ++++++++++++++------------- fuzz/fuzz.sh | 3 +-- fuzz/generate-files.sh | 27 ++++++++++++++------------- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 0f0ac0b1..0f21f20c 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -11,7 +11,7 @@ on: jobs: fuzz: if: ${{ !github.event.act }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -28,21 +28,22 @@ roundtrip_confidential, ] steps: - name: Install test dependencies - run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev + - uses: actions/checkout@v6 + - name: Set dependencies + run: cp Cargo-latest.lock Cargo.lock + - uses: actions/cache@v5 id: cache-fuzz with: path: | ~/.cargo/bin fuzz/target target - key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.74.0 - override: true - profile: minimal + key: cache-${{ matrix.fuzz_target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} + - name: Install Rust 1.74.0 + run: | + rustup toolchain install 1.74.0 --profile minimal + rustup default 1.74.0 - name: fuzz run: | if [[ "${{ matrix.fuzz_target }}" =~ ^bitcoin ]]; then @@ -51,7 +52,7 @@ roundtrip_confidential, echo "Using RUSTFLAGS $RUSTFLAGS" cd fuzz && ./fuzz.sh "${{ matrix.fuzz_target }}" - run: echo "${{ matrix.fuzz_target }}" >executed_${{ matrix.fuzz_target }} - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: executed_${{ matrix.fuzz_target }} path: executed_${{ matrix.fuzz_target }} @@ -61,8 +62,8 @@ roundtrip_confidential, needs: fuzz runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v6 + - uses: actions/download-artifact@v7 - name: Display structure of downloaded files run: ls -R - run: find executed_* -type f -exec cat {} + | sort > executed diff --git a/fuzz/fuzz.sh b/fuzz/fuzz.sh index 229a7072..fa86c3b9 100755 --- a/fuzz/fuzz.sh +++ b/fuzz/fuzz.sh @@ -18,11 +18,10 @@ fi cargo --version rustc --version -cargo update -p byteorder --precise 1.4.3 cargo update -p cc --precise 1.0.94 # Testing -cargo install --force honggfuzz --no-default-features +cargo install --force --version 0.5.57 --locked honggfuzz --no-default-features for targetFile in $targetFiles; do targetName=$(targetFileToName "$targetFile") echo "Fuzzing target $targetName ($targetFile)" diff --git a/fuzz/generate-files.sh b/fuzz/generate-files.sh index 5f62ae15..1ce66180 100755 --- a/fuzz/generate-files.sh +++ b/fuzz/generate-files.sh @@ -50,7 +50,7 @@ on: jobs: fuzz: if: \${{ !github.event.act }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -59,21 +59,22 @@ $(for name in $(listTargetNames); do echo "$name,"; done) ] steps: - name: Install test dependencies - run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev + - uses: actions/checkout@v6 + - name: Set dependencies + run: cp Cargo-latest.lock Cargo.lock + - uses: actions/cache@v5 id: cache-fuzz with: path: | ~/.cargo/bin fuzz/target target - key: cache-\${{ matrix.target }}-\${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.74.0 - override: true - profile: minimal + key: cache-\${{ matrix.fuzz_target }}-\${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} + - name: Install Rust 1.74.0 + run: | + rustup toolchain install 1.74.0 --profile minimal + rustup default 1.74.0 - name: fuzz run: | if [[ "\${{ matrix.fuzz_target }}" =~ ^bitcoin ]]; then @@ -82,7 +83,7 @@ $(for name in $(listTargetNames); do echo "$name,"; done) echo "Using RUSTFLAGS \$RUSTFLAGS" cd fuzz && ./fuzz.sh "\${{ matrix.fuzz_target }}" - run: echo "\${{ matrix.fuzz_target }}" >executed_\${{ matrix.fuzz_target }} - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: executed_\${{ matrix.fuzz_target }} path: executed_\${{ matrix.fuzz_target }} @@ -92,8 +93,8 @@ $(for name in $(listTargetNames); do echo "$name,"; done) needs: fuzz runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v6 + - uses: actions/download-artifact@v7 - name: Display structure of downloaded files run: ls -R - run: find executed_* -type f -exec cat {} + | sort > executed