Skip to content

Commit 09c74bf

Browse files
authored
Add more OneFuzz pipelines (#557)
1 parent 0364e61 commit 09c74bf

3 files changed

Lines changed: 262 additions & 18 deletions

File tree

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
#
4+
# https://go.microsoft.com/fwlink/?LinkId=248929
5+
6+
# Builds the library using CMake and submit for file fuzzing for audio formats
7+
8+
schedules:
9+
- cron: "0 11 10 * *"
10+
displayName: 'Submit for File Fuzzing (Monthly)'
11+
branches:
12+
include:
13+
- main
14+
always: true
15+
16+
trigger: none
17+
pr: none
18+
19+
resources:
20+
repositories:
21+
- repository: self
22+
type: git
23+
ref: refs/heads/main
24+
- repository: testRepo
25+
name: walbourn/directxtktest
26+
type: github
27+
endpoint: microsoft
28+
ref: refs/heads/main
29+
30+
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
31+
32+
variables:
33+
Codeql.Enabled: false
34+
VS_GENERATOR: 'Visual Studio 17 2022'
35+
WIN11_SDK: '10.0.22000.0'
36+
37+
pool:
38+
vmImage: windows-2022
39+
40+
jobs:
41+
- job: FUZZ_BUILD
42+
displayName: 'Build for file fuzzing (WAV, XWB)'
43+
steps:
44+
- checkout: self
45+
clean: true
46+
fetchTags: false
47+
fetchDepth: 1
48+
path: 's'
49+
- checkout: testRepo
50+
displayName: Fetch Tests
51+
clean: true
52+
fetchTags: false
53+
fetchDepth: 1
54+
path: 's/Tests'
55+
- task: CMake@1
56+
displayName: 'CMake (MSVC): Config with ASan'
57+
inputs:
58+
cwd: $(Build.SourcesDirectory)
59+
cmakeArgs: >
60+
-G "$(VS_GENERATOR)" -A x64 -B out
61+
-DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)
62+
-DBUILD_TOOLS=OFF -DBUILD_XAUDIO_WIN10=ON -DBUILD_FUZZING=ON -DBUILD_TESTING=OFF
63+
-DBUILD_AUDIO_FUZZING=ON
64+
- task: CMake@1
65+
displayName: 'CMake (MSVC): Build with ASan'
66+
inputs:
67+
cwd: $(Build.SourcesDirectory)
68+
cmakeArgs: --build out -v --config RelWithDebInfo
69+
- task: CopyFiles@2
70+
displayName: Copy fuzzer
71+
inputs:
72+
Contents: |
73+
build\OneFuzzConfig.json
74+
out\bin\RelWithDebInfo\fuzzloaders.exe
75+
TargetFolder: .drop
76+
OverWrite: true
77+
flattenFolders: true
78+
- task: CopyFiles@2
79+
displayName: Copy symbols
80+
inputs:
81+
Contents: |
82+
out\bin\RelWithDebInfo\fuzzloaders.pdb
83+
TargetFolder: .drop\symbols
84+
OverWrite: true
85+
flattenFolders: true
86+
- task: CopyFiles@2
87+
displayName: Copy seed files
88+
inputs:
89+
Contents: |
90+
Tests\BasicAudioTest\Alarm01.wav
91+
Tests\BasicAudioTest\Alarm01_adpcm.wav
92+
Tests\BasicAudioTest\Alarm01_float.wav
93+
Tests\BasicAudioTest\Alarm01_xwma.wav
94+
Tests\BasicAudioTest\ADPCMdroid.xwb
95+
Tests\BasicAudioTest\wavebank.xwb
96+
Tests\BasicAudioTest\xwmadroid.xwb
97+
TargetFolder: .drop\seeds
98+
OverWrite: true
99+
flattenFolders: true
100+
101+
- task: PowerShell@2
102+
displayName: Copy OneFuzz setup script
103+
inputs:
104+
targetType: 'inline'
105+
script: |
106+
Copy-Item -Path .\build\onefuzz-setup.ps1 -Destination .drop/setup.ps1
107+
108+
- task: MSBuild@1
109+
displayName: 'Copy ASan binaries'
110+
inputs:
111+
solution: build/CopyASAN.targets
112+
msbuildArguments: /p:TargetFolder=$(Build.SourcesDirectory)\.drop
113+
msbuildVersion: 17.0
114+
msbuildArchitecture: x64
115+
- task: PowerShell@2
116+
displayName: List drop files
117+
inputs:
118+
targetType: inline
119+
script: |
120+
Get-ChildItem ".drop" -Recurse | select FullName
121+
122+
- task: onefuzz-task@0
123+
displayName: 'Submit to OneFuzz'
124+
inputs:
125+
onefuzzOSes: 'Windows'
126+
env:
127+
onefuzzDropDirectory: $(Build.SourcesDirectory)\.drop
128+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
#
4+
# https://go.microsoft.com/fwlink/?LinkId=248929
5+
6+
# Builds the library using CMake and submit for file fuzzing for meshes
7+
8+
schedules:
9+
- cron: "0 11 20 * *"
10+
displayName: 'Submit for File Fuzzing (Monthly)'
11+
branches:
12+
include:
13+
- main
14+
always: true
15+
16+
trigger: none
17+
pr: none
18+
19+
resources:
20+
repositories:
21+
- repository: self
22+
type: git
23+
ref: refs/heads/main
24+
- repository: testRepo
25+
name: walbourn/directxtktest
26+
type: github
27+
endpoint: microsoft
28+
ref: refs/heads/main
29+
30+
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
31+
32+
variables:
33+
Codeql.Enabled: false
34+
VS_GENERATOR: 'Visual Studio 17 2022'
35+
WIN11_SDK: '10.0.22000.0'
36+
37+
pool:
38+
vmImage: windows-2022
39+
40+
jobs:
41+
- job: FUZZ_BUILD
42+
displayName: 'Build for file fuzzing (CMO, SDKMESH, VBO)'
43+
steps:
44+
- checkout: self
45+
clean: true
46+
fetchTags: false
47+
fetchDepth: 1
48+
path: 's'
49+
- checkout: testRepo
50+
displayName: Fetch Tests
51+
clean: true
52+
fetchTags: false
53+
fetchDepth: 1
54+
path: 's/Tests'
55+
- task: CMake@1
56+
displayName: 'CMake (MSVC): Config with ASan'
57+
inputs:
58+
cwd: $(Build.SourcesDirectory)
59+
cmakeArgs: >
60+
-G "$(VS_GENERATOR)" -A x64 -B out
61+
-DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)
62+
-DBUILD_TOOLS=OFF -DBUILD_XAUDIO_WIN10=ON -DBUILD_FUZZING=ON -DBUILD_TESTING=OFF
63+
-DBUILD_MESH_FUZZING=ON
64+
- task: CMake@1
65+
displayName: 'CMake (MSVC): Build with ASan'
66+
inputs:
67+
cwd: $(Build.SourcesDirectory)
68+
cmakeArgs: --build out -v --config RelWithDebInfo
69+
- task: CopyFiles@2
70+
displayName: Copy fuzzer
71+
inputs:
72+
Contents: |
73+
build\OneFuzzConfig.json
74+
out\bin\RelWithDebInfo\fuzzloaders.exe
75+
TargetFolder: .drop
76+
OverWrite: true
77+
flattenFolders: true
78+
- task: CopyFiles@2
79+
displayName: Copy symbols
80+
inputs:
81+
Contents: |
82+
out\bin\RelWithDebInfo\fuzzloaders.pdb
83+
TargetFolder: .drop\symbols
84+
OverWrite: true
85+
flattenFolders: true
86+
- task: CopyFiles@2
87+
displayName: Copy seed files
88+
inputs:
89+
Contents: |
90+
Tests\AnimTest\teapot.cmo
91+
Tests\DGSLTest\teapot_unlit.cmo
92+
Tests\ModelTest\cup.sdkmesh
93+
Tests\AnimTest\soldier.sdkmesh
94+
Tests\PBRModelTest\BrokenCube.sdkmesh
95+
Tests\ModelTest\player_ship_a.vbo
96+
Tests\PBRTest\BrokenCube.vbo
97+
TargetFolder: .drop\seeds
98+
OverWrite: true
99+
flattenFolders: true
100+
101+
- task: PowerShell@2
102+
displayName: Copy OneFuzz setup script
103+
inputs:
104+
targetType: 'inline'
105+
script: |
106+
Copy-Item -Path .\build\onefuzz-setup.ps1 -Destination .drop/setup.ps1
107+
108+
- task: MSBuild@1
109+
displayName: 'Copy ASan binaries'
110+
inputs:
111+
solution: build/CopyASAN.targets
112+
msbuildArguments: /p:TargetFolder=$(Build.SourcesDirectory)\.drop
113+
msbuildVersion: 17.0
114+
msbuildArchitecture: x64
115+
- task: PowerShell@2
116+
displayName: List drop files
117+
inputs:
118+
targetType: inline
119+
script: |
120+
Get-ChildItem ".drop" -Recurse | select FullName
121+
122+
- task: onefuzz-task@0
123+
displayName: 'Submit to OneFuzz'
124+
inputs:
125+
onefuzzOSes: 'Windows'
126+
env:
127+
onefuzzDropDirectory: $(Build.SourcesDirectory)\.drop
128+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

