-
Notifications
You must be signed in to change notification settings - Fork 142
147 lines (123 loc) · 5.24 KB
/
build-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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Linux build
on: [push, pull_request]
jobs:
precheks:
runs-on: ubuntu-20.04
name: Linux -> Pre-checks
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Format validation
shell: bash
working-directory: ${{github.workspace}}/BuildTools/FormatValidation
run: ./validate_format_linux.sh
- name: Codespell
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
ignore_words_file: .github/.codespellignore
skip: ./.git,./ThirdParty
path: .
build:
needs: precheks
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- name: "GCC"
build_type: "Debug"
cmake_generator: "Unix Makefiles"
cmake_args: "-DDILIGENT_BUILD_TESTS=ON"
cc: "gcc-9"
cxx: "g++-9"
- name: "GCC"
build_type: "Release"
cmake_generator: "Unix Makefiles"
cmake_args: "-DDILIGENT_BUILD_TESTS=ON"
cc: "gcc-9"
cxx: "g++-9"
- name: "Clang"
build_type: "Debug"
cmake_generator: "Ninja"
cmake_args: "-DDILIGENT_BUILD_TESTS=ON"
cc: "clang-12"
cxx: "clang++-12"
- name: "Clang"
build_type: "Release"
cmake_generator: "Ninja"
cmake_args: "-DDILIGENT_BUILD_TESTS=ON"
cc: "clang-12"
cxx: "clang++-12"
- name: "Clang-NO_GLSLANG"
build_type: "Debug"
cmake_generator: "Ninja"
cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_NO_OPENGL=ON -DDILIGENT_NO_GLSLANG=ON"
cc: "clang-12"
cxx: "clang++-12"
- name: "Clang-NO_GLSLANG-NO_HLSL"
build_type: "Release"
cmake_generator: "Ninja"
cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON"
cc: "clang-12"
cxx: "clang++-12"
name: Linux -> ${{ matrix.name }}-x64, ${{ matrix.build_type }}
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up build environment
if: success()
uses: DiligentGraphics/github-action/setup-build-env@v1
with:
platform: Linux
cmake-generator: ${{ matrix.cmake_generator }}
- name: Configure CMake
if: success()
uses: DiligentGraphics/github-action/configure-cmake@v1
with:
cc: ${{ matrix.cc }}
cxx: ${{ matrix.cxx }}
generator: ${{ matrix.cmake_generator }}
build-type: ${{ matrix.build_type }}
cmake-args: ${{ matrix.cmake_args }}
- name: Build
id: build
if: success()
uses: DiligentGraphics/github-action/build@v1
with:
target: install
- name: DiligentCoreTest
if: success()
uses: DiligentGraphics/github-action/run-core-tests@v1
- name: DiligentCoreAPITest VK
# NB: it is essential to include failure() to override the default status check of success()
# that is automatically applied to if conditions that don't contain a status check function.
if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Clang' || matrix.name == 'GCC') }}
uses: DiligentGraphics/github-action/run-core-gpu-tests@v1
with:
mode: vk_sw
args: --gtest_filter=-DrawCommandTest.DrawIndexedInstancedIndirect_FirstInstance_BaseVertex_FirstIndex_VBOffset_IBOffset_InstOffset:TextureCreation/TextureCreationTest.CreateTexture/TEX_FORMAT_BGRA8_TYPELESS
- name: DiligentCoreAPITest GL
if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Clang' || matrix.name == 'GCC') }}
uses: DiligentGraphics/github-action/run-core-gpu-tests@v1
with:
mode: gl
args: "--gtest_filter=-DrawCommandTest.MultiDrawIndirectCount:DrawCommandTest.MultiDrawIndexedIndirectCount:PipelineResourceSignatureTest.StructuredBuffers"
- name: DiligentCoreAPITest GL with Non-Separable Programs
if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Clang' || matrix.name == 'GCC') }}
uses: DiligentGraphics/github-action/run-core-gpu-tests@v1
with:
mode: gl
non-separable-progs: true
args: "--gtest_filter=-DrawCommandTest.MultiDrawIndirectCount:DrawCommandTest.MultiDrawIndexedIndirectCount:PipelineResourceSignatureTest.StructuredBuffers:DrawCommandTest.StructuredBufferArray"
- name: Upload artifact
uses: actions/upload-artifact@v3
if: ${{ success() && matrix.build_type != 'Debug' }}
with:
name: DiligentCore-Linux-${{ matrix.name }}-x64-${{ matrix.build_type }}
path: |
${{env.DILIGENT_INSTALL_DIR}}
!${{env.DILIGENT_INSTALL_DIR}}/**/*.a
retention-days: 90