summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-12-08 11:31:39 +0700
committerhathach <[email protected]>2022-12-08 11:31:39 +0700
commitbf8f4f95211c286d1ff1def3f140e1e304e76b4d (patch)
treee43598d9befd114f2c232c272530054eaf2e08f2 /.github
parent86a3315bcf981642b05c9d8388647cbe90a21251 (diff)
move build Fuzzer into pre-commit
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_fuzzers.yml37
-rw-r--r--.github/workflows/pre-commit.yml19
2 files changed, 18 insertions, 38 deletions
diff --git a/.github/workflows/build_fuzzers.yml b/.github/workflows/build_fuzzers.yml
deleted file mode 100644
index efa4cc9c0..000000000
--- a/.github/workflows/build_fuzzers.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: Build Fuzzer
-
-on:
- pull_request:
- push:
- release:
- types:
- - created
-
-jobs:
- # ---------------------------------------
- # Build all no-family (orphaned) boards
- # ---------------------------------------
- build-board:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- fuzz_harness:
- - "device/cdc"
- - "device/msc"
- - "device/net"
-
- steps:
- - name: Setup Python
- uses: actions/setup-python@v3
-
- - name: Checkout TinyUSB
- uses: actions/checkout@v3
-
- - name: Fetch deps
- run: |
- sudo apt update && sudo apt install libc++abi-dev libc++-dev
- make CC=clang CXX=clang++ -C test/fuzz/${{ matrix.fuzz_harness }} get-deps
-
- - name: Build Fuzzer
- run: make CC=clang CXX=clang++ -C test/fuzz/${{ matrix.fuzz_harness }}
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index 96a59069b..ff52606e3 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -34,4 +34,21 @@ jobs:
# Install Ceedling
gem install ceedling
cd test/unit-test
- ceedling test:all \ No newline at end of file
+ ceedling test:all
+
+ - name: Fetch deps
+ run: |
+ sudo apt update && sudo apt install libc++abi-dev libc++-dev
+ fuzz_harness=$(ls -d test/fuzz/device/*/ test/fuzz/host/*/)
+ for h in $fuzz_harness
+ do
+ make $h get-deps
+ done
+
+ - name: Build Fuzzer
+ run: |
+ fuzz_harness=$(ls -d test/fuzz/device/*/ test/fuzz/host/*/)
+ for h in $fuzz_harness
+ do
+ make $h all
+ done