-
Notifications
You must be signed in to change notification settings - Fork 181
198 lines (124 loc) · 4.8 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
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
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
- 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
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: 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"
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
brew link --force qt5
- 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
env:
CFLAGS: -Werror
MSYSTEM: MINGW64
MSYSCON: defterm
CHERE_INVOKING: enabled_from_arguments
MSYS2_NOSTART: yes
steps:
- uses: actions/checkout@v1
- name: fetch and install MSYS2
run: bash -c 'curl -sL https://github.com/MRtrix3/MinGW/releases/download/1.0/msys2.tar.{0,1} | tar xf -'
- name: run qtbinpatcher
shell: cmd
run: msys64\msys2_shell.cmd -c "qtbinpatcher --qt-dir=$(dirname $(which qmake))"
- name: configure
shell: cmd
run: msys64\msys2_shell.cmd -c "./configure -assert || { cat configure.log; false; }"
- name: build
shell: cmd
run: msys64\msys2_shell.cmd -c "./build -nowarnings -persistent -nopaginate || { cat build.log; false; }"
- name: unit tests
shell: cmd
run: msys64\msys2_shell.cmd -c "./run_tests units || { cat testing_units.log; false; }"
- name: binary tests
shell: cmd
run: msys64\msys2_shell.cmd -c "./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
pip3 install sphinx-notfound-page
- name: check syntax
run: ./check_syntax || { cat syntax.log; false; }
- name: pylint (Python 3)
run: |
echo "__version__ = 'pylint testing' #pylint: disable=unused-variable" > ./lib/mrtrix3/_version.py
PYTHON=python3 ./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/
- name: install build dependencies
run: sudo apt-get install python2 clang libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev
- name: check configure with Python 2
run: python2 ./configure || { cat configure.log; false; }
- name: check build with Python 2
run: python2 ./build -dryrun || { cat build.log; false; }
- name: check configure with Python 3
run: python3 ./configure || { cat configure.log; false; }
- name: check build with Python 3
run: python3 ./build -dryrun || { cat build.log; false; }