-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (106 loc) · 3.74 KB
/
Copy pathtiny-platforms.yml
File metadata and controls
116 lines (106 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Test tiny platform libraries
on:
push:
paths:
- '.github/workflows/tiny-platforms.yml'
- 'CMakeLists.txt'
- 'tests/native/CMakeLists.txt'
- 'tests/native/check_tiny_libraries.cmake'
- 'tests/native/check_shadowflare_c99.cmake'
- 'tests/native/shadowflare_core_test.c'
- 'tests/native/tiny_libraries_test.c'
- 'tests/native/twl_backend_smoke_test.c'
- 'shadowflare/**'
- 'thirdparty/tal/**'
- 'thirdparty/twl/**'
pull_request:
paths:
- '.github/workflows/tiny-platforms.yml'
- 'CMakeLists.txt'
- 'tests/native/CMakeLists.txt'
- 'tests/native/check_tiny_libraries.cmake'
- 'tests/native/check_shadowflare_c99.cmake'
- 'tests/native/shadowflare_core_test.c'
- 'tests/native/tiny_libraries_test.c'
- 'tests/native/twl_backend_smoke_test.c'
- 'shadowflare/**'
- 'thirdparty/tal/**'
- 'thirdparty/twl/**'
workflow_dispatch:
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: windows
- os: macos-latest
platform: macos
runs-on: ${{ matrix.os }}
steps:
- name: Check out the repository
uses: actions/checkout@v6
- name: Configure
run: >-
cmake
-S .
-B build/${{ matrix.platform }}/debug
-DCMAKE_BUILD_TYPE=Debug
-DOPENSHADOWFLARE_BUILD_EXE=OFF
-DOPENSHADOWFLARE_ENABLE_DEBUG_TOOLS=OFF
- name: Build TWL and TAL tests (macOS)
if: runner.os == 'macOS'
run: >-
cmake --build build/${{ matrix.platform }}/debug
--target tiny_libraries_test twl_backend_smoke_test
osf shadowflare_core_test
--parallel
- name: Build TWL and TAL tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$output = & cmake --build build/${{ matrix.platform }}/debug `
--target tiny_libraries_test twl_backend_smoke_test `
osf shadowflare_core_test `
--parallel 2>&1
$exitCode = $LASTEXITCODE
$output | Write-Host
if ($exitCode -ne 0) {
$tail = ($output | Select-Object -Last 60 | Out-String)
$tail = $tail.Replace('%', '%25').Replace("`r", '%0D').Replace("`n", '%0A')
Write-Output "::error title=Windows TWL/TAL build failed::$tail"
exit $exitCode
}
- name: Run common TWL and TAL tests (macOS)
if: runner.os == 'macOS'
run: >-
ctest --test-dir build/${{ matrix.platform }}/debug
-C Debug
--output-on-failure
-R "tiny_libraries|tiny_library_boundaries|shadowflare_core|shadowflare_c99_boundaries"
- name: Run common TWL and TAL tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$output = & ctest --test-dir build/${{ matrix.platform }}/debug `
-C Debug `
--output-on-failure `
-R "tiny_libraries|tiny_library_boundaries|shadowflare_core|shadowflare_c99_boundaries" 2>&1
$exitCode = $LASTEXITCODE
$output | Write-Host
if ($exitCode -ne 0) {
$tail = ($output | Select-Object -Last 60 | Out-String)
$tail = $tail.Replace('%', '%25').Replace("`r", '%0D').Replace("`n", '%0A')
Write-Output "::error title=Windows TWL/TAL tests failed::$tail"
exit $exitCode
}
- name: Run Windows presentation smoke test
if: runner.os == 'Windows'
run: >-
ctest --test-dir build/${{ matrix.platform }}/debug
-C Debug
--output-on-failure
-R "^twl_backend_smoke$"