From 925e28dc4075d5248b10d8c4277f5383c0919c9f Mon Sep 17 00:00:00 2001 From: Laura Hermanns Date: Fri, 11 Aug 2023 19:07:09 -0400 Subject: [PATCH] Started uploading binaries as artifacts in CI scripts. --- .github/workflows/ci_linux.yml | 42 +++++++++++++++++++++++--------- .github/workflows/ci_macos.yml | 36 ++++++++++++++++++++------- .github/workflows/ci_windows.yml | 42 +++++++++++++++++++++++--------- 3 files changed, 88 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 1bbc4b08dc..698d9bf136 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -11,25 +11,30 @@ jobs: strategy: matrix: lib: [Shared, Static] - config: [Debug, Release] + config: [Release, Debug] fail-fast: false - + runs-on: ubuntu-latest + env: + README: ${{ github.workspace }}/README.txt + steps: - - uses: actions/checkout@v3 - - - name: Checkout Dependencies + - name: Checkout Repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install 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 run: > - cmake -S . -B ${{github.workspace}}/build_linux + cmake -S . -B ${{github.workspace}}/Linux-x86_64 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DLLGL_BUILD_STATIC_LIB=${{ matrix.lib == 'Static' && 'ON' || 'OFF' }} -DLLGL_BUILD_RENDERER_OPENGL=ON @@ -37,14 +42,29 @@ jobs: -DLLGL_BUILD_EXAMPLES=ON -DLLGL_BUILD_TESTS=ON -DLLGL_BUILD_WRAPPER_C99=ON - -DGaussLib_INCLUDE_DIR:STRING="GaussianLib/include" + -DLLGL_ENABLE_SPIRV_REFLECT=OFF + -DLLGL_GL_ENABLE_OPENGL2X=ON - name: Build - run: cmake --build ${{github.workspace}}/build_linux --config ${{ matrix.config }} + run: cmake --build ${{github.workspace}}/Linux-x86_64 --config ${{ matrix.config }} - name: Testbed working-directory: tests/Testbed run: | mkdir Output/ mkdir Output/OpenGL - xvfb-run ${{github.workspace}}/build_linux/build/${{ matrix.config == 'Debug' && 'TestbedD' || 'Testbed' }} gl -v -f -t + xvfb-run ${{github.workspace}}/Linux-x86_64/build/${{ matrix.config == 'Debug' && 'TestbedD' || 'Testbed' }} gl -v -f -t + CURRENT_TIME=$(date) + echo "LLGL built with GCC for Linux on $CURRENT_TIME." > ${{ env.README }} + echo "Place at root of LLGL repository to run examples and testbed." >> ${{ env.README }} + + - name: Upload Binaries + uses: actions/upload-artifact@v3 + if: matrix.lib == 'Shared' && matrix.config == 'Release' + with: + name: LLGL-Linux-${{ matrix.config }}-x86_64 + path: | + ${{ env.README }} + ${{ github.workspace }}/Linux-x86_64/build/libLLGL*.so + ${{ github.workspace }}/Linux-x86_64/build/Example_* + ${{ github.workspace }}/Linux-x86_64/build/Testbed* diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 4919053fa0..be5d48bea6 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -11,20 +11,23 @@ jobs: strategy: matrix: lib: [Shared, Static] - config: [Debug, Release] + config: [Release, Debug] fail-fast: false - + runs-on: macos-latest + env: + README: ${{ github.workspace }}/README.txt + steps: - - uses: actions/checkout@v3 - - - name: Checkout Dependencies - run: git clone https://github.com/LukasBanana/GaussianLib.git + - name: Checkout Repository + uses: actions/checkout@v3 + with: + submodules: recursive - name: Configure CMake run: > - cmake -S . -B ${{github.workspace}}/build + cmake -S . -B ${{github.workspace}}/macOS-x64 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DLLGL_BUILD_STATIC_LIB=${{ matrix.lib == 'Static' && 'ON' || 'OFF' }} -DLLGL_BUILD_RENDERER_OPENGL=ON @@ -32,8 +35,23 @@ jobs: -DLLGL_BUILD_EXAMPLES=ON -DLLGL_BUILD_TESTS=ON -DLLGL_BUILD_WRAPPER_C99=ON - -DGaussLib_INCLUDE_DIR:STRING="GaussianLib/include" + -DLLGL_GL_ENABLE_OPENGL2X=ON - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{ matrix.config }} + run: | + cmake --build ${{github.workspace}}/macOS-x64 --config ${{ matrix.config }} + CURRENT_TIME=$(date) + echo "LLGL built with Xcode for macOS on $CURRENT_TIME." > ${{ env.README }} + echo "Place at root of LLGL repository to run examples and testbed." >> ${{ env.README }} + + - name: Upload Binaries + uses: actions/upload-artifact@v3 + if: matrix.lib == 'Shared' && matrix.config == 'Release' + with: + name: LLGL-Mac-${{ matrix.config }}-x64 + path: | + ${{ env.README }} + ${{ github.workspace }}/macOS-x64/build/libLLGL*.dylib + ${{ github.workspace }}/macOS-x64/build/Example_*.app + ${{ github.workspace }}/macOS-x64/build/Testbed*.app diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index e6a8844212..4e90e32334 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -10,23 +10,26 @@ jobs: build_windows: strategy: matrix: - generator: [Visual Studio 16 2019, Visual Studio 17 2022] - arch: [Win32, x64] + generator: [Visual Studio 17 2022, Visual Studio 16 2019] + arch: [x64, Win32] lib: [Shared, Static] - config: [Debug, Release] + config: [Release, Debug] fail-fast: false - + runs-on: ${{ matrix.generator == 'Visual Studio 17 2022' && 'windows-latest' || 'windows-2019' }} + env: + README: ${{ github.workspace }}/README.txt + steps: - - uses: actions/checkout@v3 - - - name: Checkout Dependencies - run: git clone https://github.com/LukasBanana/GaussianLib.git + - name: Checkout Repository + uses: actions/checkout@v3 + with: + submodules: recursive - name: Configure CMake run: > - cmake -G "${{ matrix.generator }}" -A "${{ matrix.arch }}" -S . -B ${{ github.workspace }}/build + cmake -G "${{ matrix.generator }}" -A "${{ matrix.arch }}" -S . -B ${{ github.workspace }}/${{ matrix.arch }} -DLLGL_BUILD_STATIC_LIB=${{ matrix.lib == 'Static' && 'ON' || 'OFF' }} -DLLGL_BUILD_RENDERER_OPENGL=ON -DLLGL_BUILD_RENDERER_DIRECT3D11=ON @@ -34,8 +37,23 @@ jobs: -DLLGL_BUILD_EXAMPLES=ON -DLLGL_BUILD_TESTS=ON -DLLGL_BUILD_WRAPPER_C99=ON - -DGaussLib_INCLUDE_DIR:STRING="GaussianLib/include" + -DLLGL_ENABLE_SPIRV_REFLECT=ON + "-DLLGL_D3D11_ENABLE_FEATURELEVEL=Direct3D 11.3" + -DLLGL_GL_ENABLE_OPENGL2X=ON - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.config }} - + run: | + cmake --build ${{ github.workspace }}/${{ matrix.arch }} --config ${{ matrix.config }} + echo "LLGL built with ${{ matrix.generator }} for ${{ matrix.arch }} on %DATE% %TIME." > ${{ env.README }} + echo "Place at root of LLGL repository to run examples and testbed." >> ${{ env.README }} + + - name: Upload Binaries + uses: actions/upload-artifact@v3 + if: matrix.generator == 'Visual Studio 17 2022' && matrix.arch == 'x64' && matrix.lib == 'Shared' && matrix.config == 'Release' + with: + name: LLGL-Windows-${{ matrix.config }}-${{ matrix.arch }} + path: | + ${{ env.README }} + ${{ github.workspace }}/${{ matrix.arch }}/build/${{ matrix.config }}/LLGL*.dll + ${{ github.workspace }}/${{ matrix.arch }}/build/${{ matrix.config }}/Example_*.exe + ${{ github.workspace }}/${{ matrix.arch }}/build/${{ matrix.config }}/Testbed*.exe