-
-
Notifications
You must be signed in to change notification settings - Fork 66
172 lines (154 loc) Β· 4.91 KB
/
build.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: π macOS (Clang - Debug)
os: macos-latest
platform: macos
build_type: Debug
build_shared: OFF
build_test: ON
validation_level: 2
- name: π macOS (Clang, no validation - Release)
os: macos-latest
platform: macos
build_type: Release
build_shared: OFF
build_test: ON
validation_level: 0 # build one with no validation
- name: π macOS (Clang, Shared - Release)
os: macos-latest
platform: macos
build_type: Release
build_shared: ON
build_test: ON
validation_level: 2
- name: π§ Linux (GCC - Debug)
os: ubuntu-latest
platform: linux
build_type: Debug
build_shared: OFF
build_test: ON
validation_level: 2
- name: π§ Linux (GCC, extra validation - Release)
os: ubuntu-latest
platform: linux
build_type: Release
build_shared: OFF
build_test: ON
validation_level: 1 # build one with basic validation
- name: π§ Linux (GCC, Shared - Release)
os: ubuntu-latest
platform: linux
build_type: Release
build_shared: ON
build_test: ON
validation_level: 2
- name: πͺ Windows (MSVC - Debug)
os: windows-latest
platform: windows
arch: x86_64
build_type: Debug
build_debug: ON
build_shared: OFF
build_test: ON
validation_level: 2
- name: πͺ Windows (MSVC [32-bit] - Debug)
os: windows-latest
platform: windows
arch: x86
build_type: Debug
build_debug: ON
build_shared: OFF
build_test: OFF
validation_level: 2
- name: πͺ Windows (MSVC - Release)
os: windows-latest
platform: windows
arch: x86_64
build_type: Release
build_shared: OFF
build_test: ON
validation_level: 2
- name: πͺ Windows (MSVC, Shared - Release)
os: windows-latest
platform: windows
arch: x86_64
build_type: Release
build_shared: ON
build_test: ON
validation_level: 2
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout Test Data
uses: actions/checkout@v4
with:
repository: 'asmaloney/libE57Format-test-data'
path: libE57Format-test-data
- name: Install Dependencies (macOS)
if: matrix.platform == 'macos'
run: |
brew install ccache ninja xerces-c
- name: Install Dependencies (Linux)
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y ccache libxerces-c-dev ninja-build
sudo locale-gen fr_FR
- name: Install Dependencies (Windows)
if: matrix.platform == 'windows'
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge
- name: Install More Dependencies (Windows)
if: matrix.platform == 'windows'
shell: bash -el {0}
run: |
conda install conda-forge::xerces-c
choco upgrade ccache ninja
ccache --version | head -n 1
echo "ninja $(ninja --version)"
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
max-size: '5G'
key: ${{ matrix.os }}-${{ matrix.build_type }}
- name: Configure MSVC console (Windows)
if: matrix.platform == 'windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Output conda info (Windows)
if: matrix.platform == 'windows'
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Configure
run: >
mkdir libE57Format-build
cmake
-B libE57Format-build
-G "Ninja"
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DE57_BUILD_SHARED=${{ matrix.build_shared }}
-DE57_BUILD_TEST=${{ matrix.build_test }}
-DE57_VALIDATION_LEVEL=${{ matrix.validation_level }}
-DE57FORMAT_SANITIZE_ALL:BOOL=ON
.
- name: Build
run: cmake --build libE57Format-build
- name: Test
if: matrix.build_test == 'ON'
run: libE57Format-build/testE57