terminal/build/pipelines/fuzz.yml

62 lines
2.1 KiB
YAML
Raw Normal View History

2021-11-18 22:27:09 +01:00
trigger:
batch: true
branches:
include:
- main
paths:
exclude:
- docs/*
- samples/*
- tools/*
2021-06-09 00:01:25 +02:00
pr: none
# 0.0.yyMM.dd##
# 0.0.1904.0900
name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr)
2021-06-12 02:06:12 +02:00
stages:
2021-06-14 20:36:10 +02:00
- stage: Build_Fuzz_Config
displayName: Build Fuzzers
2021-06-12 02:06:12 +02:00
dependsOn: []
condition: succeeded()
jobs:
2021-06-12 02:12:48 +02:00
- template: ./templates/build-console-fuzzing.yml
parameters:
platform: x64
2021-06-14 20:36:10 +02:00
- stage: OneFuzz
2021-06-23 20:55:35 +02:00
displayName: Submit OneFuzz Job
2021-06-14 20:36:10 +02:00
dependsOn: ['Build_Fuzz_Config']
condition: succeeded()
pool:
vmImage: 'ubuntu-latest'
2021-06-14 20:59:10 +02:00
variables:
2021-06-23 20:55:35 +02:00
artifactName: drop
2021-06-14 20:36:10 +02:00
jobs:
- job:
2021-06-12 02:06:12 +02:00
steps:
2021-06-14 20:59:10 +02:00
- task: DownloadBuildArtifacts@0
inputs:
2021-06-23 20:55:35 +02:00
artifactName: $(artifactName)
downloadPath: $(Build.ArtifactStagingDirectory)
2021-06-12 02:06:12 +02:00
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
addToPath: true
architecture: 'x64'
- bash: |
set -ex
pip -q install onefuzz
2021-11-23 22:13:41 +01:00
onefuzz config --endpoint $(endpoint) --client_id $(client_id) --authority $(authority) --tenant_domain $(tenant_domain) --client_secret $(client_secret)
2021-11-23 20:59:52 +01:00
sed -i s/INSERT_PAT_HERE/${ado_pat}/ build/Fuzz/notifications-ado.json
sed -i s/INSERT_ASSIGNED_HERE/${ado_assigned_to}/ build/Fuzz/notifications-ado.json
2021-06-23 20:55:35 +02:00
displayName: Configure OneFuzz
2021-11-23 20:44:44 +01:00
# replace the bash command below with this to run this with notifications
2021-11-23 21:22:49 +01:00
# onefuzz template libfuzzer basic --colocate_all_tasks --vm_count 1 --target_exe $target_exe_path --notification_config build/Fuzz/notifications-ado.json OpenConsole $test_name $(Build.SourceVersion) windows
2021-06-23 20:55:35 +02:00
- bash: |
2021-11-23 21:22:49 +01:00
onefuzz template libfuzzer basic --colocate_all_tasks --vm_count 1 --target_exe $target_exe_path OpenConsole $test_name $(Build.SourceVersion) windows
2021-06-12 02:06:12 +02:00
displayName: Submit OneFuzz Job
env:
2021-06-23 20:55:35 +02:00
target_exe_path: $(Build.ArtifactStagingDirectory)/$(artifactName)/Fuzzing/x64/test/OpenConsoleFuzzer.exe
test_name: WriteCharsLegacy