From 7b35c6e5ebdde6dfa25295ac4480872feb8f4273 Mon Sep 17 00:00:00 2001 From: Auguste Rame <19855629+SuperAuguste@users.noreply.github.com> Date: Sun, 22 Jan 2023 03:30:10 -0500 Subject: [PATCH] Last fuzzing PR for a while hopefully (#929) --- .github/workflows/fuzz.yml | 16 +++++++++++++++- .github/workflows/main.yml | 16 ---------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 7356fd8..b1312a0 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -1,7 +1,11 @@ name: Sus Fuzzing on: + pull_request: + types: [labeled, synchronize] push: + paths: + - "**.zig" branches: - master schedule: @@ -15,6 +19,7 @@ on: jobs: fuzz: + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'pr:fuzz') runs-on: ubuntu-latest steps: @@ -23,6 +28,16 @@ jobs: with: swap-size-gb: 10 + - name: Default fuzzing duration + if: github.event_name != 'pull_request' + run: | + FUZZING_DURATION=${{ github.event.inputs.fuzzing_duration }} + + - name: PR fuzzing duration + if: github.event_name == 'pull_request' + run: | + FUZZING_DURATION=15m + - name: Grab zig uses: goto-bus-stop/setup-zig@v1 with: @@ -69,7 +84,6 @@ jobs: continue-on-error: true run: | cd $GITHUB_WORKSPACE/sus - FUZZING_DURATION=${{ github.event.inputs.fuzzing_duration }} { sleep ${FUZZING_DURATION:-1h}; pkill -9 sus; } & ./zig-out/bin/sus $GITHUB_WORKSPACE/zls/zig-out/bin/zls markov $GITHUB_WORKSPACE/zig/lib/std diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2df721f..5ad4166 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -122,19 +122,3 @@ jobs: REMOTE_HOST: ${{ secrets.WEBSITE_DEPLOY_HOST }} REMOTE_USER: ${{ secrets.WEBSITE_DEPLOY_USER }} TARGET: ${{ secrets.WEBSITE_DEPLOY_FOLDER }} - - - name: Instruct fuzzing server to pull latest zls - if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' && github.repository_owner == 'zigtools' }} - uses: appleboy/ssh-action@v0.1.7 - with: - host: fuzzing.zigtools.org - username: ${{ secrets.FUZZING_SSH_USERNAME }} - key: ${{ secrets.FUZZING_SSH_PRIVKEY }} - script: | - systemctl stop fuzzing - systemctl stop fuzzing-web - cd /root/sus - ./script/setup.sh - systemctl start fuzzing - sleep 5s - systemctl start fuzzing-web