@@ -28,13 +28,17 @@ jobs:
2828 python3 -m pip install mako
2929 - name : Generate build files with cmake
3030 run : |
31- cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 17 2022" -A x64 -Bbuild .
31+ cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 17 2022" -A x64 -Bbuild/host .
3232 - name : Build Dive host tools with VS 2022
3333 run : |
34- cmake --build build --config Debug
34+ cmake --build build/host --config Debug
3535 - name : Run tests
3636 run : |
37- ctest --output-on-failure -C Debug --test-dir build
37+ ctest --output-on-failure -C Debug --test-dir build/host
38+ - name : Install under build dir
39+ run : |
40+ cmake --install build/host --prefix build/pkg/host --config Debug
41+
3842 build_Windows_Release :
3943 name : " Windows release build"
4044 runs-on : windows-2022
@@ -55,14 +59,16 @@ jobs:
5559 python3 -m pip install mako
5660 - name : Generate build files with cmake
5761 run : |
58- cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A x64 -Bbuild .
62+ cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A x64 -Bbuild/host .
5963 - name : Build Dive host tools with VS 2022
6064 run : |
61- cmake --build build --config Release
65+ cmake --build build/host --config Release
6266 - name : Run tests
6367 run : |
64- ctest --output-on-failure -C Release --test-dir build
65-
68+ ctest --output-on-failure -C Release --test-dir build/host
69+ - name : Install under build dir
70+ run : |
71+ cmake --install build/host --prefix build/pkg/host --config Release
6672
6773 build_Linux_Gcc_Debug :
6874 name : " Linux gcc debug build"
@@ -96,26 +102,27 @@ jobs:
96102 - name : Generate build files with cmake
97103 run : |
98104 cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
99- -DCMAKE_BUILD_TYPE=Debug \
100105 -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-14 \
101106 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-14 \
102- -GNinja \
103- -Bbuild .
107+ -G "Ninja Multi-Config" \
108+ -Bbuild/host .
104109 - name : Build Dive host tools with ninja with gcc-14
105110 run : |
106- ninja -C build
111+ cmake --build build/host --config Debug
107112 - name : Ninja log
108113 run : |
109- cat build/.ninja_log
114+ cat build/host/ .ninja_log
110115 - name : Start Xvfb
111116 run : |
112117 Xvfb :99 -screen 0 1024x768x24 &
113118 export DISPLAY=:99
114-
115119 - name : Run tests
116120 run : |
117121 export DISPLAY=:99
118- ctest --output-on-failure -C Debug --test-dir build
122+ ctest --output-on-failure -C Debug --test-dir build/host
123+ - name : Install under build dir
124+ run : |
125+ cmake --install build/host --prefix build/pkg/host --config Debug
119126
120127 build_Linux_Gcc_Release :
121128 name : " Linux gcc release build"
@@ -148,26 +155,27 @@ jobs:
148155 - name : Generate build files with cmake
149156 run : |
150157 cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
151- -DCMAKE_BUILD_TYPE=Release \
152158 -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-14 \
153159 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-14 \
154- -GNinja \
155- -Bbuild .
160+ -G"Ninja Multi-Config" \
161+ -Bbuild/host .
156162 - name : Build Dive host tools with ninja with gcc-14
157163 run : |
158- ninja -C build
164+ cmake --build build/host --config Release
159165 - name : Ninja log
160166 run : |
161- cat build/.ninja_log
167+ cat build/host/ .ninja_log
162168 - name : Start Xvfb
163169 run : |
164170 Xvfb :99 -screen 0 1024x768x24 &
165171 export DISPLAY=:99
166-
167172 - name : Run tests
168173 run : |
169174 export DISPLAY=:99
170- ctest --output-on-failure -C Release --test-dir build
175+ ctest --output-on-failure -C Release --test-dir build/host
176+ - name : Install under build dir
177+ run : |
178+ cmake --install build/host --prefix build/pkg/host --config Release
171179
172180 build_Linux_Clang_Debug :
173181 name : " Linux clang debug build"
@@ -200,26 +208,27 @@ jobs:
200208 - name : Generate build files with cmake
201209 run : |
202210 cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
203- -DCMAKE_BUILD_TYPE=Debug \
204211 -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-19 \
205212 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-19 \
206- -GNinja \
207- -Bbuild .
213+ -G"Ninja Multi-Config" \
214+ -Bbuild/host .
208215 - name : Build Dive host tools with ninja with clang-19
209216 run : |
210- ninja -C build
217+ cmake --build build/host --config Debug
211218 - name : Ninja log
212219 run : |
213- cat build/.ninja_log
220+ cat build/host/ .ninja_log
214221 - name : Start Xvfb
215222 run : |
216223 Xvfb :99 -screen 0 1024x768x24 &
217224 export DISPLAY=:99
218-
219225 - name : Run tests
220226 run : |
221227 export DISPLAY=:99
222- ctest --output-on-failure -C Debug --test-dir build
228+ ctest --output-on-failure -C Debug --test-dir build/host
229+ - name : Install under build dir
230+ run : |
231+ cmake --install build/host --prefix build/pkg/host --config Debug
223232
224233 build_Linux_Clang_Release :
225234 name : " Linux clang release build"
@@ -252,26 +261,27 @@ jobs:
252261 - name : Generate build files with cmake
253262 run : |
254263 cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
255- -DCMAKE_BUILD_TYPE=Release \
256264 -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-19 \
257265 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-19 \
258- -GNinja \
259- -Bbuild .
266+ -G"Ninja Multi-Config" \
267+ -Bbuild/host .
260268 - name : Build Dive host tools with ninja with clang-19
261269 run : |
262- ninja -C build
270+ cmake --build build/host --config Release
263271 - name : Ninja log
264272 run : |
265- cat build/.ninja_log
273+ cat build/host/ .ninja_log
266274 - name : Start Xvfb
267275 run : |
268276 Xvfb :99 -screen 0 1024x768x24 &
269277 export DISPLAY=:99
270-
271278 - name : Run tests
272279 run : |
273280 export DISPLAY=:99
274- ctest --output-on-failure -C Release --test-dir build
281+ ctest --output-on-failure -C Release --test-dir build/host
282+ - name : Install under build dir
283+ run : |
284+ cmake --install build/host --prefix build/pkg/host --config Release
275285
276286 build_MacOS_Debug :
277287 name : " MacOS debug build"
@@ -300,24 +310,27 @@ jobs:
300310 run : ccache -z
301311 - name : Generate build files with cmake
302312 run : |
303- time cmake -DCMAKE_BUILD_TYPE=Debug \
313+ time cmake \
304314 -DCMAKE_C_COMPILER_LAUNCHER="cmake;-E;time;ccache" \
305315 -DCMAKE_CXX_COMPILER_LAUNCHER="cmake;-E;time;ccache" \
306316 -DCMAKE_C_LINKER_LAUNCHER="cmake;-E;time" \
307317 -DCMAKE_CXX_LINKER_LAUNCHER="cmake;-E;time" \
308- -GNinja \
309- -Bbuild .
318+ -G"Ninja Multi-Config" \
319+ -Bbuild/host .
310320 - name : Build Dive host tools with ninja
311321 run : |
312- time ninja -C build -d stats
322+ time cmake --build build/host --config Debug
313323 - name : Show ccache stats
314324 run : ccache -s
315325 - name : Ninja log
316326 run : |
317- cat build/.ninja_log
327+ cat build/host/ .ninja_log
318328 - name : Run tests
319329 run : |
320- ctest --output-on-failure -C Debug --test-dir build
330+ ctest --output-on-failure -C Debug --test-dir build/host
331+ - name : Install under build dir
332+ run : |
333+ cmake --install build/host --prefix build/pkg/host --config Debug
321334 - name : Upload cache
322335 uses : actions/cache/save@v4
323336 with :
@@ -351,24 +364,27 @@ jobs:
351364 run : ccache -z
352365 - name : Generate build files with cmake
353366 run : |
354- time cmake -DCMAKE_BUILD_TYPE=Release \
367+ time cmake \
355368 -DCMAKE_C_COMPILER_LAUNCHER="cmake;-E;time;ccache" \
356369 -DCMAKE_CXX_COMPILER_LAUNCHER="cmake;-E;time;ccache" \
357370 -DCMAKE_C_LINKER_LAUNCHER="cmake;-E;time" \
358371 -DCMAKE_CXX_LINKER_LAUNCHER="cmake;-E;time" \
359- -GNinja \
360- -Bbuild .
372+ -G"Ninja Multi-Config" \
373+ -Bbuild/host .
361374 - name : Build Dive host tools with ninja
362375 run : |
363- time ninja -C build -d stats
376+ time cmake --build build/host --config Release
364377 - name : Show ccache stats
365378 run : ccache -s
366379 - name : Ninja log
367380 run : |
368- cat build/.ninja_log
381+ cat build/host/ .ninja_log
369382 - name : Run tests
370383 run : |
371- ctest --output-on-failure -C Release --test-dir build
384+ ctest --output-on-failure -C Release --test-dir build/host
385+ - name : Install under build dir
386+ run : |
387+ cmake --install build/host --prefix build/pkg/host --config Release
372388 - name : Upload cache
373389 uses : actions/cache/save@v4
374390 with :
@@ -400,31 +416,87 @@ jobs:
400416 with :
401417 ndk-version : r25
402418 add-to-path : true
419+ - name : Generate build files with cmake
420+ run : |
421+ # DIVE_GFXR_GRADLE_CONSOLE=plain produces more readable output in CI
422+ cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
423+ -G "Ninja Multi-Config" \
424+ -DCMAKE_MAKE_PROGRAM="ninja" \
425+ -DCMAKE_SYSTEM_NAME=Android \
426+ -DANDROID_ABI=arm64-v8a \
427+ -DANDROID_PLATFORM=android-26 \
428+ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER \
429+ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER \
430+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
431+ -DDIVE_GFXR_GRADLE_CONSOLE=plain \
432+ -Bbuild/device .
433+ env :
434+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
435+ JAVA_HOME : ${{ steps.setup-java.outputs.java-home }}
436+ - name : Build lib with NDK
437+ run : |
438+ cmake --build build/device --config Debug
439+ env :
440+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
441+ JAVA_HOME : ${{ steps.setup-java.outputs.java-home }}
442+ - name : Install under build dir
443+ run : |
444+ cmake --install build/device --prefix build/pkg/device --config Debug
445+ - name : Ninja log
446+ run : |
447+ cat build/device/.ninja_log
403448
404- - name : Gemerate build files with cmake
449+ build_Android_from_Linux_Release :
450+ name : " Android Release build on Linux platform"
451+ runs-on : ubuntu-24.04
452+ steps :
453+ - name : Set up Java 17
454+ uses : actions/setup-java@v3
455+ id : setup-java
456+ with :
457+ java-version : ' 17'
458+ distribution : ' temurin'
459+ - name : Check out code
460+ uses : actions/checkout@v3
461+ with :
462+ submodules : recursive
463+ - name : Install dependency
464+ run : |
465+ sudo apt-get update --yes
466+ sudo apt-get install --yes cmake ninja-build
467+ sudo apt-get install python3-mako --yes
468+ sudo apt-get install libxcb-glx0-dev
469+ - uses : nttld/setup-ndk@v1
470+ id : setup-ndk
471+ with :
472+ ndk-version : r25
473+ add-to-path : true
474+ - name : Generate build files with cmake
405475 run : |
406476 # DIVE_GFXR_GRADLE_CONSOLE=plain produces more readable output in CI
407477 cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
408- -G "Ninja" \
478+ -G "Ninja Multi-Config " \
409479 -DCMAKE_MAKE_PROGRAM="ninja" \
410- -DCMAKE_BUILD_TYPE=Debug \
411480 -DCMAKE_SYSTEM_NAME=Android \
412481 -DANDROID_ABI=arm64-v8a \
413482 -DANDROID_PLATFORM=android-26 \
414483 -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER \
415484 -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER \
416485 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
417486 -DDIVE_GFXR_GRADLE_CONSOLE=plain \
418- -Bbuild .
487+ -Bbuild/device .
419488 env :
420489 ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
421490 JAVA_HOME : ${{ steps.setup-java.outputs.java-home }}
422491 - name : Build lib with NDK
423492 run : |
424- ninja -C build
493+ cmake --build build/device --config Release
425494 env :
426495 ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
427496 JAVA_HOME : ${{ steps.setup-java.outputs.java-home }}
497+ - name : Install under build dir
498+ run : |
499+ cmake --install build/device --prefix build/pkg/device --config Release
428500 - name : Ninja log
429501 run : |
430- cat build/.ninja_log
502+ cat build/device/ .ninja_log
0 commit comments