Skip to content

Commit 284d251

Browse files
committed
Remove .travis.yml and add in an ossfuzz testing job
1 parent d304447 commit 284d251

File tree

3 files changed

+22
-29
lines changed

3 files changed

+22
-29
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- ubuntu-18.04
1616
tool:
1717
- mainline
18+
- ci_oss
1819
steps:
1920
- name: Install dependencies (Ubuntu)
2021
run: >-

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

ci_oss.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
PROJECT_NAME=curl
6+
7+
# Clone the oss-fuzz repository
8+
git clone https://github.com/google/oss-fuzz.git /tmp/ossfuzz
9+
10+
# Work out which branch to clone from, inside Docker
11+
BRANCH=${GITHUB_REF}
12+
13+
# Modify the oss-fuzz Dockerfile so that we're checking out the current reference on CI.
14+
sed -i "s@RUN git clone --depth 1 https://github.com/curl/curl-fuzzer.git /src/curl_fuzzer@RUN git config --global remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pull/*' \&\& git clone https://github.com/curl/curl-fuzzer.git /src/curl_fuzzer \&\& cd /src/curl_fuzzer \&\& git checkout -b ${BRANCH}@" /tmp/ossfuzz/projects/${PROJECT_NAME}/Dockerfile
15+
16+
# Try and build the fuzzers
17+
pushd /tmp/ossfuzz
18+
python3 infra/helper.py build_image --pull ${PROJECT_NAME}
19+
python3 infra/helper.py build_fuzzers ${PROJECT_NAME}
20+
python3 infra/helper.py check_build ${PROJECT_NAME} --engine libfuzzer --sanitizer address --architecture x86_64
21+
popd

0 commit comments

Comments
 (0)