Last fuzzing PR for a while hopefully (#929)

This commit is contained in:
Auguste Rame 2023-01-22 03:30:10 -05:00 committed by GitHub
parent 211a852efc
commit 7b35c6e5eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 17 deletions

View File

@ -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

View File

@ -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