.azuredevops/pipelines/DirectXTK-OneFuzz.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# https://go.microsoft.com/fwlink/?LinkId=248929
55

6-
# Builds the library using CMake and submit for file fuzzing
6+
# Builds the library using CMake and submit for file fuzzing for texture loading
77

88
schedules:
99
- cron: "0 11 1 * *"
@@ -39,7 +39,7 @@ pool:
3939

4040
jobs:
4141
- job: FUZZ_BUILD
42-
displayName: 'Build for file fuzzing'
42+
displayName: 'Build for file fuzzing (DDS)'
4343
steps:
4444
- checkout: self
4545
clean: true
@@ -56,7 +56,10 @@ jobs:
5656
displayName: 'CMake (MSVC): Config with ASan'
5757
inputs:
5858
cwd: $(Build.SourcesDirectory)
59-
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_TOOLS=OFF -DBUILD_XAUDIO_WIN10=ON -DBUILD_FUZZING=ON -DBUILD_TESTING=OFF'
59+
cmakeArgs: >
60+
-G "$(VS_GENERATOR)" -A x64 -B out
61+
-DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)
62+
-DBUILD_TOOLS=OFF -DBUILD_XAUDIO_WIN10=ON -DBUILD_FUZZING=ON -DBUILD_TESTING=OFF
6063
- task: CMake@1
6164
displayName: 'CMake (MSVC): Build with ASan'
6265
inputs:
@@ -101,21 +104,6 @@ jobs:
101104
Invoke-WebRequest -Uri $url -OutFile $target
102105
}
103106
104-
- task: CopyFiles@2
105-
displayName: Copy audio seed files
106-
inputs:
107-
Contents: |
108-
Tests\BasicAudioTest\Alarm01.wav
109-
Tests\BasicAudioTest\Alarm01_adpcm.wav
110-
Tests\BasicAudioTest\Alarm01_float.wav
111-
Tests\BasicAudioTest\Alarm01_xwma.wav
112-
Tests\BasicAudioTest\ADPCMdroid.xwb
113-
Tests\BasicAudioTest\wavebank.xwb
114-
Tests\BasicAudioTest\xwmadroid.xwb
115-
TargetFolder: .drop\seeds
116-
OverWrite: true
117-
flattenFolders: true
118-
119107
- task: PowerShell@2
120108
displayName: Copy OneFuzz setup script
121109
inputs:

0 commit comments

Comments
 (0)