-
-
Notifications
You must be signed in to change notification settings - Fork 30
218 lines (176 loc) · 5.4 KB
/
main.yml
File metadata and controls
218 lines (176 loc) · 5.4 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
name: CI Tests
on: [pull_request,push]
jobs:
Ubuntu:
runs-on: ubuntu-${{ matrix.ubuntu_ver }}
strategy:
fail-fast: false
matrix:
ubuntu_ver: [18.04, 20.04]
name: ubuntu-${{ matrix.ubuntu_ver }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Install prerequisties
run: |
wget http://download.opensuse.org/repositories/home:hpcoder1/xUbuntu_${{ matrix.ubuntu_ver }}/Release.key
sudo apt-key add - < Release.key
sudo add-apt-repository -y \
'deb http://download.opensuse.org/repositories/home:/hpcoder1/xUbuntu_${{ matrix.ubuntu_ver }}/ /'
sudo apt install -y --no-install-recommends \
qtbase5-dev \
qttools5-dev \
libqt5svg5-dev \
libqt5opengl5-dev \
libmuparser-dev \
libgsl-dev \
libqwt5-qt5-dev \
pyqt5-dev \
python3-pyqt5 \
libgtest-dev \
python3-numpy \
xvfb
- name: Build and Install GTest
if: matrix.ubuntu_ver == 18.04
run: |
mkdir gtest && cd gtest
cmake /usr/src/googletest
make -j$(nproc)
sudo make install
- name: Configuring
run: |
mkdir build && cd build
cmake .. -DSEARCH_FOR_UPDATES=OFF -DDOWNLOAD_LINKS=OFF -DORIGIN_IMPORT=ON -DSCRIPTING_PYTHON=ON \
-DBUILD_TESTS=ON
- name: Building
run: |
xvfb-run make -j$(nproc) -C build
- name: Testing
run: |
cd build
xvfb-run ctest --output-on-failure
MSVC:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- qt_ver: 5.12.10
python: OFF
- qt_ver: 5.15.2
python: ON
name: MSVC_Qt_${{ matrix.qt_ver }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-${{ matrix.qt_ver }}-QtCache
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt_ver }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- uses: lukka/run-vcpkg@v6
with:
vcpkgGitCommitId: 50ea8c0ab7aca3bb9245bba7fc877ad2f2a4464c
setupOnly: true
- name: Install VCPKG packages
run: |
Add-Content ${{ env.VCPKG_ROOT }}\triplets\x64-windows.cmake "set(VCPKG_BUILD_TYPE release)"
${{ env.VCPKG_ROOT }}\vcpkg install zlib gsl muparser opengl gl2ps gtest --triplet x64-windows
- name: Install Python packages
if: ${{ matrix.qt_ver == '5.15.2' }}
run: |
pip install sip==5.5.0 pyqt5==5.15.2 PyQt5-sip==12.8.1 numpy
- name: Configuring
run: |
mkdir build; cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}\scripts\buildsystems\vcpkg.cmake `
-DORIGIN_IMPORT=ON -DSCRIPTING_PYTHON=${{ matrix.python }} -DBUILD_TESTS=ON
- name: Building
run: |
cmake --build build --config Release -- -maxCpuCount
- name: Testing
run: |
cd build
ctest -C Release --output-on-failure
MinGW-w64:
runs-on: windows-latest
name: MinGW-w64
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Install MinGW-w64 packages
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
make
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-qt5
mingw-w64-x86_64-muparser
mingw-w64-x86_64-gsl
mingw-w64-x86_64-gl2ps
mingw-w64-x86_64-gtest
mingw-w64-x86_64-sip4
mingw-w64-x86_64-python-pyqt5
mingw-w64-x86_64-python-numpy
- name: Configuring
run: |
mkdir build && cd build
cmake .. -G"MSYS Makefiles" -DORIGIN_IMPORT=ON -DSCRIPTING_PYTHON=ON -DBUILD_TESTS=ON
- name: Building
run: |
make -C build -j$(nproc)
- name: Testing
run: |
cd build
ctest --output-on-failure
macos:
runs-on: macos-latest
name: macos
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Install prerequisties
run: |
brew install muparser gsl gl2ps googletest
pip install pyqt5 numpy sip PyQt-builder
- name: Configuring
run: |
mkdir build && cd build
cmake .. -DORIGIN_IMPORT=ON -DSCRIPTING_PYTHON=ON -DPython3_ROOT_DIR=$pythonLocation \
-DBUILD_TESTS=ON
- name: Building
run: |
make -j$(sysctl -n hw.logicalcpu) -C build
- name: Testing
run: |
cd build
ctest --output-on-failure