-
Notifications
You must be signed in to change notification settings - Fork 181
221 lines (153 loc) · 5.59 KB
/
checks.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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
name: checks
on:
pull_request:
types: [opened, synchronize]
branches: [ master, dev ]
merge_group:
types: [checks_requested]
branches: [ master ]
jobs:
linux-clang-build:
runs-on: ubuntu-latest
env:
CFLAGS: -Werror
QT_SELECT: qt5
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: "2G"
CXX_COMPILER_LAUNCHER: sccache
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install clang libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev python3-numpy
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: configure
run: ./configure -assert || { cat configure.log; false; }
- name: build
run: ./build -nowarnings -persistent -nopaginate || { cat build.log; false; }
- name: unit tests
run: ./run_tests units || { cat testing_units.log; false; }
- name: binary tests
run: ./run_tests binaries || { cat testing_binaries.log; false; }
linux-gcc-build:
runs-on: ubuntu-latest
env:
CXX: g++-9
CFLAGS: -Werror
QT_SELECT: qt5
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: "2G"
CXX_COMPILER_LAUNCHER: sccache
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install g++-9 libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: configure
run: ./configure -nooptim || { cat configure.log; false; }
- name: build
run: ./build -nowarnings -persistent -nopaginate || { cat build.log; false; }
macos-build:
runs-on: macos-latest
env:
CFLAGS: -Werror
PACKAGES: "qt5 eigen pkg-config fftw libpng"
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: "2G"
CXX_COMPILER_LAUNCHER: sccache
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: |
brew update || brew update # https://github.com/Homebrew/brew/issues/2491#issuecomment-294207661
brew install $PACKAGES || brew install $PACKAGES
/usr/bin/python3 -m ensurepip && /usr/bin/pip3 install numpy
brew link --force qt5
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: configure
run: ./configure -assert || { cat configure.log; false; }
- name: build
run: ./build -nowarnings -persistent -nopaginate || { cat build.log; false; }
- name: unit tests
run: ./run_tests units || { cat testing_units.log; false; }
- name: binary tests
run: ./run_tests binaries || { cat testing_binaries.log; false; }
- name: check command documentation
run: ./docs/generate_user_docs.sh && git diff --exit-code docs/
windows-build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
# CFLAGS: -Werror
CHERE_INVOKING: enabled_from_arguments
MINGW_PACKAGE_PREFIX: mingw-w64-ucrt-x86_64
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: "2G"
SCCACHE_DIR: ${{ github.workspace }}/.sccache
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
release: false
install: |
git
python
python-pip
${{env.MINGW_PACKAGE_PREFIX}}-bc
${{env.MINGW_PACKAGE_PREFIX}}-diffutils
${{env.MINGW_PACKAGE_PREFIX}}-eigen3
${{env.MINGW_PACKAGE_PREFIX}}-fftw
${{env.MINGW_PACKAGE_PREFIX}}-gcc
${{env.MINGW_PACKAGE_PREFIX}}-libtiff
${{env.MINGW_PACKAGE_PREFIX}}-pkg-config
${{env.MINGW_PACKAGE_PREFIX}}-qt5-base
${{env.MINGW_PACKAGE_PREFIX}}-qt5-svg
${{env.MINGW_PACKAGE_PREFIX}}-zlib
- name: Install numpy
run: |
/usr/bin/pip3 install numpy
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: export sccache to msys2 shell
run: |
export SCCACHE_UNIX_PATH=$(cygpath -u "$SCCACHE_PATH")
echo "SCCACHE_UNIX_PATH=$SCCACHE_UNIX_PATH" >> $GITHUB_ENV
- name: configure
run: |
export CXX_COMPILER_LAUNCHER=${{env.SCCACHE_UNIX_PATH}}
./configure -assert || { cat configure.log; false; }
- name: build
run: ./build -nowarnings -persistent -nopaginate || { cat build.log; false; }
- name: unit tests
run: ./run_tests units || { cat testing_units.log; false; }
- name: binary tests
run: ./run_tests binaries || { cat testing_binaries.log; false; }
secondary-checks:
runs-on: ubuntu-latest
env:
QT_SELECT: qt5
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install pylint python3-sphinx sphinx-rtd-theme-common python3-recommonmark python3-sphinx-rtd-theme python3-pip python3-sphinx-notfound-page
- name: check syntax
run: ./check_syntax || { cat syntax.log; false; }
- name: pylint
run: |
echo "__version__ = 'pylint testing' #pylint: disable=unused-variable" > ./lib/mrtrix3/_version.py
./run_pylint || { cat pylint.log; false; }
- name: check copyright headers
run: ./update_copyright && git diff --exit-code
- name: check building of documentation
run: python3 -m sphinx -n -N -W -w sphinx.log docs/ tmp/