Setup OneFuzz
This commit is contained in:
parent
d7f2a39aeb
commit
f39b092a5e
54
build/pipelines/fuzz.yml
Normal file
54
build/pipelines/fuzz.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
trigger: none
|
||||
# batch: true
|
||||
# branches:
|
||||
# include:
|
||||
# - main
|
||||
# paths:
|
||||
# exclude:
|
||||
# - docs/*
|
||||
# - samples/*
|
||||
# - tools/*
|
||||
|
||||
pr: none
|
||||
|
||||
# 0.0.yyMM.dd##
|
||||
# 0.0.1904.0900
|
||||
name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr)
|
||||
|
||||
stages:
|
||||
- stage: Build_Fuzz_Config
|
||||
displayName: Build Project
|
||||
dependsOn: []
|
||||
condition: succeeded()
|
||||
jobs:
|
||||
- template: ./templates/build-console-fuzzing.yml
|
||||
parameters:
|
||||
platform: Fuzzing
|
||||
- stage: OneFuzz
|
||||
displayName: OneFuzz
|
||||
dependsOn: ['Build_Fuzz_Config']
|
||||
jobs:
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
variables:
|
||||
- group: onefuzz-config
|
||||
steps:
|
||||
- bash: |
|
||||
set -ex
|
||||
cd examples/simple-libfuzzer
|
||||
make
|
||||
displayName: Build LibFuzzer
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '3.x'
|
||||
addToPath: true
|
||||
architecture: 'x64'
|
||||
displayName: Setup Python Env
|
||||
- bash: |
|
||||
set -ex
|
||||
pip -q install onefuzz
|
||||
onefuzz config --endpoint $(endpoint) --client_id $(client_id) --client_secret $(client_secret)
|
||||
onefuzz template libfuzzer basic OpenConsole OpenConsole $GITHUB_SHA --target_exe fuzz.exe
|
||||
displayName: Submit OneFuzz Job
|
||||
env:
|
||||
client_secret: client_secret
|
21
build/pipelines/templates/build-console-fuzzing.yml
Normal file
21
build/pipelines/templates/build-console-fuzzing.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
parameters:
|
||||
configuration: 'Fuzzing'
|
||||
platform: ''
|
||||
additionalBuildArguments: ''
|
||||
minimumExpectedTestsExecutedCount: 1 # Sanity check for minimum expected tests to be reported
|
||||
rerunPassesRequiredToAvoidFailure: 0
|
||||
|
||||
jobs:
|
||||
- job: Build${{ parameters.platform }}${{ parameters.configuration }}
|
||||
displayName: Build ${{ parameters.platform }} ${{ parameters.configuration }}
|
||||
variables:
|
||||
BuildConfiguration: ${{ parameters.configuration }}
|
||||
BuildPlatform: ${{ parameters.platform }}
|
||||
pool: "windevbuildagents"
|
||||
# The public pool is also an option!
|
||||
# pool: { vmImage: windows-2019 }
|
||||
|
||||
steps:
|
||||
- template: build-console-steps.yml
|
||||
parameters:
|
||||
additionalBuildArguments: ${{ parameters.additionalBuildArguments }}
|
|
@ -78,7 +78,7 @@
|
|||
<!-- In theory, we may want to build with a normal main() when Fuzzing is not enabled. -->
|
||||
<!-- So, let's only add the fuzzer to the link line when we're building for Fuzzing. -->
|
||||
<Link>
|
||||
<AdditionalDependencies>clang_rt.fuzzer-$(OCClangArchitectureName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>WinMM.Lib;clang_rt.fuzzer-$(OCClangArchitectureName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||
|
|
Loading…
Reference in a new issue