-
-
Notifications
You must be signed in to change notification settings - Fork 193
CI for building the fuzzers #1183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 4 commits
0acc5bb
0f9bfee
c1792af
9ed2378
19bbb49
45b0ab3
29014ac
5615755
e90ea13
014d674
4c80e94
71f65e2
632671d
6f14393
63c9d34
82d40bf
43481c4
759ba38
18666a7
aaac524
2f03970
cdee9cf
54f3b08
0988767
03757e6
c4fbc00
11c7af8
75c20c5
a45e3e0
7c6ae7e
0a0930e
a65193c
5e91ee9
72da2f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,73 @@ | ||||||||||||||||||||||||||||||||||||||||||
| # 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: ${{ matrix.toolchain.name }} | ||||||||||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||||||||||||||
| toolchain: | ||||||||||||||||||||||||||||||||||||||||||
| - { runs_on: ubuntu-latest, name: "Clang 13 libc++", container: "ghcr.io/quick-lint/quick-lint-js-github-clang:v1", CC: clang-13, CXX: clang++-13, CFLAGS: "-stdlib=libc++", CMAKE_BUILD_TYPE: "Debug", } | ||||||||||||||||||||||||||||||||||||||||||
| - { runs_on: ubuntu-latest, name: "Clang 13 libstdc++", container: "ghcr.io/quick-lint/quick-lint-js-github-clang:v1", CC: clang-13, CXX: clang++-13, CFLAGS: "-stdlib=libstdc++", CMAKE_BUILD_TYPE: "Debug", } | ||||||||||||||||||||||||||||||||||||||||||
| - { runs_on: ubuntu-latest, name: "Clang 13 Release libc++", container: "ghcr.io/quick-lint/quick-lint-js-github-clang:v1", CC: clang-13, CXX: clang++-13, CFLAGS: "-stdlib=libc++", CMAKE_BUILD_TYPE: "Release", } | ||||||||||||||||||||||||||||||||||||||||||
| - { runs_on: ubuntu-latest, name: "Clang 13 Release libstdc++", container: "ghcr.io/quick-lint/quick-lint-js-github-clang:v1", CC: clang-13, CXX: clang++-13, CFLAGS: "-stdlib=libstdc++", CMAKE_BUILD_TYPE: "Release", } | ||||||||||||||||||||||||||||||||||||||||||
| runs-on: ${{ matrix.toolchain.runs_on }} | ||||||||||||||||||||||||||||||||||||||||||
| container: ${{ matrix.toolchain.container }} | ||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||
| CMAKE_BUILD_TYPE: ${{ matrix.toolchain.CMAKE_BUILD_TYPE }} | ||||||||||||||||||||||||||||||||||||||||||
| CMAKE_C_COMPILER: ${{ matrix.toolchain.CC }} | ||||||||||||||||||||||||||||||||||||||||||
| CMAKE_C_FLAGS: ${{ matrix.toolchain.CFLAGS }} | ||||||||||||||||||||||||||||||||||||||||||
| CMAKE_CXX_COMPILER: ${{ matrix.toolchain.CXX }} | ||||||||||||||||||||||||||||||||||||||||||
| CMAKE_CXX_FLAGS: ${{ matrix.toolchain.CFLAGS }} | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||
| - name: checkout | ||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - name: install dependencies (Homebrew) | ||||||||||||||||||||||||||||||||||||||||||
| if: ${{ matrix.toolchain.homebrew_packages }} | ||||||||||||||||||||||||||||||||||||||||||
| run: brew install ${{ matrix.toolchain.homebrew_packages }} | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - 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='-fsanitize=address,undefined,fuzzer-no-link $CMAKE_C_FLAGS' CXXFLAGS='-fsanitize=address,undefined,fuzzer-no-link $CMAKE_CXX_FLAGS' cmake -G Ninja -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DQUICK_LINT_JS_ENABLE_LLVM_LIBFUZZER_TESTS=ON .. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
| cd .. | ||||||||||||||||||||||||||||||||||||||||||
rol1510 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - name: build | ||||||||||||||||||||||||||||||||||||||||||
| run: ninja -C build | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - name: sample run | ||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||
| mkdir fuzz-tmp | ||||||||||||||||||||||||||||||||||||||||||
| ls build/fuzz/ | ||||||||||||||||||||||||||||||||||||||||||
| # try running every fuzzer for a very short time | ||||||||||||||||||||||||||||||||||||||||||
| for FILE in build/fuzz/quick-lint-js-fuzz-*; do echo running: $FILE; $FILE fuzz-tmp -runs=100 || exit 1; done | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
| Job trigger | Compile fuzzers | Run fuzzers | Acceptable? |
|---|---|---|---|
| PR | yes | no | OK |
| PR | yes | yes, fixed seed or corpus | OK |
| PR | yes | yes, random seed | BAD (introduces flakiness) |
| branch push | yes | no | OK |
| branch push | yes | yes, fixed seed or corpus | OK |
| branch push | yes | yes, random seed | BAD (introduces flakiness) |
| nightly | yes | no | BAD (PRs/branches do this already; waste of resources) |
| nightly | yes | yes, fixed seed or corpus | BAD (PRs/branches do this already; waste of resources) |
| nightly | yes | yes, random seed | OK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our CI is slow, and I don't want to add too many more slow jobs.
Let's cut this down to one build. Just "Clang 13 Release libstdc++" should be good.