CI for building the fuzzers #19
Workflow file for this run
This file contains 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
# Copyright (C) 2020 Matthew Glazar | |
# See end of file for extended copyright information. | |
name: build the fuzzers | |
on: | |
push: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
build: | |
name: "Clang 13 Release libstdc++" | |
runs-on: ubuntu-latest | |
container: "ghcr.io/quick-lint/quick-lint-js-github-clang:v1" | |
env: | |
CMAKE_BUILD_TYPE: "Release" | |
CMAKE_C_COMPILER: "clang-13" | |
CMAKE_C_FLAGS: "-fsanitize=address,undefined,fuzzer-no-link -stdlib=libstdc++" | |
CMAKE_CXX_COMPILER: "clang++-13" | |
CMAKE_CXX_FLAGS: "-fsanitize=address,undefined,fuzzer-no-link" | |
steps: | |
- name: checkout | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- name: configure | |
run: | | |
env | grep '^ASAN_OPTIONS\|^CMAKE\|^QUICK_LINT_JS' | sort | |
mkdir build | |
cd build | |
CC=$CMAKE_C_COMPILER CXX=$CMAKE_CXX_COMPILER CFLAGS=$CMAKE_C_FLAGS CXXFLAGS=$CMAKE_CXX_FLAGS cmake -G Ninja -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DBUILD_TESTING=NO -DQUICK_LINT_JS_ENABLE_LLVM_LIBFUZZER_TESTS=ON .. | |
shell: bash | |
- name: build | |
run: ninja -C build quick-lint-js-fuzz-lex | |
- name: setup cache | |
id: cache-corpus | |
uses: actions/cache@v4 | |
with: | |
path: corpus | |
key: fuzz-corpus-${{ github.run_id }} | |
restore-keys: | | |
fuzz-corpus | |
# - name: unpack corpus | |
# run: | | |
# ls . | |
# tar -xJf corpus.tar.xz | |
- name: run | |
run: | | |
mkdir -p corpus/test | |
# for FILE in build/fuzz/quick-lint-js-fuzz-*; do echo running: $FILE; $FILE fuzz-tmp -runs=100 || exit 1; done | |
./build/fuzz/quick-lint-js-fuzz-lex corpus/test -max_total_time=5 -verbosity=0 | |
# - name: package corpus | |
# run: tar -cJf corpus.tar.xz corpus/* | |
# - name: save corpus | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: fuzz-corpus-test | |
# path: corpus.tar.xz | |
# quick-lint-js finds bugs in JavaScript programs. | |
# Copyright (C) 2020 Matthew Glazar | |
# | |
# This file is part of quick-lint-js. | |
# | |
# quick-lint-js is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# quick-lint-js is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with quick-lint-js. If not, see <https://www.gnu.org/licenses/>. |