-
Notifications
You must be signed in to change notification settings - Fork 4
195 lines (165 loc) · 5.19 KB
/
main.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: CI Tests
on:
pull_request:
push:
branches:
- '*'
jobs:
Ubuntu:
runs-on: ubuntu-20.04
name: ubuntu-20.04
env:
QT_VER: 5.15.2
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Restore cached Qt
id: cache-qt
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-Qt-${{ env.QT_VER }}-Cache
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VER }}
cache: ${{ steps.cache-qt.outputs.cache-hit }}
dir: ${{ github.workspace }}/Qt
archives: qtbase qtsvg qttools qttranslations
- name: Install prerequisties
run: |
sudo apt update
sudo apt install -y --no-install-recommends \
libglu1-mesa-dev \
libmuparser-dev \
libgsl-dev \
libgl2ps-dev \
libgtest-dev \
libxkbcommon-x11-0 \
xvfb
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Python packages
run: |
pip3 install sip pyqt5 pyqt-builder numpy
- name: Configuring
run: |
mkdir build && cd build
cmake .. \
-DMAKHBER_SEARCH_FOR_UPDATES=OFF \
-DMAKHBER_DOWNLOAD_LINKS=OFF \
-DMAKHBER_SCRIPTING_PYTHON=ON \
-DMAKHBER_BUILD_TESTS=ON \
-DBUILD_SHARED_LIBS=ON
- name: Building
run: |
xvfb-run make -j$(nproc) -C build
- name: Testing
run: |
cd build
xvfb-run -a ctest --output-on-failure --repeat until-pass:3
MSVC:
name: Windows MSVC
runs-on: windows-latest
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
VCPKG_DEFAULT_TRIPLET: x64-windows
QT_VER: 5.15.2
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Restore cached Qt
id: cache-qt
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-Qt-${{ env.QT_VER }}-Cache
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VER }}
cache: ${{ steps.cache-qt.outputs.cache-hit }}
dir: ${{ github.workspace }}/Qt
archives: qtbase qtsvg qttools qttranslations
- name: Setup NuGet Credentials
run: |
& $(vcpkg fetch nuget | select -last 1) sources add `
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" `
-name "GitHub" `
-username ${{ github.repository_owner }} `
-password "${{ secrets.GITHUB_TOKEN }}"
- name: vcpkg package restore
run: |
cd $Env:VCPKG_INSTALLATION_ROOT
git pull origin master
vcpkg install zlib gsl muparser liborigin opengl gl2ps gtest pkgconf
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Python packages
run: pip install sip pyqt5 pyqt-builder numpy
- name: Configuring
run: |
mkdir build; cd build
cmake .. `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_SYSTEM_VERSION="10.0" `
-DPython3_ROOT_DIR=${{ env.pythonLocation }} `
-DCMAKE_TOOLCHAIN_FILE="$Env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" `
-DMAKHBER_SCRIPTING_PYTHON=ON `
-DMAKHBER_BUILD_TESTS=ON `
-DBUILD_SHARED_LIBS=ON
- name: Building
run: |
cmake --build build --config Release -- -maxCpuCount
- name: Testing
run: |
cd build
ctest -C Release --output-on-failure --repeat until-pass:3
macos:
runs-on: macos-13
name: macos
env:
QT_VER: 5.15.2
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Restore cached Qt
id: cache-qt
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-Qt-${{ env.QT_VER }}-Cache
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
setup-python: false
version: ${{ env.QT_VER }}
cache: ${{ steps.cache-qt.outputs.cache-hit }}
dir: ${{ github.workspace }}/Qt
archives: qtbase qtsvg qttools qttranslations
- name: Install prerequisties
run: |
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
brew update
brew install --display-times muparser liborigin gsl gl2ps googletest
- name: Configuring
run: |
mkdir build && cd build
cmake .. \
-DMAKHBER_BUILD_TESTS=ON
- name: Building
run: |
make -j$(sysctl -n hw.logicalcpu) -C build
- name: Testing
run: |
cd build
ctest --output-on-failure --repeat until-pass:3