Skip to content

Commit

Permalink
Started uploading binaries as artifacts in CI scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Aug 12, 2023
1 parent 73788f6 commit 925e28d
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 32 deletions.
42 changes: 31 additions & 11 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,60 @@ 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
-DLLGL_BUILD_RENDERER_VULKAN=ON
-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*
36 changes: 27 additions & 9 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,47 @@ 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
-DLLGL_BUILD_RENDERER_METAL=ON
-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
42 changes: 30 additions & 12 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,50 @@ 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
-DLLGL_BUILD_RENDERER_DIRECT3D12=ON
-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

0 comments on commit 925e28d

Please sign in to comment.