Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 125 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ jobs:
python3 -m pip install mako
- name: Generate build files with cmake
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 17 2022" -A x64 -Bbuild .
cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 17 2022" -A x64 -Bbuild/host .
- name: Build Dive host tools with VS 2022
run: |
cmake --build build --config Debug
cmake --build build/host --config Debug
- name: Run tests
run: |
ctest --output-on-failure -C Debug --test-dir build
ctest --output-on-failure -C Debug --test-dir build/host
- name: Install under build dir
run: |
cmake --install build/host --prefix build/pkg/host --config Debug

build_Windows_Release:
name: "Windows release build"
runs-on: windows-2022
Expand All @@ -55,14 +59,16 @@ jobs:
python3 -m pip install mako
- name: Generate build files with cmake
run: |
cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A x64 -Bbuild .
cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A x64 -Bbuild/host .
- name: Build Dive host tools with VS 2022
run: |
cmake --build build --config Release
cmake --build build/host --config Release
- name: Run tests
run: |
ctest --output-on-failure -C Release --test-dir build

ctest --output-on-failure -C Release --test-dir build/host
- name: Install under build dir
run: |
cmake --install build/host --prefix build/pkg/host --config Release

build_Linux_Gcc_Debug:
name: "Linux gcc debug build"
Expand Down Expand Up @@ -96,26 +102,27 @@ jobs:
- name: Generate build files with cmake
run: |
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-14 \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-14 \
-GNinja \
-Bbuild .
-G "Ninja Multi-Config" \
-Bbuild/host .
- name: Build Dive host tools with ninja with gcc-14
run: |
ninja -C build
cmake --build build/host --config Debug
- name: Ninja log
run: |
cat build/.ninja_log
cat build/host/.ninja_log
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99

- name: Run tests
run: |
export DISPLAY=:99
ctest --output-on-failure -C Debug --test-dir build
ctest --output-on-failure -C Debug --test-dir build/host
- name: Install under build dir
run: |
cmake --install build/host --prefix build/pkg/host --config Debug

build_Linux_Gcc_Release:
name: "Linux gcc release build"
Expand Down Expand Up @@ -148,26 +155,27 @@ jobs:
- name: Generate build files with cmake
run: |
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-14 \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-14 \
-GNinja \
-Bbuild .
-G"Ninja Multi-Config" \
-Bbuild/host .
- name: Build Dive host tools with ninja with gcc-14
run: |
ninja -C build
cmake --build build/host --config Release
- name: Ninja log
run: |
cat build/.ninja_log
cat build/host/.ninja_log
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99

- name: Run tests
run: |
export DISPLAY=:99
ctest --output-on-failure -C Release --test-dir build
ctest --output-on-failure -C Release --test-dir build/host
- name: Install under build dir
run: |
cmake --install build/host --prefix build/pkg/host --config Release

build_Linux_Clang_Debug:
name: "Linux clang debug build"
Expand Down Expand Up @@ -200,26 +208,27 @@ jobs:
- name: Generate build files with cmake
run: |
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-19 \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-19 \
-GNinja \
-Bbuild .
-G"Ninja Multi-Config" \
-Bbuild/host .
- name: Build Dive host tools with ninja with clang-19
run: |
ninja -C build
cmake --build build/host --config Debug
- name: Ninja log
run: |
cat build/.ninja_log
cat build/host/.ninja_log
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99

- name: Run tests
run: |
export DISPLAY=:99
ctest --output-on-failure -C Debug --test-dir build
ctest --output-on-failure -C Debug --test-dir build/host
- name: Install under build dir
run: |
cmake --install build/host --prefix build/pkg/host --config Debug

build_Linux_Clang_Release:
name: "Linux clang release build"
Expand Down Expand Up @@ -252,26 +261,27 @@ jobs:
- name: Generate build files with cmake
run: |
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-19 \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-19 \
-GNinja \
-Bbuild .
-G"Ninja Multi-Config" \
-Bbuild/host .
- name: Build Dive host tools with ninja with clang-19
run: |
ninja -C build
cmake --build build/host --config Release
- name: Ninja log
run: |
cat build/.ninja_log
cat build/host/.ninja_log
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99

- name: Run tests
run: |
export DISPLAY=:99
ctest --output-on-failure -C Release --test-dir build
ctest --output-on-failure -C Release --test-dir build/host
- name: Install under build dir
run: |
cmake --install build/host --prefix build/pkg/host --config Release

