diff --git a/.travis.yml b/.travis.yml index c9dc29b..a7a9f45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,28 +2,37 @@ language: cpp dist: xenial compiler: clang +branches: + only: + - master + stages: - name: Fuzzing -# if: type = cron jobs: include: - stage: Fuzzing - name: Continuous Fuzzing via Fuzzit (fuzzing daily) + name: Continuous Fuzzing via Fuzzit language: bash compiler: clang script: - - export CC=`which clang` - - export CXX=`which clang++` - - mkdir -p build - - cd build - - cmake .. -DCMAKE_BUILD_TYPE=AddressSanitizer - - make - - wget -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v1.2.5/fuzzit_1.2.5_Linux_x86_64 - - chmod a+x fuzzit - - ./fuzzit auth ${FUZZIT_AUTH_KEY} - - export TARGET_ID=Ba04ssna9qEd7bwN27Xz - - ./fuzzit create job --branch ${TRAVIS_BRANCH} --revision ${TRAVIS_COMMIT} ${TARGET_ID} ./fuzz/fuzz_test_string + - | + if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then + export FUZZING_TYPE="fuzzing" + else + export FUZZING_TYPE="sanity" + fi + export CC=`which clang` + export CXX=`which clang++` + mkdir -p build + cd build + cmake .. -DCMAKE_BUILD_TYPE=AddressSanitizer + make + wget -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v1.2.5/fuzzit_1.2.5_Linux_x86_64 + chmod a+x fuzzit + ./fuzzit auth ${FUZZIT_AUTH_KEY} + export TARGET_ID=Ba04ssna9qEd7bwN27Xz + ./fuzzit create job --type ${FUZZING_TYPE} --branch ${TRAVIS_BRANCH} --revision ${TRAVIS_COMMIT} ${TARGET_ID} ./fuzz/fuzz_test_string env: global: diff --git a/README.md b/README.md index 801df4e..76cc319 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build Status](https://travis-ci.org/fuzzitdev/example.svg?branch=master)](https://travis-ci.org/fuzzitdev/example) ![fuzzit](https://app.fuzzit.dev/badge?org_id=hP8u8bNAda91Cnj0mKPX&branch=master) # Continuous Fuzzing Example