-
Notifications
You must be signed in to change notification settings - Fork 140
82 lines (71 loc) · 3 KB
/
ci_linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: GNU/Linux
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build_linux:
strategy:
matrix:
ext: [Full, Limited]
lib: [Shared, Static]
config: [Release, Debug]
fail-fast: false
runs-on: ubuntu-latest
env:
README: ${{ github.workspace }}/README.txt
EXT_FULL: ${{ matrix.ext == 'Full' && 'ON' || 'OFF' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Dependencies
run: |
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}}/Linux-x86_64
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
-DLLGL_BUILD_STATIC_LIB=${{ matrix.lib == 'Static' && 'ON' || 'OFF' }}
-DLLGL_BUILD_RENDERER_NULL=${{ env.EXT_FULL }}
-DLLGL_BUILD_RENDERER_OPENGL=ON
-DLLGL_BUILD_RENDERER_VULKAN=${{ env.EXT_FULL }}
-DLLGL_BUILD_EXAMPLES=ON
-DLLGL_BUILD_TESTS=ON
-DLLGL_BUILD_WRAPPER_C99=${{ env.EXT_FULL }}
-DLLGL_VK_ENABLE_SPIRV_REFLECT=${{ env.EXT_FULL }}
-DLLGL_GL_ENABLE_OPENGL2X=ON
-DLLGL_GL_ENABLE_DSA_EXT=${{ env.EXT_FULL }}
-DLLGL_GL_ENABLE_VENDOR_EXT=${{ env.EXT_FULL }}
- name: Build
run: cmake --build ${{github.workspace}}/Linux-x86_64 --config ${{ matrix.config }}
- name: Upload Binaries
uses: actions/upload-artifact@v4
if: matrix.ext == 'Full' && matrix.lib == 'Shared' && matrix.config == 'Release'
with:
name: LLGL-Ubuntu-${{ 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*
- name: Testbed
working-directory: tests/Testbed
run: |
xvfb-run ${{github.workspace}}/Linux-x86_64/build/${{ matrix.config == 'Debug' && 'TestbedD' || 'Testbed' }} gl -v -f -t -g ${{ matrix.config == 'Debug' && '-d' || '' }}
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 Test Report
uses: actions/upload-artifact@v4
if: ${{ always() && matrix.ext == 'Full' && matrix.lib == 'Shared' && matrix.config == 'Release' }}
with:
name: LLGL-Ubuntu-Test_Report
path: |
tests/Testbed/Output/OpenGL/*.png
tests/Testbed/Output/OpenGL/Report.txt