From 559495645f2a863e48a15e340f1d866d560b9a8a Mon Sep 17 00:00:00 2001 From: Moritz Heinemann Date: Tue, 9 Jul 2024 20:18:52 +0200 Subject: [PATCH] build all configurations with github actions --- .github/workflows/build.yml | 73 +++++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0577b46433..6c366be119 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,11 @@ env: -DMEGAMOL_USE_PROFILING=ON -DMEGAMOL_USE_STACKTRACE=ON -DMEGAMOL_USE_TRACY=ON - -DMEGAMOL_USE_VTKM=OFF + -DMEGAMOL_USE_VTKM=ON + MM_NO_GL_CONFIG: >- + -DMEGAMOL_VCPKG_DOWNLOAD_CACHE=ON + -DMEGAMOL_WARNING_LEVEL="Off" + -DMEGAMOL_USE_OPENGL=OFF jobs: vcpkg_cache: @@ -111,41 +115,72 @@ jobs: CXX: ${{ matrix.job.cxx }} VCPKG_BINARY_SOURCES: "clear;http,https://vcpkg-cache.megamol.org/{triplet}-{name}-{sha},readwrite,Authorization: Token ${{ secrets.CACHING_SERVER_SECRET }}" build_windows: + if: ${{ always() }} + needs: vcpkg_cache strategy: fail-fast: false matrix: - configuration: [Release] - name: "Windows-Build (${{ matrix.configuration }})" + job: + - name: Release + configuration: Release + options: ${{ env.MM_DEFAULT_CONFIG }} + - name: Debug + configuration: Debug + options: ${{ env.MM_DEFAULT_CONFIG }} + - name: Release-No-GL + configuration: Release + options: ${{ env.MM_NO_GL_CONFIG }} + name: "Windows (${{ matrix.job.name }})" runs-on: windows-2022 steps: - uses: actions/checkout@v4 + with: + show-progress: false - name: Configure run: >- - cmake -S . -B ${{ github.workspace }}/build -G "Visual Studio 17 2022" - ${{ env.MM_DEFAULT_CONFIG }} + cmake -S . -B $GITHUB_WORKSPACE/build -G "Visual Studio 17 2022" + ${{ matrix.job.options }} - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.configuration }} --parallel 2 + run: cmake --build $GITHUB_WORKSPACE/build --config ${{ matrix.job.configuration }} --parallel 2 build_linux: + if: ${{ always() }} + needs: vcpkg_cache strategy: fail-fast: false matrix: - docker_image: [megamol_ci_ubuntu] - compiler: - - cc: clang-14 - cxx: clang++-14 - configuration: [Release] - name: "Linux-Build (${{ matrix.compiler.cc }}, ${{ matrix.configuration }})" - runs-on: ubuntu-22.04 + job: + - name: 'GCC13 Debug' + container: megamol_ci_ubuntu + cc: gcc-13 + cxx: g++-13 + configuration: Debug + options: ${{ env.MM_DEFAULT_CONFIG }} + - name: 'Clang18 Release' + container: megamol_ci_ubuntu + cc: clang-18 + cxx: clang++-18 + configuration: Release + options: ${{ env.MM_DEFAULT_CONFIG }} + - name: 'GCC13 Release No-GL' + container: megamol_ci_ubuntu + cc: gcc-13 + cxx: g++-13 + configuration: Release + options: ${{ env.MM_NO_GL_CONFIG }} + name: "Linux (${{ matrix.job.name }})" + runs-on: ubuntu-24.04 container: - image: ghcr.io/unistuttgart-visus/${{ matrix.docker_image }}:master + image: ghcr.io/unistuttgart-visus/${{ matrix.job.container }}:master steps: - uses: actions/checkout@v4 + with: + show-progress: false - name: Configure run: >- - cmake -S . -B ${{ github.workspace }}/build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} - ${{ env.MM_DEFAULT_CONFIG }} + cmake -S . -B $GITHUB_WORKSPACE/build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.job.configuration }} + ${{ matrix.job.options }} - name: Build - run: cmake --build ${{ github.workspace }}/build + run: cmake --build $GITHUB_WORKSPACE/build env: - CC: ${{ matrix.compiler.cc }} - CXX: ${{ matrix.compiler.cxx }} + CC: ${{ matrix.job.cc }} + CXX: ${{ matrix.job.cxx }}