-
-
Notifications
You must be signed in to change notification settings - Fork 303
108 lines (99 loc) · 3.61 KB
/
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Linux
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: [Debug]
option: [default, ref, shared, no_sample, no_data, no_fbx, no_gltf, no_tests]
cxx_standard: ['11']
include:
- build_type: Release
option: default
- build_type: Debug
option: gcc10
compiler_c: gcc-10
compiler_cxx: g++-10
- build_type: Debug
option: gcc11
compiler_c: gcc-11
compiler_cxx: g++-11
- build_type: Debug
option: gcc12
compiler_c: gcc-12
compiler_cxx: g++-12
- build_type: Debug
option: gcc13
compiler_c: gcc-13
compiler_cxx: g++-13
- build_type: Release
option: gcc13
compiler_c: gcc-13
compiler_cxx: g++-13
- build_type: Debug
option: clang11
compiler_c: clang-11
compiler_cxx: clang++-11
- build_type: Debug
option: clang12
compiler_c: clang-12
compiler_cxx: clang++-12
- build_type: Debug
option: clang13
compiler_c: clang-13
compiler_cxx: clang++-13
- build_type: Debug
option: clang14
compiler_c: clang-14
compiler_cxx: clang++-14
- build_type: Debug
option: clang15
compiler_c: clang-15
compiler_cxx: clang++-15
- build_type: Release
option: clang15
compiler_c: clang-15
compiler_cxx: clang++-15
steps:
- uses: actions/checkout@v4
- name: Install OpenGL dependency
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
- name: Install c compiler
if: matrix.compiler_c
run: |
sudo apt-get install ${{matrix.compiler_c}}
- name: Install cxx compiler
if: matrix.compiler_cxx
run: |
sudo apt-get install ${{matrix.compiler_cxx}}
- name: Install fbx sdk
if: matrix.option != 'no_fbx'
run: |
mkdir fbx
cd fbx
sudo wget --user-agent='Mozilla/5.0' 'https://damassets.autodesk.net/content/dam/autodesk/www/adn/fbx/2020-3-4/fbx202034_fbxsdk_linux.tar.gz' -O 'fbx.tar.gz'
sudo tar -xf 'fbx.tar.gz'
(yes yes | sudo ./*_fbxsdk_linux /usr/local) || true
sudo chmod -R 755 /usr/local/lib
sudo chmod -R 755 /usr/local/include
cd ..
- name: Configure
# Configure CMake in a 'build' subdirectory.
run: |
cmake --version
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.option == 'shared'}} -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -Dozz_build_tests=${{matrix.option != 'no_tests'}} -Dozz_build_simd_ref=${{matrix.option == 'ref'}} -Dozz_build_samples=${{matrix.option != 'no_sample'}} -Dozz_build_data=${{matrix.option != 'no_data'}} -Dozz_build_gltf=${{matrix.option != 'no_gltf'}}
env:
# Sets compiler if available
CC: ${{matrix.compiler_c}}
CXX: ${{matrix.compiler_cxx}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --use-stderr
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
run: ctest -C ${{matrix.build_type}} --output-on-failure -j2