2023-11-06 10:12:56 +03:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# Licensed under the MIT License.
|
|
|
|
#
|
2024-10-06 09:15:54 +03:00
|
|
|
# https://go.microsoft.com/fwlink/?LinkId=248926
|
2023-11-06 10:12:56 +03:00
|
|
|
|
|
|
|
# Builds the library using CMake and submit for file fuzzing
|
|
|
|
|
|
|
|
schedules:
|
2024-01-17 23:18:12 +03:00
|
|
|
- cron: "0 12 1 * *"
|
|
|
|
displayName: 'Submit for File Fuzzing (Monthly)'
|
2023-11-06 10:12:56 +03:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- main
|
|
|
|
always: true
|
|
|
|
|
|
|
|
trigger: none
|
|
|
|
pr: none
|
|
|
|
|
|
|
|
resources:
|
|
|
|
repositories:
|
|
|
|
- repository: self
|
|
|
|
type: git
|
|
|
|
ref: refs/heads/main
|
2024-10-06 09:15:54 +03:00
|
|
|
- repository: testRepo
|
|
|
|
name: walbourn/directxtextest
|
|
|
|
type: github
|
|
|
|
endpoint: microsoft
|
|
|
|
ref: refs/heads/main
|
2023-11-06 10:12:56 +03:00
|
|
|
|
|
|
|
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
|
|
|
|
|
|
|
|
variables:
|
2024-05-14 22:18:03 +03:00
|
|
|
Codeql.Enabled: false
|
2023-11-06 10:12:56 +03:00
|
|
|
VS_GENERATOR: 'Visual Studio 17 2022'
|
|
|
|
WIN11_SDK: '10.0.22000.0'
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: windows-2022
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: FUZZ_BUILD
|
|
|
|
displayName: 'Build for file fuzzing'
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchTags: false
|
2024-10-06 09:15:54 +03:00
|
|
|
fetchDepth: 1
|
|
|
|
path: 's'
|
|
|
|
- checkout: testRepo
|
2023-11-06 10:12:56 +03:00
|
|
|
displayName: Fetch Tests
|
2024-10-06 09:15:54 +03:00
|
|
|
clean: true
|
|
|
|
fetchTags: false
|
|
|
|
fetchDepth: 1
|
|
|
|
path: 's/Tests'
|
2023-11-06 10:12:56 +03:00
|
|
|
- task: CMake@1
|
|
|
|
displayName: 'CMake (MSVC): Config with ASan'
|
|
|
|
inputs:
|
|
|
|
cwd: '$(Build.SourcesDirectory)'
|
|
|
|
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_FUZZING=ON -DBUILD_TESTING=OFF'
|
|
|
|
- task: CMake@1
|
|
|
|
displayName: 'CMake (MSVC): Build with ASan'
|
|
|
|
inputs:
|
|
|
|
cwd: '$(Build.SourcesDirectory)'
|
|
|
|
cmakeArgs: --build out -v --config RelWithDebInfo
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: Copy fuzzer
|
|
|
|
inputs:
|
|
|
|
Contents: |
|
|
|
|
build\OneFuzzConfig.json
|
2024-01-17 23:18:12 +03:00
|
|
|
out\bin\RelWithDebInfo\fuzzloaders.exe
|
2023-11-06 10:12:56 +03:00
|
|
|
TargetFolder: .drop
|
|
|
|
OverWrite: true
|
|
|
|
flattenFolders: true
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: Copy symbols
|
|
|
|
inputs:
|
|
|
|
Contents: |
|
2024-01-17 23:18:12 +03:00
|
|
|
out\bin\RelWithDebInfo\fuzzloaders.pdb
|
2023-11-06 10:12:56 +03:00
|
|
|
TargetFolder: .drop\symbols
|
|
|
|
OverWrite: true
|
|
|
|
flattenFolders: true
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Download seed files
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
script: |
|
|
|
|
$seedfiles = "AlphaEdge.dds",
|
|
|
|
"cubea8r8g8b8.dds",
|
|
|
|
"default_texture_nm.dds",
|
|
|
|
"dx5_logo.dds",
|
|
|
|
"hdrtest.dds",
|
|
|
|
"normalmap.dds",
|
|
|
|
"grad4d.hdr",
|
|
|
|
"grad4dunc.hdr",
|
|
|
|
"BigTree.hdr",
|
|
|
|
"CBW8.TGA",
|
|
|
|
"ccm8.tga",
|
|
|
|
"CTC16.TGA",
|
|
|
|
"CTC24.TGA",
|
|
|
|
"CTC32.TGA",
|
|
|
|
"UTC16.TGA",
|
|
|
|
"UTC24.TGA",
|
|
|
|
"UTC32.TGA",
|
|
|
|
"UBW8.TGA",
|
|
|
|
"ucm8.tga",
|
|
|
|
"testimg.ppm",
|
2024-11-08 01:56:31 +03:00
|
|
|
"grad4d.pfm",
|
|
|
|
"grad4d.phm",
|
|
|
|
"grad4d_mono.pfm",
|
|
|
|
"grad4d_mono.phm";
|
2023-11-06 10:12:56 +03:00
|
|
|
|
|
|
|
New-Item -ItemType Directory -Force -Path .drop\seeds\
|
|
|
|
|
|
|
|
foreach($filename in $seedfiles)
|
|
|
|
{
|
|
|
|
Write-Host "Fetching: $filename"
|
|
|
|
$url = "https://raw.githubusercontent.com/walbourn/directxtexmedia/main/" + $filename
|
|
|
|
$target = [System.IO.Path]::Combine(".drop\seeds\", $filename)
|
2024-02-02 09:51:44 +03:00
|
|
|
Invoke-WebRequest -Uri $url -OutFile $target
|
2023-11-06 10:12:56 +03:00
|
|
|
}
|
|
|
|
|
2023-12-07 06:17:02 +03:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Copy OneFuzz setup script
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: |
|
|
|
|
Copy-Item -Path .\build\onefuzz-setup.ps1 -Destination .drop/setup.ps1
|
|
|
|
|
2023-11-06 10:12:56 +03:00
|
|
|
- task: MSBuild@1
|
|
|
|
displayName: 'Copy ASan binaries'
|
|
|
|
inputs:
|
|
|
|
solution: build/CopyASAN.targets
|
|
|
|
msbuildArguments: /p:TargetFolder=$(Build.SourcesDirectory)\.drop
|
|
|
|
msbuildVersion: 17.0
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: List drop files
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
script: |
|
|
|
|
Get-ChildItem ".drop" -Recurse | select FullName
|
|
|
|
|
|
|
|
- task: onefuzz-task@0
|
|
|
|
displayName: 'Submit to OneFuzz'
|
|
|
|
inputs:
|
|
|
|
onefuzzOSes: 'Windows'
|
|
|
|
env:
|
|
|
|
onefuzzDropDirectory: $(Build.SourcesDirectory)\.drop
|
|
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|