# https://docs.github.com/en/actions name: CI Build on: workflow_dispatch: env: BUILD_TYPE: Debug jobs: build-ubuntu-gcc: name: ubuntu-gcc runs-on: ubuntu-latest if: github.event_name == 'push' || github.event.pull_request.draft == false timeout-minutes: 4 steps: - uses: actions/checkout@v6 - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX3D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DBOX3D_VALIDATE=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build run: ./bin/test build-ubuntu-clang: name: ubuntu-clang runs-on: ubuntu-latest if: github.event_name == 'push' || github.event.pull_request.draft == false timeout-minutes: 4 steps: - uses: actions/checkout@v6 - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 -DCMAKE_C_FLAGS="-fsanitize=thread -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=thread -fno-omit-frame-pointer" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=thread" -DBOX3D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DBOX3D_VALIDATE=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build run: ./bin/test build-ubuntu-clang-msan: name: ubuntu-clang-msan runs-on: ubuntu-latest if: false # todo re-enable once repo is public timeout-minutes: 10 steps: - uses: actions/checkout@v6 - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 -DCMAKE_C_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=1 -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=1 -fno-omit-frame-pointer" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=memory" -DBOX3D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DBOX3D_VALIDATE=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build env: MSAN_OPTIONS: abort_on_error=1:halt_on_error=1 run: ./bin/test build-macos: name: macos runs-on: macos-latest if: github.event_name == 'push' || github.event.pull_request.draft == false timeout-minutes: 4 steps: - uses: actions/checkout@v6 - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX3D_SAMPLES=OFF -DBOX3D_SANITIZE=ON -DBUILD_SHARED_LIBS=OFF -DBOX3D_VALIDATE=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build run: ./bin/test build-windows: name: windows runs-on: windows-latest if: github.event_name == 'push' || github.event.pull_request.draft == false timeout-minutes: 4 steps: - uses: actions/checkout@v6 - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX3D_SAMPLES=OFF -DBOX3D_VALIDATE=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build run: ./bin/${{env.BUILD_TYPE}}/test samples-windows: name: samples-windows runs-on: windows-latest if: github.event_name == 'push' || github.event.pull_request.draft == false timeout-minutes: 6 steps: - uses: actions/checkout@v6 - name: Setup MSVC dev command prompt uses: TheMrMilchmann/setup-msvc-dev@v4 with: arch: x64 - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBOX3D_SAMPLES=ON -DBUILD_SHARED_LIBS=OFF -DBOX3D_UNIT_TESTS=OFF - name: Build run: cmake --build ${{github.workspace}}/build --config Release samples-macos: name: samples-macos runs-on: macos-latest if: github.event_name == 'push' || github.event.pull_request.draft == false timeout-minutes: 6 steps: - uses: actions/checkout@v6 - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBOX3D_SAMPLES=ON -DBUILD_SHARED_LIBS=OFF -DBOX3D_UNIT_TESTS=OFF - name: Build run: cmake --build ${{github.workspace}}/build --config Release