ci(fuzzing): migrate to RunsOn with ccache and bump container

Migrate the fuzzing workflow from GitHub-hosted ubuntu-latest to
RunsOn 4cpu with s3-cache. Bump the container from the stale
px4io/px4-dev:v1.16.0-rc2 to ghcr.io/px4/px4-dev:v1.17.0-rc2.

Wire setup-ccache / save-ccache with cache-key-prefix ccache-sitl
and max-size 300M, sharing the SITL build cache with checks:tests.
Both build px4_sitl_test/px4_sitl_default so the ccache contents
overlap significantly.

Drop the manual apt install clang step since the v1.17.0-rc2
container already ships clang. Replace the git config --global
safe.directory workaround with --system to match the repo convention.
Add runs-on/action@v2 for the S3 cache proxy. Add fetch-depth: 1
since the fuzzer doesn't need git history.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche 2026-04-10 06:39:36 -07:00
parent ae47d69f50
commit 0e31dd560d

View File

@ -12,19 +12,24 @@ env:
jobs: jobs:
Fuzzing: Fuzzing:
runs-on: ubuntu-latest runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
container: container:
image: px4io/px4-dev:v1.16.0-rc2-4-gb67c65bfe6 image: ghcr.io/px4/px4-dev:v1.17.0-rc2
steps: steps:
- name: Install Dependencies - uses: runs-on/action@v2
run: |
apt update && apt install -y clang
- name: Fix git in Container
run: |
git config --global --add safe.directory $(realpath .)
- uses: actions/checkout@v6 - uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Configure Git Safe Directory
run: git config --system --add safe.directory '*'
- uses: ./.github/actions/setup-ccache
id: ccache
with:
cache-key-prefix: ccache-sitl
max-size: 300M
- name: Build and Run Fuzz Tests - name: Build and Run Fuzz Tests
run: | run: |
@ -38,7 +43,11 @@ jobs:
./Tools/ci/run_fuzz_tests.sh $fuzz_binary 15m ./Tools/ci/run_fuzz_tests.sh $fuzz_binary 15m
done done
# Create a github issue in case of a failure - uses: ./.github/actions/save-ccache
if: always()
with:
cache-primary-key: ${{ steps.ccache.outputs.cache-primary-key }}
- name: Create Issue - name: Create Issue
if: ${{ failure() }} if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2 uses: JasonEtco/create-an-issue@v2