build_MacOS_Debug:
name: "MacOS debug build"
Expand Down Expand Up @@ -300,24 +310,27 @@ jobs:
run: ccache -z
- name: Generate build files with cmake
run: |
time cmake -DCMAKE_BUILD_TYPE=Debug \
time cmake \
-DCMAKE_C_COMPILER_LAUNCHER="cmake;-E;time;ccache" \
-DCMAKE_CXX_COMPILER_LAUNCHER="cmake;-E;time;ccache" \
-DCMAKE_C_LINKER_LAUNCHER="cmake;-E;time" \
-DCMAKE_CXX_LINKER_LAUNCHER="cmake;-E;time" \
-GNinja \
-Bbuild .
-G"Ninja Multi-Config" \
-Bbuild/host .
- name: Build Dive host tools with ninja
run: |
time ninja -C build -d stats
time cmake --build build/host --config Debug
- name: Show ccache stats
run: ccache -s
- name: Ninja log
run: |
cat build/.ninja_log
cat build/host/.ninja_log
- name: Run tests
run: |
ctest --output-on-failure -C Debug --test-dir build
ctest --output-on-failure -C Debug --test-dir build/host
- name: Install under build dir
run: |
cmake --install build/host --prefix build/pkg/host --config Debug
- name: Upload cache
uses: actions/cache/save@v4
with:
Expand Down Expand Up @@ -351,24 +364,27 @@ jobs:
run: ccache -z
- name: Generate build files with cmake
run: |
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake \
-DCMAKE_C_COMPILER_LAUNCHER="cmake;-E;time;ccache" \
-DCMAKE_CXX_COMPILER_LAUNCHER="cmake;-E;time;ccache" \
-DCMAKE_C_LINKER_LAUNCHER="cmake;-E;time" \
-DCMAKE_CXX_LINKER_LAUNCHER="cmake;-E;time" \
-GNinja \
-Bbuild .
-G"Ninja Multi-Config" \
-Bbuild/host .
- name: Build Dive host tools with ninja
run: |
time ninja -C build -d stats
time cmake --build build/host --config Release
- name: Show ccache stats
run: ccache -s
- name: Ninja log
run: |
cat build/.ninja_log
cat build/host/.ninja_log
- name: Run tests
run: |
ctest --output-on-failure -C Release --test-dir build
ctest --output-on-failure -C Release --test-dir build/host
- name: Install under build dir
run: |
cmake --install build/host --prefix build/pkg/host --config Release
- name: Upload cache
uses: actions/cache/save@v4
with:
Expand Down Expand Up @@ -400,31 +416,87 @@ jobs:
with:
ndk-version: r25
add-to-path: true
- name: Generate build files with cmake
run: |
# DIVE_GFXR_GRADLE_CONSOLE=plain produces more readable output in CI
cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
-G "Ninja Multi-Config" \
-DCMAKE_MAKE_PROGRAM="ninja" \
-DCMAKE_SYSTEM_NAME=Android \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-26 \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DDIVE_GFXR_GRADLE_CONSOLE=plain \
-Bbuild/device .
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
- name: Build lib with NDK
run: |
cmake --build build/device --config Debug
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
- name: Install under build dir
run: |
cmake --install build/device --prefix build/pkg/device --config Debug
- name: Ninja log
run: |
cat build/device/.ninja_log

- name: Gemerate build files with cmake
build_Android_from_Linux_Release:
name: "Android Release build on Linux platform"
runs-on: ubuntu-24.04
steps:
- name: Set up Java 17
uses: actions/setup-java@v3
id: setup-java
with:
java-version: '17'
distribution: 'temurin'
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependency
run: |
sudo apt-get update --yes
sudo apt-get install --yes cmake ninja-build
sudo apt-get install python3-mako --yes
sudo apt-get install libxcb-glx0-dev
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25
add-to-path: true
- name: Generate build files with cmake
run: |
# DIVE_GFXR_GRADLE_CONSOLE=plain produces more readable output in CI
cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
-G "Ninja" \
-G "Ninja Multi-Config" \
-DCMAKE_MAKE_PROGRAM="ninja" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_SYSTEM_NAME=Android \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-26 \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DDIVE_GFXR_GRADLE_CONSOLE=plain \
-Bbuild .
-Bbuild/device .
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
- name: Build lib with NDK
run: |
ninja -C build
cmake --build build/device --config Release
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
- name: Install under build dir
run: |
cmake --install build/device --prefix build/pkg/device --config Release
- name: Ninja log
run: |
cat build/.ninja_log
cat build/device/.ninja_log
Loading