-
Notifications
You must be signed in to change notification settings - Fork 93
201 lines (184 loc) · 6.41 KB
/
Copy pathcmake.yml
File metadata and controls
201 lines (184 loc) · 6.41 KB
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: CMake Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
name: ${{matrix.build_type}} on ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
variant: [All]
build_type: [Release]
c_compiler: [gcc, clang]
use_cuda: [OFF]
use_qt5: [OFF]
use_deskvox: [OFF]
BUILD_energy: [ON]
build_arrow: [ON]
test_energy: [ON]
debug_ennovatis: [ON]
drivingsim: [OFF]
include:
- os: 'ubuntu-latest'
c_compiler: gcc
cxx_compiler: g++
- os: 'ubuntu-latest'
c_compiler: clang
cxx_compiler: clang++
steps:
- name: Show info
if: runner.os == 'Linux'
run: |
cat /etc/apt/apt.conf || true
cat /etc/apt/apt.conf.d/* || true
ls -l /etc/apt/sources.list && cat /etc/apt/sources.list || true
ls -l /etc/apt/sources.list.d/* && cat /etc/apt/sources.list.d/* || true
- name: Clean apt
if: runner.os == 'Linux'
run: >
sudo apt-get clean && sudo rm -rf /etc/apt/sources.list.d/microsoft-prod.list && sudo rm -rf /var/lib/apt/lists/* && sudo rm -f /etc/apt/sources.list.d/archive_uri-* && sudo apt-get clean
- name: Install Arrow
if: runner.os == 'Linux'
run: >
sudo apt install -y -V ca-certificates lsb-release wget && UBUNTU_VERSION=$(lsb_release --codename --short) && wget "https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-${UBUNTU_VERSION}.deb" && sudo apt install -y -V "./apache-arrow-apt-source-latest-${UBUNTU_VERSION}.deb" && sudo apt update && sudo apt install libarrow-dev
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: >
sudo apt-get update && sudo apt-get install
ninja-build
libglew-dev
libxerces-c-dev
libpng-dev
swig
bison
flex
libtinygltf-dev
libgdal-dev
libgeotiff-dev
libhidapi-dev
libvtk9-dev
libopenscenegraph-dev
libassimp-dev
libtbb-dev
libjpeg-dev
libtiff-dev
libturbojpeg0-dev
libfftw3-dev
libarchive-dev
libswscale-dev
libavformat-dev
libavutil-dev
libboost-all-dev
libcgal-dev
libtinyxml2-dev
libavcodec-dev
libcfitsio-dev
libsnappy-dev
libproj-dev
libgdal-dev
libeigen3-dev
libsdl2-dev
libblas-dev
libvncserver-dev
libaudiofile-dev
libhdf5-dev
libnetcdf-dev
libnetcdf-c++4-dev
libcgns-dev
libalut-dev
libopenal-dev
libfreetype-dev
libomp-dev
libglm-dev
protobuf-compiler
nlohmann-json3-dev
qt6-base-dev
qt6-tools-dev
qt6-connectivity-dev
qt6-declarative-dev
qt6-multimedia-dev
qt6-networkauth-dev
qt6-quick3d-dev
qt6-sensors-dev
qt6-serialbus-dev
qt6-serialport-dev
qt6-speech-dev
qt6-svg-dev
qt6-virtualkeyboard-dev
qt6-wayland-dev
qt6-webengine-dev
qt6-websockets-dev
qt6-webview-dev
- name: Free disk space
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed, but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: true
- name: Checkout repository's master branch
uses: actions/checkout@v4
with:
ref: 'master'
- name: Sync and update submodules recursive
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-${{ matrix.build_type }}
max-size: "1000M"
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: >
cmake -G Ninja
$GITHUB_WORKSPACE
-DCMAKE_CXX_COMPILER=${{matrix.cxx_compiler}}
-DCMAKE_C_COMPILER=${{matrix.c_compiler}}
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DCOVISE_BUILD_DRIVINGSIM=${{matrix.drivingsim}}
-DCOVISE_USE_QT5=${{matrix.use_qt5}}
-DCOVISE_USE_CUDA=${{matrix.use_cuda}}
-DBUILD_ENERGY=${{matrix.build_energy}}
-DBUILD_ARROW=${{matrix.build_arrow}}
-DTEST_ENERGYCAMPUS=${{matrix.test_energy}}
-DDEBUG_ENNOVATIS=${{matrix.debug_ennovatis}}
-Wno-dev
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config ${{matrix.build_type}}
- name: Run Energy Tests
working-directory: ${{runner.workspace}}/build/src/OpenCOVER/plugins/hlrs/Energy/test
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: ctest .