Merge pull request #886 from pjbgf/fuzz-update
fuzz: Fuzz optimisations
This commit is contained in:
commit
6a560d94e4
|
@ -21,12 +21,15 @@ jobs:
|
|||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18.x
|
||||
- id: go-env
|
||||
run: |
|
||||
echo "::set-output name=go-mod-cache::$(go env GOMODCACHE)"
|
||||
- name: Restore Go cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /home/runner/work/_temp/_github_home/go/pkg/mod
|
||||
path: ${{ steps.go-env.outputs.go-mod-cache }}
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
${{ runner.os }}-go
|
||||
- name: Smoke test Fuzzers
|
||||
run: make fuzz-smoketest
|
||||
|
|
3
Makefile
3
Makefile
|
@ -234,7 +234,7 @@ fuzz-build: $(LIBGIT2)
|
|||
rm -rf $(BUILD_DIR)/fuzz/
|
||||
mkdir -p $(BUILD_DIR)/fuzz/out/
|
||||
|
||||
docker build . --tag local-fuzzing:latest -f tests/fuzz/Dockerfile.builder
|
||||
docker build . --pull --tag local-fuzzing:latest -f tests/fuzz/Dockerfile.builder
|
||||
docker run --rm \
|
||||
-e FUZZING_LANGUAGE=go -e SANITIZER=address \
|
||||
-e CIFUZZ_DEBUG='True' -e OSS_FUZZ_PROJECT_NAME=fluxcd \
|
||||
|
@ -244,6 +244,7 @@ fuzz-build: $(LIBGIT2)
|
|||
fuzz-smoketest: fuzz-build
|
||||
docker run --rm \
|
||||
-v "$(BUILD_DIR)/fuzz/out":/out \
|
||||
-v "$(shell go env GOMODCACHE):/root/go/pkg/mod" \
|
||||
-v "$(shell pwd)/tests/fuzz/oss_fuzz_run.sh":/runner.sh \
|
||||
local-fuzzing:latest \
|
||||
bash -c "/runner.sh"
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
FROM golang:1.18 AS go
|
||||
|
||||
FROM gcr.io/oss-fuzz-base/base-builder-go
|
||||
|
||||
# ensures golang 1.18 to enable go native fuzzing.
|
||||
COPY --from=go /usr/local/go /usr/local/
|
||||
FROM gcr.io/oss-fuzz-base/base-builder-go-codeintelligencetesting
|
||||
|
||||
COPY ./ $GOPATH/src/github.com/fluxcd/source-controller/
|
||||
COPY ./tests/fuzz/oss_fuzz_build.sh $SRC/build.sh
|
||||
|
|
Loading…
Reference in New Issue