Ossfuzz build #210
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Ossfuzz build" | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: "27 2 * * 1" | |
| workflow_call: | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Prepare | |
| run: | | |
| git clone --depth 1 https://github.com/madler/zlib.git zlib | |
| git clone --depth 1 https://github.com/tbeu/matio.git matio | |
| git clone --depth 1 --branch hdf5_2_1_1 https://github.com/HDFGroup/hdf5.git hdf5 | |
| git clone --depth 1 https://git.code.sf.net/p/matio/matio_test_datasets matio_test_datasets | |
| - name: Test ossfuzz build script | |
| run: | | |
| mkdir -p work | |
| cd matio | |
| rm ./ossfuzz/*_fuzzer.cpp | |
| sudo -E ./ossfuzz/build.sh | |
| env: | |
| CFLAGS: -g -Wno-unused-function | |
| LIB_FUZZING_ENGINE: DUMMY | |
| SRC: ${{ github.workspace }} | |
| OUT: ${{ github.workspace }} | |
| WORK: ${{ github.workspace }}/work | |
| cifuzz: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Build Fuzzers | |
| id: build | |
| uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master | |
| with: | |
| oss-fuzz-project-name: 'matio' | |
| language: c++ | |
| - name: Run Fuzzers | |
| uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master | |
| with: | |
| oss-fuzz-project-name: 'matio' | |
| language: c++ | |
| fuzz-seconds: 600 | |
| - name: Upload Crash | |
| uses: actions/upload-artifact@v7 | |
| if: failure() && steps.build.outcome == 'success' | |
| with: | |
| name: artifacts | |
| path: ./out/artifacts |