Skip to content

Commit 589dfad

Browse files
committed
Add GitHub Actiosn test
1 parent 06d0305 commit 589dfad

File tree

3 files changed

+120
-36
lines changed

3 files changed

+120
-36
lines changed

.github/workflows/test.yml

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
#
4+
# http://go.microsoft.com/fwlink/?LinkId=248926
5+
6+
name: 'CTest (Windows)'
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
paths-ignore:
14+
- '*.md'
15+
- LICENSE
16+
- '.nuget/*'
17+
- build/*.cmd
18+
- build/*.json
19+
- build/*.props
20+
- build/*.ps1
21+
- build/*.targets
22+
- build/*.yml
23+
24+
env:
25+
DIRECTXTEX_MEDIA_PATH: ${{ github.workspace }}/Media
26+
27+
jobs:
28+
build:
29+
runs-on: ${{ matrix.os }}
30+
timeout-minutes: 40
31+
32+
strategy:
33+
fail-fast: false
34+
35+
matrix:
36+
os: [windows-2019, windows-2022]
37+
build_type: [x64-Debug, x64-Release, x64-Debug-Clang, x64-Release-Clang]
38+
arch: [amd64]
39+
include:
40+
- os: windows-2019
41+
build_type: x86-Debug
42+
arch: amd64_x86
43+
- os: windows-2019
44+
build_type: x86-Release
45+
arch: amd64_x86
46+
- os: windows-2019
47+
build_type: x86-Debug-Clang
48+
arch: amd64_x86
49+
- os: windows-2019
50+
build_type: x86-Release-Clang
51+
arch: amd64_x86
52+
- os: windows-2022
53+
build_type: x86-Debug
54+
arch: amd64_x86
55+
- os: windows-2022
56+
build_type: x86-Release
57+
arch: amd64_x86
58+
- os: windows-2022
59+
build_type: x86-Debug-Clang
60+
arch: amd64_x86
61+
- os: windows-2022
62+
build_type: x86-Release-Clang
63+
arch: amd64_x86
64+
- os: windows-2022
65+
build_type: arm64-Debug
66+
arch: amd64_arm64
67+
- os: windows-2022
68+
build_type: arm64-Release
69+
arch: amd64_arm64
70+
- os: windows-2022
71+
build_type: arm64ec-Debug
72+
arch: amd64_arm64
73+
- os: windows-2022
74+
build_type: arm64ec-Release
75+
arch: amd64_arm64
76+
77+
steps:
78+
- uses: actions/checkout@v4
79+
80+
- name: Clone test repository
81+
uses: actions/checkout@v4
82+
with:
83+
repository: walbourn/directxtextest
84+
path: Tests
85+
ref: main
86+
87+
- if: matrix.build_type == 'x64-Release'
88+
name: Clone media repository
89+
uses: actions/checkout@v4
90+
with:
91+
repository: walbourn/directxtexmedia
92+
path: Media
93+
ref: main
94+
lfs: true
95+
96+
- name: 'Install Ninja'
97+
run: choco install ninja
98+
99+
- uses: ilammy/msvc-dev-cmd@v1
100+
with:
101+
arch: ${{ matrix.arch }}
102+
103+
- name: 'Configure CMake'
104+
working-directory: ${{ github.workspace }}
105+
run: cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON
106+
107+
- name: 'Build'
108+
working-directory: ${{ github.workspace }}
109+
run: cmake --build out\build\${{ matrix.build_type }}
110+
111+
- if: (matrix.build_type == 'x64-Release') || (matrix.build_type == 'x86-Release')
112+
timeout-minutes: 30
113+
name: 'Test (CPU only)'
114+
working-directory: ${{ github.workspace }}
115+
run: ctest --preset=${{ matrix.build_type }} -L ImageFormats,Library

build/DirectXTex-GitHub-Test-Dev17.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ schedules:
1212
include:
1313
- main
1414

15+
# GitHub Actions handles test suite for CI/PR
1516
trigger: none
16-
1717
pr:
1818
branches:
1919
include:

build/DirectXTex-GitHub-Test.yml

+4-35
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,15 @@ schedules:
1212
include:
1313
- main
1414

15-
trigger:
16-
branches:
17-
include:
18-
- main
19-
paths:
20-
exclude:
21-
- '*.md'
22-
- LICENSE
23-
- CMake*
24-
- '.github/*'
25-
- '.nuget/*'
26-
- build/*.cmake
27-
- build/*.cmd
28-
- build/*.in
29-
- build/*.json
30-
- build/*.props
31-
- build/*.ps1
32-
- build/*.targets
33-
- Auxiliary/*
34-
15+
# GitHub Actions handles test suite for CI/PR
16+
trigger: none
3517
pr:
3618
branches:
3719
include:
3820
- main
3921
paths:
40-
exclude:
41-
- '*.md'
42-
- LICENSE
43-
- CMake*
44-
- '.github/*'
45-
- '.nuget/*'
46-
- build/*.cmake
47-
- build/*.cmd
48-
- build/*.in
49-
- build/*.json
50-
- build/*.props
51-
- build/*.ps1
52-
- build/*.targets
53-
- Auxiliary/*
54-
drafts: false
22+
include:
23+
- build/DirectXTex-GitHub-Test.yml
5524

5625
resources:
5726
repositories:

0 commit comments

Comments
 (0)