@@ -46,66 +46,70 @@ extends:
4646 stages :
4747 - stage : Build
4848 jobs :
49- - job : DeployToOneFuzz
50- displayName : Build & Deploy to OneFuzz
51- timeoutInMinutes : 120
52- pool :
53- name : $(DncEngInternalBuildPool)
54- demands : ImageOverride -equals windows.vs2026.amd64
49+ - template : .azure/pipelines/jobs/default-build.yml@self
50+ parameters :
51+ jobName : DeployToOneFuzz
52+ jobDisplayName : Build & Deploy to OneFuzz
53+ timeoutInMinutes : 120
54+ agentOs : Windows
55+ steps :
56+ - script : git submodule update --init
57+ displayName : Update submodules
5558
56- steps :
57- - checkout : self
58- clean : true
59- fetchDepth : 1
60- fetchTags : false
59+ # The SharpFuzz CLI currently targets .NET 10.0
60+ # Install a .NET 10.0 runtime.
61+ - task : UseDotNet@2
62+ displayName : Install .NET 10.0 (for SharpFuzz CLI)
63+ inputs :
64+ packageType : runtime
65+ version : 10.x
66+ installationPath : $(Build.SourcesDirectory)/.dotnet
6167
62- # The SharpFuzz CLI currently targets .NET 9.0 and won't run under
63- # the repo-local .NET SDK. Install a system-wide .NET 9.0 SDK.
64- - powershell : |
65- winget install -e --id Microsoft.DotNet.SDK.9 --accept-package-agreements --accept-source-agreements
66- displayName: Install .NET 9.0 (for SharpFuzz CLI)
68+ - script : ./eng/build.cmd
69+ displayName : Build repo
6770
68- # Restore and build the fuzzing project using the repo-local SDK.
69- - powershell : |
70- . $(Build.SourcesDirectory)/activate.ps1
71- cd $(fuzzerProject)
72- dotnet build-server shutdown
73- dotnet build -c Release
74- displayName: Build Fuzzing targets
71+ # Restore and build the fuzzing project using the repo-local SDK.
72+ - powershell : |
73+ . $(Build.SourcesDirectory)/activate.ps1
74+ cd $(fuzzerProject)
75+ dotnet build-server shutdown
76+ dotnet build -c Release
77+ displayName: Build Fuzzing targets
7578
76- # Install SharpFuzz.CommandLine as a local tool for instrumenting assemblies.
77- - powershell : |
78- cd $(fuzzerProject)
79- dotnet tool install --tool-path . SharpFuzz.CommandLine
80- displayName: Install SharpFuzz.CommandLine
79+ # Install SharpFuzz.CommandLine as a local tool for instrumenting assemblies.
80+ - powershell : |
81+ cd $(fuzzerProject)
82+ dotnet tool install --tool-path . SharpFuzz.CommandLine --version 2.3.0
83+ displayName: Install SharpFuzz.CommandLine
8184
82- # Run the prepare-onefuzz command to create per-fuzzer deployment directories
83- # with instrumented assemblies, libfuzzer-dotnet.exe, and OneFuzzConfig.json.
84- - powershell : |
85- cd $(fuzzerProject)
86- ./run.bat
87- displayName: Prepare OneFuzz deployment
85+ # Run the prepare-onefuzz command to create per-fuzzer deployment directories
86+ # with instrumented assemblies, libfuzzer-dotnet.exe, and OneFuzzConfig.json.
87+ - powershell : |
88+ . $(Build.SourcesDirectory)/activate.ps1
89+ cd $(fuzzerProject)
90+ ./run.bat
91+ displayName: Prepare OneFuzz deployment
8892
89- # OneFuzz can't currently handle a single deployment where multiple jobs
90- # share similar assemblies/pdbs. As a workaround, we emit a task for every
91- # fuzzing target individually.
92- # https://fuzzfest.visualstudio.com/Onefuzz/_workitems/edit/191504/
93- #
94- # When the above issue is fixed, replace these individual tasks with:
95- # - task: onefuzz-task@0
96- # inputs:
97- # onefuzzOSes: 'Windows'
98- # env:
99- # onefuzzDropDirectory: $(fuzzerProject)/deployment
100- # SYSTEM_ACCESSTOKEN: $(System.AccessToken)
101- # displayName: Send all fuzzers to OneFuzz
93+ # OneFuzz can't currently handle a single deployment where multiple jobs
94+ # share similar assemblies/pdbs. As a workaround, we emit a task for every
95+ # fuzzing target individually.
96+ # https://fuzzfest.visualstudio.com/Onefuzz/_workitems/edit/191504/
97+ #
98+ # When the above issue is fixed, replace these individual tasks with:
99+ # - task: onefuzz-task@0
100+ # inputs:
101+ # onefuzzOSes: 'Windows'
102+ # env:
103+ # onefuzzDropDirectory: $(fuzzerProject)/deployment
104+ # SYSTEM_ACCESSTOKEN: $(System.AccessToken)
105+ # displayName: Send all fuzzers to OneFuzz
102106
103107# ONEFUZZ_TASK_WORKAROUND_START
104- - task : onefuzz-task@0
105- inputs :
106- onefuzzOSes : ' Windows'
107- env :
108- onefuzzDropDirectory : $(fuzzerProject)/deployment/MultipartReaderFuzzer
109- SYSTEM_ACCESSTOKEN : $(System.AccessToken)
110- displayName : Send MultipartReaderFuzzer to OneFuzz
108+ - task : onefuzz-task@0
109+ inputs :
110+ onefuzzOSes : ' Windows'
111+ env :
112+ onefuzzDropDirectory : $(fuzzerProject)/deployment/MultipartReaderFuzzer
113+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
114+ displayName : Send MultipartReaderFuzzer to OneFuzz
111115# ONEFUZZ_TASK_WORKAROUND_END
0 commit comments