Skip to content

Commit

Permalink
ADO YAML code review
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Oct 5, 2024
1 parent d466807 commit 73e294f
Show file tree
Hide file tree
Showing 10 changed files with 326 additions and 256 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bvt.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkID=512686
# https://go.microsoft.com/fwlink/?LinkID=512686

name: 'CTest (BVTs)'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkID=512686
# https://go.microsoft.com/fwlink/?LinkID=512686

name: 'CTest (Windows)'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vcpkg.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkID=512686
# https://go.microsoft.com/fwlink/?LinkID=512686

name: 'CMake (Windows using VCPKG)'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wsl.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkID=512686
# https://go.microsoft.com/fwlink/?LinkID=512686

name: 'CMake (WSL)'

Expand Down
106 changes: 51 additions & 55 deletions build/UVAtlas-GitHub-MinGW.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkID=512686
# https://go.microsoft.com/fwlink/?LinkID=512686

# Builds the library and test suite using the MinGW compiler.

Expand All @@ -22,7 +22,6 @@ trigger:
- LICENSE
- '.github/*'
- '.nuget/*'
- build/*.json
- build/*.props
- build/*.mdb
- build/*.ps1
Expand All @@ -37,7 +36,6 @@ pr:
- LICENSE
- '.github/*'
- '.nuget/*'
- build/*.json
- build/*.props
- build/*.mdb
- build/*.ps1
Expand All @@ -48,6 +46,16 @@ resources:
- repository: self
type: git
ref: refs/heads/main
- repository: vcpkgRepo
name: Microsoft/vcpkg
type: github
endpoint: microsoft
ref: refs/tags/$(VCPKG_TAG)
- repository: testRepo
name: walbourn/uvatlastest
type: github
endpoint: microsoft
ref: refs/heads/main

name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

Expand All @@ -56,8 +64,9 @@ pool:

variables:
Codeql.Enabled: false
VCPKG_CMAKE_DIR: '$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake'
GITHUB_PAT: $(GITHUBPUBLICTOKEN)
VCPKG_ROOT: $(Build.SourcesDirectory)/vcpkg
VCPKG_CMAKE_DIR: $(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_MANIFEST_DIR: $(Build.SourcesDirectory)/build
WIN11_SDK: '10.0.22000.0'
URL_MINGW32: https://github.com/brechtsanders/winlibs_mingw/releases/download/12.2.0-14.0.6-10.0.0-ucrt-r2/winlibs-i686-posix-dwarf-gcc-12.2.0-llvm-14.0.6-mingw-w64ucrt-10.0.0-r2.zip
HASH_MINGW32: 'fcd1e11b896190da01c83d5b5fb0d37b7c61585e53446c2dab0009debc3915e757213882c35e35396329338de6f0222ba012e23a5af86932db45186a225d1272'
Expand All @@ -69,12 +78,14 @@ jobs:
- checkout: self
clean: true
fetchTags: false
- task: CmdLine@2
# We can use the preinstalled vcpkg instead of the latest when MS Hosted updates their vcpkg to the newer DirectX-Headers
fetchDepth: 1
path: 's'
- checkout: vcpkgRepo
displayName: Fetch VCPKG
inputs:
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git
workingDirectory: $(Build.SourcesDirectory)
clean: true
fetchTags: false
fetchDepth: 1
path: 's/vcpkg'
- task: CmdLine@2
displayName: VCPKG Bootstrap
inputs:
Expand Down Expand Up @@ -119,30 +130,22 @@ jobs:
inputs:
script: g++ --version
- task: CmdLine@2
displayName: VCPKG install headers
displayName: VCPKG install packages
inputs:
script: |
call vcpkg install directxmath
@if ERRORLEVEL 1 goto error
call vcpkg install directx-headers
@if ERRORLEVEL 1 goto error
:finish
@echo --- VCPKG COMPLETE ---
exit /b 0
:error
@echo --- ERROR: VCPKG FAILED ---
exit /b 1
workingDirectory: $(Build.SourcesDirectory)\vcpkg
script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x86-mingw-static
workingDirectory: $(VCPKG_ROOT)
- task: CMake@1
displayName: CMake (MinGW32)
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
- task: CMake@1
displayName: CMake (MinGW32) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out

- job: MINGW64_BUILD
Expand All @@ -151,15 +154,20 @@ jobs:
- checkout: self
clean: true
fetchTags: false
- task: CmdLine@2
fetchDepth: 1
path: 's'
- checkout: vcpkgRepo
displayName: Fetch VCPKG
inputs:
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git
workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2
clean: true
fetchTags: false
fetchDepth: 1
path: 's/vcpkg'
- checkout: testRepo
displayName: Fetch Tests
inputs:
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/uvatlastest.git Tests
clean: true
fetchTags: false
fetchDepth: 1
path: 's/Tests'
- task: CmdLine@2
displayName: VCPKG Bootstrap
inputs:
Expand Down Expand Up @@ -191,32 +199,20 @@ jobs:
inputs:
script: g++ --version
- task: CmdLine@2
displayName: VCPKG install headers
displayName: VCPKG install packages
inputs:
script: |
call vcpkg install directxmath
@if ERRORLEVEL 1 goto error
call vcpkg install directx-headers
@if ERRORLEVEL 1 goto error
call vcpkg install directxmesh
@if ERRORLEVEL 1 goto error
call vcpkg install directxtex
@if ERRORLEVEL 1 goto error
:finish
@echo --- VCPKG COMPLETE ---
exit /b 0
:error
@echo --- ERROR: VCPKG FAILED ---
exit /b 1
workingDirectory: $(Build.SourcesDirectory)\vcpkg
script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-mingw-static
workingDirectory: $(VCPKG_ROOT)
- task: CMake@1
displayName: CMake (MinGW-W64)
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
- task: CMake@1
displayName: CMake (MinGW-W64) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out
Loading

0 comments on commit 73e294f

Please sign in to comment.