-
Notifications
You must be signed in to change notification settings - Fork 3
219 lines (218 loc) · 7.37 KB
/
main.yml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: DeepSea
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CTEST_OUTPUT_ON_FAILURE: '1'
GTEST_OUTPUT: xml:${{ github.workspace }}/test-results/
cores_count: '4'
cores_mac_count: '3'
ctest_args: "-E DeepSeaRenderBootstrapTest"
dependency_location: "${{ github.workspace }}/dependencies"
gtest_version: release-1.12.1
test_results_location: "${{ github.workspace }}/test-results"
jobs:
Linux:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- lib_type: Static
cmake_args: "-DDEEPSEA_SHARED=OFF"
- lib_type: Shared
cmake_args: "-DDEEPSEA_SHARED=ON"
- lib_type: Single-Shared
cmake_args: "-DDEEPSEA_SINGLE_SHARED=ON"
steps:
- name: checkout
uses: actions/checkout@v4
- name: Download submodules
run: |-
./update.sh -s -t -l linux
sudo apt-get update
sudo apt-get install -y libfreetype6-dev libharfbuzz-dev libsdl2-dev libgl1-mesa-dev
working-directory: "${{ github.workspace }}"
- name: Build debug
run: |-
mkdir -p build/Debug
cd build/Debug
cmake -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_args }} ${{ github.workspace }}
cmake --build . -j ${{ env.cores_count }}
working-directory: "${{ github.workspace }}"
- name: Run tests debug
continue-on-error: true
timeout-minutes: 5
run: ctest ${{ env.ctest_args }}
working-directory: "${{ github.workspace }}/build/Debug"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Tests (Linux ${{ matrix.lib_type }} Debug)
junit_files: "${{ env.test_results_location }}/*.xml"
- name: Clear test results
run: rm *.xml
working-directory: "${{ env.test_results_location }}"
- name: Build release
run: |-
mkdir -p build/Release
cd build/Release
cmake -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }} ${{ github.workspace }}
cmake --build . -j ${{ env.cores_count }}
working-directory: "${{ github.workspace }}"
- name: Run tests release
continue-on-error: true
timeout-minutes: 5
run: ctest ${{ env.ctest_args }}
working-directory: "${{ github.workspace }}/build/Release"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Tests (Linux ${{ matrix.lib_type }} Release)
junit_files: "${{ env.test_results_location }}/*.xml"
Android:
runs-on: ubuntu-24.04
strategy:
matrix:
config:
- Debug
- Release
steps:
- name: checkout
uses: actions/checkout@v4
- name: Download submodules
run: "./update.sh -s -t -l android-all"
working-directory: "${{ github.workspace }}"
- name: Build
run: "./gradlew bundle${{ matrix.config }}"
working-directory: "${{ github.workspace }}/android"
Mac:
runs-on: macos-latest
strategy:
matrix:
include:
- lib_type: Static
cmake_args: "-DDEEPSEA_SHARED=OFF"
- lib_type: Shared
cmake_args: "-DDEEPSEA_SHARED=ON"
- lib_type: Single-Shared
cmake_args: "-DDEEPSEA_SINGLE_SHARED=ON"
steps:
- name: checkout
uses: actions/checkout@v4
- name: Download submodules
run: "./update.sh -s -t -l mac"
working-directory: "${{ github.workspace }}"
- name: Build debug
run: |-
mkdir -p build/Debug
cd build/Debug
cmake -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_args }} ${{ github.workspace }}
cmake --build . -j ${{ env.cores_mac_count }}
working-directory: "${{ github.workspace }}"
- name: Run tests debug
continue-on-error: true
timeout-minutes: 5
run: ctest ${{ env.ctest_args }}
working-directory: "${{ github.workspace }}/build/Debug"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/macos@v2
with:
check_name: Tests (Mac ${{ matrix.lib_type }} Debug)
junit_files: "${{ env.test_results_location }}/*.xml"
- name: Clear test results
run: rm *.xml
working-directory: "${{ env.test_results_location }}"
- name: Build release
run: |-
mkdir -p build/Release
cd build/Release
cmake -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }} ${{ github.workspace }}
cmake --build . -j ${{ env.cores_mac_count }}
working-directory: "${{ github.workspace }}"
- name: Run tests release
continue-on-error: true
timeout-minutes: 5
run: ctest ${{ env.ctest_args }}
working-directory: "${{ github.workspace }}/build/Release"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/macos@v2
with:
check_name: Tests (Mac ${{ matrix.lib_type }} Release)
junit_files: "${{ env.test_results_location }}/*.xml"
Windows:
runs-on: windows-2019
strategy:
matrix:
include:
- arch: Win32
libs: win32
lib_type: Static
cmake_args: "-DDEEPSEA_SHARED=OFF"
- arch: Win32
libs: win32
lib_type: Shared
cmake_args: "-DDEEPSEA_SHARED=ON"
- arch: Win32
libs: win32
lib_type: Single-Shared
cmake_args: "-DDEEPSEA_SINGLE_SHARED=ON"
- arch: x64
libs: win64
lib_type: Static
cmake_args: "-DDEEPSEA_SHARED=OFF"
- arch: x64
libs: win64
lib_type: Shared
cmake_args: "-DDEEPSEA_SHARED=ON"
- arch: x64
libs: win64
lib_type: Single-Shared
cmake_args: "-DDEEPSEA_SINGLE_SHARED=ON"
steps:
- name: checkout
uses: actions/checkout@v4
- name: Download submodules
run: "./update.sh -m -t -l ${{ matrix.libs }}"
shell: bash
working-directory: "${{ github.workspace }}"
- name: Run CMake
run: |-
mkdir build
cd build
cmake ${{ matrix.cmake_args }} -A ${{ matrix.arch }} -T v141 ${{ github.workspace }}
working-directory: "${{ github.workspace }}"
- name: Build debug
run: cmake --build . --config Debug
working-directory: "${{ github.workspace }}/build"
- name: Run tests debug
continue-on-error: true
timeout-minutes: 5
run: ctest ${{ env.ctest_args }} -C Debug
working-directory: "${{ github.workspace }}/build"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
check_name: Tests (Windows ${{ matrix.arch }} ${{ matrix.lib_type }} Debug)
junit_files: "${{ env.test_results_location }}/*.xml"
- name: Clear test results
run: rm *.xml
shell: bash
working-directory: "${{ env.test_results_location }}"
- name: Build release
run: cmake --build . --config Release
working-directory: "${{ github.workspace }}/build"
- name: Run tests release
continue-on-error: true
timeout-minutes: 5
run: ctest ${{ env.ctest_args }} -C Release
working-directory: "${{ github.workspace }}/build"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
check_name: Tests (Windows ${{ matrix.arch }} ${{ matrix.lib_type }} Release)
junit_files: "${{ env.test_results_location }}/*.xml"
# vim: ts=2 sts=2 sw=2 et