Skip to content

Commit af74671

Browse files
author
Chuck Walbourn
committed
Move BVT for Aux to own action
1 parent 2b5e0cf commit af74671

2 files changed

Lines changed: 137 additions & 3 deletions

File tree

‎.github/workflows/auxbvt.yml‎

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
#
4+
# https://go.microsoft.com/fwlink/?LinkId=248926
5+
6+
name: 'BVTs (Auxiliary)'
7+
8+
on:
9+
push:
10+
branches: "main"
11+
paths-ignore:
12+
- '*.md'
13+
- LICENSE
14+
- '.azuredevops/**'
15+
- '.nuget/*'
16+
- build/*.cmd
17+
- build/*.json
18+
- build/*.props
19+
- build/*.ps1
20+
- build/*.targets
21+
- build/*.xvd
22+
pull_request:
23+
branches: "main"
24+
paths-ignore:
25+
- '*.md'
26+
- LICENSE
27+
- '.azuredevops/**'
28+
- '.nuget/*'
29+
- build/*.cmd
30+
- build/*.json
31+
- build/*.props
32+
- build/*.ps1
33+
- build/*.targets
34+
- build/*.xvd
35+
workflow_dispatch: {}
36+
37+
permissions:
38+
contents: read
39+
40+
jobs:
41+
build:
42+
runs-on: windows-2022
43+
timeout-minutes: 60
44+
45+
strategy:
46+
fail-fast: false
47+
48+
matrix:
49+
toolver: ['14.29', '14']
50+
build_type: [x64-Release]
51+
arch: [amd64]
52+
53+
steps:
54+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
55+
56+
- name: Clone test repository
57+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
58+
with:
59+
repository: walbourn/directxtextest
60+
path: Tests
61+
ref: main
62+
63+
- name: 'Install Ninja'
64+
run: choco install ninja
65+
66+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
67+
with:
68+
arch: ${{ matrix.arch }}
69+
toolset: ${{ matrix.toolver }}
70+
71+
- name: 'Set triplet'
72+
shell: pwsh
73+
run: |
74+
if ("${{ matrix.arch }}" -eq "amd64")
75+
{
76+
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
77+
}
78+
elseif ("${{ matrix.arch }}" -eq "amd64_x86")
79+
{
80+
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
81+
}
82+
elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
83+
{
84+
if ("${{ matrix.build_type }}" -match "^arm64ec")
85+
{
86+
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
87+
}
88+
else
89+
{
90+
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
91+
}
92+
}
93+
else
94+
{
95+
echo "::error Unknown architecture/build-type triplet mapping"
96+
}
97+
98+
- name: Get vcpkg commit hash
99+
shell: pwsh
100+
run: |
101+
if ($Env:vcpkgRelease) {
102+
echo "Using vcpkg commit from repo variable..."
103+
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
104+
}
105+
else {
106+
echo "Fetching latest vcpkg commit hash..."
107+
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
108+
$VCPKG_COMMIT_ID = $commit
109+
}
110+
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
111+
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
112+
env:
113+
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
114+
115+
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
116+
with:
117+
runVcpkgInstall: true
118+
vcpkgJsonGlob: '**/build/vcpkg.json'
119+
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
120+
121+
- name: 'Configure CMake'
122+
working-directory: ${{ github.workspace }}
123+
run: >
124+
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_BVT=ON
125+
-DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
126+
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
127+
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
128+
129+
- name: 'Build'
130+
working-directory: ${{ github.workspace }}
131+
run: cmake --build out\build\${{ matrix.build_type }}
132+
133+
- name: 'Run BVTs'
134+
working-directory: ${{ github.workspace }}
135+
run: ctest --preset=${{ matrix.build_type }} --output-on-failure -L EXR|JPG|PNG

‎.github/workflows/bvt.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ jobs:
5151
arch: [amd64]
5252

5353
steps:
54-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
54+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5555

5656
- name: Clone test repository
57-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5858
with:
5959
repository: walbourn/directxtextest
6060
path: Tests
@@ -122,7 +122,6 @@ jobs:
122122
working-directory: ${{ github.workspace }}
123123
run: >
124124
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_BVT=ON
125-
-DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
126125
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
127126
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
128127

0 commit comments

Comments
 (0)