.github: enable fuzz build

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu 2023-09-01 09:29:23 +08:00
parent a943033a8b
commit a3e8503ed2
2 changed files with 28 additions and 44 deletions

View File

@ -4,49 +4,33 @@ permissions: # added using https://github.com/step-security/secure-workflows
contents: read contents: read
jobs: jobs:
# ci_fuzz is temporarily disabled as it is not compatible with recent Go: # Run all fuzzing tests. Some of them use Go 1.18's testing.F.
# # Others use https://github.com/AdaLogics/go-fuzz-headers.
##### ci_fuzz:
# >github.com/containerd/containerd/contrib/apparmor name: CI Fuzz
# >github.com/containerd/containerd/contrib/apparmor if: github.repository == 'containerd/containerd'
# >Running go-fuzz -tags gofuzz -func FuzzLoadDefaultProfile -o fuzz_FuzzLoadDefaultProfile.a github.com/containerd/containerd/contrib/apparmor runs-on: ubuntu-latest
# >/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25 timeout-minutes: 60
# >fuzz_FuzzLoadDefaultProfile.a(000021.o): in function `_cgo_9c8efe9babca_C2func_res_search': steps:
# >cgo_unix_cgo_res.cgo2.c:(.text+0x32): undefined reference to `__res_search' - name: Build Fuzzers
# >/usr/bin/ld: fuzz_FuzzLoadDefaultProfile.a(000021.o): in function `_cgo_9c8efe9babca_Cfunc_res_search': id: build
# >cgo_unix_cgo_res.cgo2.c:(.text+0x81): undefined reference to `__res_search' uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
# >clang-15: error: linker command failed with exit code 1 (use -v to see invocation) with:
# >2023-08-11 14:25:45,433 - root - ERROR - Building fuzzers failed. oss-fuzz-project-name: 'containerd'
# >2023-08-11 14:25:45,433 - root - ERROR - Error building fuzzers for (commit: 432d86b87f75cc8ddf8f8101a5540eb206ffc894, pr_ref: refs/pull/8957/merge). language: go
##### - name: Run Fuzzers
# uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
# # Run all fuzzing tests. Some of them use Go 1.18's testing.F. with:
# # Others use https://github.com/AdaLogics/go-fuzz-headers. oss-fuzz-project-name: 'containerd'
# ci_fuzz: fuzz-seconds: 300
# name: CI Fuzz language: go
# if: github.repository == 'containerd/containerd' continue-on-error: true
# runs-on: ubuntu-latest - name: Upload Crash
# timeout-minutes: 60 uses: actions/upload-artifact@v1
# steps: if: failure() && steps.build.outcome == 'success'
# - name: Build Fuzzers with:
# id: build name: artifacts
# uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master path: ./out/artifacts
# with:
# oss-fuzz-project-name: 'containerd'
# language: go
# - name: Run Fuzzers
# uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
# with:
# oss-fuzz-project-name: 'containerd'
# fuzz-seconds: 300
# language: go
# continue-on-error: true
# - name: Upload Crash
# uses: actions/upload-artifact@v1
# if: failure() && steps.build.outcome == 'success'
# with:
# name: artifacts
# path: ./out/artifacts
# Make sure all fuzzing tests which use Go 1.18's testing.F are # Make sure all fuzzing tests which use Go 1.18's testing.F are
# runnable with go test -fuzz. # runnable with go test -fuzz.

View File

@ -101,4 +101,4 @@ cp $SRC/containerd/contrib/fuzz/*.options $OUT/
cp $SRC/containerd/contrib/fuzz/*.dict $OUT/ cp $SRC/containerd/contrib/fuzz/*.dict $OUT/
# Resume CXXFLAGS # Resume CXXFLAGS
export CXXFLAGS=$OLDCXXFLAGS export CXXFLAGS=$OLDCXXFLAGS