]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
CI: move fuzzer tests to separate composite action
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Thu, 13 Oct 2022 14:02:19 +0000 (15:02 +0100)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Thu, 13 Oct 2022 21:20:52 +0000 (22:20 +0100)
.github/actions/fuzzer/action.yml [new file with mode: 0644]
.github/workflows/ci.yml

diff --git a/.github/actions/fuzzer/action.yml b/.github/actions/fuzzer/action.yml
new file mode 100644 (file)
index 0000000..71c985f
--- /dev/null
@@ -0,0 +1,26 @@
+name: ci-tests-fuzzer
+
+runs:
+  using: composite
+
+  steps:
+
+    # Fuzz in parallel, aiming to keep to overall runtime of this job in line
+    # with other jobs in the CI workflow
+    - name: Run fuzzer tests
+      if: ${{ matrix.env.TEST_TYPE == 'fuzzing' }}
+      shell: bash
+      run: |
+        # For fuzzing we won't be needing eapol_test
+        mkdir -p build/tests/eapol_test
+        : > build/tests/eapol_test/eapol_test.mk
+        make -j `nproc` test.fuzzer FUZZER_TIMEOUT=720
+        find build/fuzzer -type f ! -path 'build/fuzzer/*.log' | grep . && exit 1 || :
+
+    - name: "Clang libFuzzer: Store assets on failure"
+      uses: actions/upload-artifact@v2
+      with:
+        name: clang-fuzzer
+        path: build/fuzzer
+        retention-days: 30
+      if: ${{ matrix.env.TEST_TYPE == 'fuzzing' && failure() }}
index 6469a36864d04670444e2fd90f101110c6cf2b16..05d0dae38dbe6f4f0ad809242eb116c5e72182d7 100644 (file)
@@ -177,24 +177,8 @@ jobs:
           rest_test_port: 8080
           rest_test_ssl_port: 8443
 
-      # Fuzz in parallel, aiming to keep to overall runtime of this job in line
-      # with other jobs in the CI workflow
-      - name: Run fuzzer tests
-        if: ${{ matrix.env.TEST_TYPE == 'fuzzing' }}
-        run: |
-          # For fuzzing we won't be needing eapol_test
-          mkdir -p build/tests/eapol_test
-          : > build/tests/eapol_test/eapol_test.mk
-          make -j `nproc` test.fuzzer FUZZER_TIMEOUT=720
-          find build/fuzzer -type f ! -path 'build/fuzzer/*.log' | grep . && exit 1 || :
-
-      - name: "Clang libFuzzer: Store assets on failure"
-        uses: actions/upload-artifact@v2
-        with:
-          name: clang-fuzzer
-          path: build/fuzzer
-          retention-days: 30
-        if: ${{ matrix.env.TEST_TYPE == 'fuzzing' && failure() }}
+      - name: Run fuzzer
+        uses: ./.github/actions/fuzzer
 
       #
       #  If the CI has failed and the branch is ci-debug then we start a tmate