Skip to content

Commit

Permalink
Generalized build matrix in Linux CIS script.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Aug 3, 2023
1 parent acd90cc commit 55d2b7b
Showing 1 changed file with 12 additions and 34 deletions.
46 changes: 12 additions & 34 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,13 @@ on:
branches: [ "master" ]

jobs:
build_linux_debug:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
build_linux:
strategy:
matrix:
config: [Debug, Release]
lib: [Shared, Static]
fail-fast: false

- name: Checkout Dependencies
run: |
git clone https://github.com/LukasBanana/GaussianLib.git
sudo wget -O /etc/apt/trusted.gpg.d/lunarg-signing-key-pub.asc http://packages.lunarg.com/lunarg-signing-key-pub.asc
sudo wget -O /etc/apt/sources.list.d/lunarg-vulkan-1.3.236-jammy.list https://packages.lunarg.com/vulkan/1.3.236/lunarg-vulkan-1.3.236-jammy.list
sudo apt update
sudo apt-get install libx11-dev libxrandr-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev vulkan-sdk vulkan-tools
- name: Configure CMake Debug
run: cmake -S . -B ${{github.workspace}}/build_debug -DCMAKE_BUILD_TYPE=Debug -DLLGL_BUILD_RENDERER_OPENGL=ON -DLLGL_BUILD_RENDERER_VULKAN=ON -DLLGL_BUILD_EXAMPLES=ON -DLLGL_BUILD_TESTS=ON -DLLGL_BUILD_WRAPPER_C99=ON -DGaussLib_INCLUDE_DIR:STRING="GaussianLib/include"

- name: Build Debug
run: cmake --build ${{github.workspace}}/build_debug --config Debug

- name: Testbed Debug
working-directory: tests/Testbed
run: |
mkdir Output/
mkdir Output/OpenGL
xvfb-run ${{github.workspace}}/build_debug/build/TestbedD gl -v -f -t
build_linux_release:
runs-on: ubuntu-latest

steps:
Expand All @@ -48,16 +27,15 @@ jobs:
sudo apt update
sudo apt-get install libx11-dev libxrandr-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev vulkan-sdk vulkan-tools
- name: Configure CMake Release
run: cmake -S . -B ${{github.workspace}}/build_linux_release -DCMAKE_BUILD_TYPE=Release -DLLGL_BUILD_RENDERER_OPENGL=ON -DLLGL_BUILD_RENDERER_VULKAN=ON -DLLGL_BUILD_EXAMPLES=ON -DLLGL_BUILD_TESTS=ON -DLLGL_BUILD_WRAPPER_C99=ON -DGaussLib_INCLUDE_DIR:STRING="GaussianLib/include"
- name: Configure CMake
run: cmake -S . -B ${{github.workspace}}/build_linux -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DLLGL_BUILD_STATIC_LIB=${{ matrix.lib == 'Static' && 'ON' || 'OFF' }} -DLLGL_BUILD_RENDERER_OPENGL=ON -DLLGL_BUILD_RENDERER_VULKAN=ON -DLLGL_BUILD_EXAMPLES=ON -DLLGL_BUILD_TESTS=ON -DLLGL_BUILD_WRAPPER_C99=ON -DGaussLib_INCLUDE_DIR:STRING="GaussianLib/include"

- name: Build Release
run: cmake --build ${{github.workspace}}/build_linux_release --config Release
- name: Build
run: cmake --build ${{github.workspace}}/build_linux --config ${{ matrix.config }}

- name: Testbed Release
- name: Testbed
working-directory: tests/Testbed
run: |
mkdir Output/
mkdir Output/OpenGL
xvfb-run ${{github.workspace}}/build_linux_release/build/Testbed gl -v -f -t
xvfb-run ${{github.workspace}}/build_linux/build/${{ matrix.config == 'Debug' && 'TestbedD' || 'Testbed' }} gl -v -f -t

0 comments on commit 55d2b7b

Please sign in to comment.