1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-24 21:30:14 +00:00
DirectXTex/build/DirectXTex-GitHub-WSL-11.yml

209 lines
6.6 KiB
YAML
Raw Normal View History

2022-12-05 02:22:15 +00:00
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Builds the library for Windows Subsystem for Linux (WSL)
schedules:
- cron: "0 3 * * *"
displayName: 'Nightly build'
branches:
include:
- main
trigger: none
pr:
branches:
include:
- main
paths:
include:
- CMake*
- build/*.cmake
- build/*.in
- build/DirectXTex-GitHub-WSL-11.yml
2022-12-05 02:22:15 +00:00
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
trigger: none
2022-12-05 02:22:15 +00:00
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
pool:
vmImage: ubuntu-22.04
variables:
2024-05-14 19:18:03 +00:00
Codeql.Enabled: false
VCPKG_CMAKE_DIR: '$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake'
2022-12-05 02:22:15 +00:00
GITHUB_PAT: $(GITHUBPUBLICTOKEN)
LOCAL_PKG_DIR: '$(Agent.BuildDirectory)/install/'
2022-12-05 02:22:15 +00:00
jobs:
- job: BUILD_WSL
displayName: 'Windows Subsystem for Linux (WSL)'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: CmdLine@2
displayName: Fetch directx-headers
inputs:
2023-11-15 23:37:00 +00:00
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectX-Headers.git directx-headers
2022-12-05 02:22:15 +00:00
- task: CMake@1
displayName: CMake DirectX-Headers
inputs:
cwd: directx-headers
cmakeArgs: . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
2022-12-05 02:22:15 +00:00
- task: CMake@1
displayName: CMake DirectX-Headers (Build)
inputs:
cwd: directx-headers
cmakeArgs: --build . -v
- task: CMake@1
displayName: CMake DirectX-Headers (Install)
inputs:
cwd: directx-headers
cmakeArgs: --install .
- task: CmdLine@2
displayName: Fetch directxmath
inputs:
2023-11-15 23:37:00 +00:00
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXMath.git directxmath
2022-12-05 02:22:15 +00:00
- task: CMake@1
displayName: CMake DirectXMath
inputs:
cwd: directxmath
cmakeArgs: . -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
2022-12-05 02:22:15 +00:00
- task: CMake@1
displayName: CMake DirectXMath (Build)
inputs:
cwd: directxmath
cmakeArgs: --build . -v
- task: CMake@1
displayName: CMake DirectXMath (Install)
inputs:
cwd: directxmath
cmakeArgs: --install .
- task: PowerShell@2
displayName: Fetch SAL.H
inputs:
targetType: inline
script: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -OutFile $(LOCAL_PKG_DIR)/include/sal.h
$fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String
2022-12-05 02:22:15 +00:00
$filehash = $fileHash.Trim()
Write-Host "##[debug]SHA512: " $filehash
if ($fileHash -ne "1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0") {
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
}
- task: CMake@1
displayName: CMake DirectXTex (Config) dbg
2022-12-05 02:22:15 +00:00
inputs:
2022-12-08 09:10:41 +00:00
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
2022-12-05 02:22:15 +00:00
- task: CMake@1
displayName: CMake DirectXTex (Build) dbg
2022-12-05 02:22:15 +00:00
inputs:
2022-12-08 09:10:41 +00:00
cwd: '$(Build.SourcesDirectory)'
2022-12-05 02:22:15 +00:00
cmakeArgs: --build out -v
- task: CMake@1
displayName: CMake DirectXTex (Config) rel
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
- task: CMake@1
displayName: CMake DirectXTex (Build) rel
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out2 -v
- job: BUILD_WSL_VCPKG
displayName: 'Windows Subsystem for Linux (WSL) using VCPKG'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: CmdLine@2
displayName: Fetch VCPKG
inputs:
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git
workingDirectory: $(Build.SourcesDirectory)
- task: Bash@3
displayName: VCPKG Bootstrap
inputs:
targetType: filePath
filePath: $(Build.SourcesDirectory)/vcpkg/bootstrap-vcpkg.sh
workingDirectory: $(Build.SourcesDirectory)/vcpkg
- task: CmdLine@2
displayName: GCC and CMake version
inputs:
script: |
g++ --version
cmake --version
- task: CmdLine@2
displayName: VCPKG install headers
inputs:
script: $(Build.SourcesDirectory)/vcpkg/vcpkg install directxmath directx-headers openexr libpng zlib libjpeg-turbo
workingDirectory: $(Build.SourcesDirectory)/vcpkg
- task: CMake@1
displayName: CMake DirectXTex (Config) dbg
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1
displayName: CMake DirectXTex (Build) dbg
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out -v
- task: CMake@1
displayName: CMake DirectXTex (Config) rel
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1
displayName: CMake DirectXTex (Build) rel
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out2 -v
- task: CMake@1
displayName: CMake DirectXTex (Config) w/ OpenEXR
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ OpenEXR
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out3 -v
- task: CMake@1
displayName: CMake DirectXTex (Config) w/ libjpeg
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ libjpeg
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out4 -v
- task: CMake@1
displayName: CMake DirectXTex (Config) w/ libpng
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ libpng
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out5 -v