66 - cron : ' 0 0 1 * *'
77
88jobs :
9- build :
9+ build-linux :
10+ name : >
11+ build-linux (python-${{ matrix.python-version }}, ${{ matrix.compiler }})
1012 runs-on : ${{ matrix.os }}
1113 strategy :
1214 matrix :
13- os : [ubuntu-latest, windows-latest, macos-latest ]
15+ os : [ubuntu-latest]
1416 python-version : ['3.9', '3.10', '3.11', '3.12', '3.13']
15- compiler : [default ]
17+ compiler : [gcc ]
1618
1719 include :
18- - {os: ubuntu-latest, extra-tests: [mingw-cross],
20+ - {os: ubuntu-latest, compiler: gcc, extra-tests: [mingw-cross],
1921 backends : [ninja, make], flags: -Wall -Werror}
20- - {os: windows-latest, msvc-version: '14.4', win-sdk: '10.0.26100.0',
21- boost-version : ' 1.80.0' , qt-version: '5.15.2',
22- skipped-tests : [fortran, objc, scala],
23- backends : [ninja, make, msbuild], flags: /WX}
24- - {os: macos-latest, skipped-tests: [scala], backends: [ninja, make],
25- flags : -Wall -Werror -Wno-deprecated-declarations
26- -DGL_SILENCE_DEPRECATION, cxxflags : -std=c++11}
2722
2823 # Old Python builds
29- - {os: ubuntu-24.04, python-version: '3.8', compiler: default ,
24+ - {os: ubuntu-24.04, python-version: '3.8', compiler: gcc ,
3025 backends : [ninja, make], flags: -Wall -Werror}
3126
3227 # Clang builds
4237 # - {os: ubuntu-16.04, python-version: '3.13', compiler: default,
4338 # extra-packages: [gcj-4.9, gcj-4.9-jdk],
4439 # extra-tests: [mingw-cross, gcj], backends: [ninja, make]}
40+ fail-fast : false
41+ env : &default-env
42+ # GCJ: gcj-4.9
43+ BACKENDS : ${{ join(matrix.backends, ' ') }}
44+ BFG_EXTRA_TESTS : ${{ join(matrix.extra-tests, ' ') }}
45+ BFG_SKIPPED_TESTS : ${{ join(matrix.skipped-tests, ' ') }}
46+ CPPFLAGS : ${{ matrix.flags }}
47+ CXXFLAGS : ${{ matrix.cxxflags }}
48+
49+ steps :
50+ - uses : actions/checkout@v4
51+ - name : Set up Python ${{ matrix.python-version }}
52+ uses : actions/setup-python@v5
53+ with :
54+ python-version : ${{ matrix.python-version }}
55+ - name : Install Python dependencies
56+ run : |
57+ pip install git+https://github.com/jimporter/mopack.git '.[test]'
58+ - name : Install Linux dependencies
59+ run : >
60+ sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
61+ sudo apt-get update &&
62+ sudo apt-get install
63+ bison
64+ default-jdk
65+ flex
66+ freeglut3-dev
67+ gcc-multilib
68+ gfortran
69+ gobjc++
70+ libboost-dev
71+ libboost-program-options-dev
72+ libgl1-mesa-dev
73+ libogg-dev
74+ mingw-w64
75+ ninja-build
76+ patchelf
77+ qtbase5-dev
78+ qtbase5-dev-tools
79+ qtchooser
80+ qtdeclarative5-dev
81+ qt5-qmake
82+ scala
83+ ${{ join(matrix.extra-packages, ' ') }}
84+ - name : Set up clang
85+ if : matrix.compiler == 'clang'
86+ run : |
87+ echo "CC=clang" >> ${GITHUB_ENV}
88+ echo "CXX=clang++" >> ${GITHUB_ENV}
89+ - name : Run tests
90+ run : |
91+ python setup.py coverage -q
92+ coverage xml
93+ - name : Upload coverage
94+ uses : codecov/codecov-action@v3
95+ with :
96+ files : ./coverage.xml
97+
98+ build-windows :
99+ name : >
100+ build-windows (python-${{ matrix.python-version }}, ${{ matrix.compiler }})
101+ runs-on : ${{ matrix.os }}
102+ strategy :
103+ matrix :
104+ os : [windows-latest]
105+ python-version : ['3.9', '3.10', '3.11', '3.12', '3.13']
106+ compiler : [msvc]
107+
108+ include :
109+ - {os: windows-latest, msvc-version: '14.4', win-sdk: '10.0.26100.0',
110+ boost-version : ' 1.80.0' , qt-version: '5.15.2',
111+ skipped-tests : [fortran, objc, scala],
112+ backends : [ninja, make, msbuild], flags: /WX}
45113
46114 # VS 2015 builds
47115 # FIXME: Currently disabled, since Github retired these images.
66134 # backends: [ninja, make, msbuild], flags: /WX}
67135
68136 # VS 2022 x86 builds
69- - {os: windows-latest, python-version: '3.13', compiler: default -x86,
137+ - {os: windows-latest, python-version: '3.13', compiler: msvc -x86,
70138 msvc-version : ' 14.4' , msvc-arch: 'x86', win-sdk: '10.0.26100.0',
71139 boost-version : ' 1.80.0' , skipped-tests: [fortran, objc, qt, scala],
72140 backends : [ninja, make, msbuild], flags: /WX}
@@ -78,26 +146,12 @@ jobs:
78146 skipped-tests : [boost, fortran, objc, scala],
79147 backends : [ninja, make], flags: /WX -Wno-microsoft-include
80148 -Wno-unused-command-line-argument -D_CRT_SECURE_NO_WARNINGS}
81-
82- # MinGW builds
83- - {os: windows-2022, python-version: '3.13', compiler: mingw,
84- msvc-version : ' 14.4' , win-sdk: '10.0.19041.0',
85- qt-version : ' 5.15.2' , qt-arch: 'win64_mingw81',
86- skipped-tests : [boost, fortran, objc, pch, scala],
87- backends : [ninja, make], flags: -Wall -Werror}
88149 fail-fast : false
89- env :
90- GCJ : gcj-4.9
91- BACKENDS : ${{ join(matrix.backends, ' ') }}
92- BFG_EXTRA_TESTS : ${{ join(matrix.extra-tests, ' ') }}
93- BFG_SKIPPED_TESTS : ${{ join(matrix.skipped-tests, ' ') }}
94- CPPFLAGS : ${{ matrix.flags }}
95- CXXFLAGS : ${{ matrix.cxxflags }}
150+ env : *default-env
96151
97152 steps :
98153 - uses : actions/checkout@v4
99154 - name : Cache Boost binaries
100- if : startsWith(matrix.os, 'windows-') && matrix.boost-version
101155 uses : actions/cache@v4
102156 id : cache-boost
103157 with :
@@ -115,7 +169,7 @@ jobs:
115169 run : |
116170 pip install git+https://github.com/jimporter/mopack.git '.[test]'
117171 - name : Initialize MSVC ${{ matrix.msvc-version }}
118- if : startsWith(matrix.os, 'windows-')
172+ if : startsWith(matrix.os, 'windows-') && matrix.compiler != 'mingw'
119173 uses : ilammy/msvc-dev-cmd@v1
120174 with :
121175 toolset : ${{ matrix.msvc-version }}
@@ -128,7 +182,6 @@ jobs:
128182 version : ${{ matrix.qt-version }}
129183 arch : ${{ matrix.qt-arch }}
130184 - name : Install Boost ${{ matrix.boost-version }} from binaries
131- if : startsWith(matrix.os, 'windows-') && matrix.boost-version
132185 run : |
133186 ${boostroot} = "C:\boost-${{ matrix.boost-version }}"
134187 ${msvcver} = "${{ matrix.msvc-version }}" -replace '14.4','14.3'
@@ -141,35 +194,7 @@ jobs:
141194 }
142195 echo "BOOST_INCLUDEDIR=${boostroot}" >> ${env:GITHUB_ENV}
143196 echo "BOOST_LIBRARYDIR=${boostroot}\lib${arch}-msvc-${msvcver}" >> ${env:GITHUB_ENV}
144- - name : Install Linux dependencies
145- if : startsWith(matrix.os, 'ubuntu-')
146- run : >
147- sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
148- sudo apt-get update &&
149- sudo apt-get install
150- bison
151- default-jdk
152- flex
153- freeglut3-dev
154- gcc-multilib
155- gfortran
156- gobjc++
157- libboost-dev
158- libboost-program-options-dev
159- libgl1-mesa-dev
160- libogg-dev
161- mingw-w64
162- ninja-build
163- patchelf
164- qtbase5-dev
165- qtbase5-dev-tools
166- qtchooser
167- qtdeclarative5-dev
168- qt5-qmake
169- scala
170- ${{ join(matrix.extra-packages, ' ') }}
171197 - name : Install Windows dependencies
172- if : startsWith(matrix.os, 'windows-')
173198 run : |
174199 choco install ninja pkgconfiglite winflexbison3
175200
@@ -197,39 +222,105 @@ jobs:
197222 echo "CPPFLAGS=-I${pwd}\include ${env:CPPFLAGS}" >> ${env:GITHUB_ENV}
198223 echo "LIBRARY_PATH=${env:LIBRARY_PATH};${pwd}\lib" >> ${env:GITHUB_ENV}
199224 echo "PATH=${env:PATH};${pwd}\lib" >> ${env:GITHUB_ENV}
225+ - name : Set up clang-cl
226+ if : matrix.compiler == 'clang-cl'
227+ run : |
228+ echo "CC=clang-cl" >> ${env:GITHUB_ENV}
229+ echo "CXX=clang-cl" >> ${env:GITHUB_ENV}
230+ - name : Run tests
231+ run : |
232+ python setup.py coverage -q
233+ coverage xml
234+ - name : Upload coverage
235+ uses : codecov/codecov-action@v3
236+ with :
237+ files : ./coverage.xml
238+
239+ build-macos :
240+ name : >
241+ build-macos (python-${{ matrix.python-version }}, ${{ matrix.compiler }})
242+ runs-on : ${{ matrix.os }}
243+ strategy :
244+ matrix :
245+ os : [macos-latest]
246+ python-version : ['3.9', '3.10', '3.11', '3.12', '3.13']
247+ compiler : [clang]
248+
249+ include :
250+ - {os: macos-latest, skipped-tests: [scala], backends: [ninja, make],
251+ flags : -Wall -Werror -Wno-deprecated-declarations
252+ -DGL_SILENCE_DEPRECATION, cxxflags : -std=c++11}
253+ fail-fast : false
254+ env : *default-env
255+
256+ steps :
257+ - uses : actions/checkout@v4
258+ - name : Set up Python ${{ matrix.python-version }}
259+ uses : actions/setup-python@v5
260+ with :
261+ python-version : ${{ matrix.python-version }}
262+ - name : Install Python dependencies
263+ run : |
264+ pip install git+https://github.com/jimporter/mopack.git '.[test]'
200265 - name : Install macOS dependencies
201- if : startsWith(matrix.os, 'macos-')
202266 run : |
203267 brew install bison boost libogg ninja pkg-config qt5
204268 brew link qt5 --force
205269 echo "FC=gfortran-14" >> ${GITHUB_ENV}
206270 echo "YACC=/opt/homebrew/opt/bison/bin/bison" >> ${GITHUB_ENV}
207271 echo "CPATH=/opt/homebrew/include" >> ${GITHUB_ENV}
208272 echo "LIBRARY_PATH=/opt/homebrew/lib" >> ${GITHUB_ENV}
209- - name : Set up clang
210- if : matrix.compiler == 'clang'
211- run : |
212- echo "CC=clang" >> ${GITHUB_ENV}
213- echo "CXX=clang++" >> ${GITHUB_ENV}
214- - name : Set up clang-cl
215- if : matrix.compiler == 'clang-cl'
273+ - name : Run tests
216274 run : |
217- echo "CC=clang-cl" >> ${env:GITHUB_ENV}
218- echo "CXX=clang-cl" >> ${env:GITHUB_ENV}
219- - name : Set up mingw
220- if : matrix.compiler == 'mingw'
275+ python setup.py coverage -q
276+ coverage xml
277+ - name : Upload coverage
278+ uses : codecov/codecov-action@v3
279+ with :
280+ files : ./coverage.xml
281+
282+ build-mingw :
283+ runs-on : windows-latest
284+ defaults :
285+ run :
286+ shell : msys2 {0}
287+ strategy :
288+ matrix :
289+ include :
290+ - {os: windows-latest, qt-version: '5.15.2', qt-arch: 'win64_mingw81',
291+ skipped-tests : [boost, fortran, objc, pch, scala],
292+ backends : [ninja, make], flags: -Wall -Werror}
293+ env : *default-env
294+
295+ steps :
296+ - uses : actions/checkout@v4
297+ - uses : msys2/setup-msys2@v2
298+ with :
299+ msystem : UCRT64
300+ update : true
301+ install : >
302+ git
303+ mingw-w64-ucrt-x86_64-make
304+ mingw-w64-ucrt-x86_64-ninja
305+ mingw-w64-ucrt-x86_64-python-pip
306+ mingw-w64-ucrt-x86_64-python-lxml
307+ mingw-w64-ucrt-x86_64-gcc
308+ - name : Install Python dependencies
221309 run : |
222- echo "PATH=C:\msys64\mingw64\bin;${env:PATH}" >> ${env:GITHUB_ENV}
223- echo "CC=gcc" >> ${env:GITHUB_ENV}
224- echo "CXX=g++" >> ${env:GITHUB_ENV}
310+ python -m venv .venv --system-site-packages
311+ . .venv/bin/activate
312+ pip install git+https://github.com/jimporter/mopack.git '.[test]'
225313 - name : Run tests
226314 run : |
315+ . .venv/bin/activate
316+ export MAKE=mingw32-make
227317 python setup.py coverage -q
228318 coverage xml
229319 - name : Upload coverage
230320 uses : codecov/codecov-action@v3
231321 with :
232322 files : ./coverage.xml
323+
233324 build-cygwin :
234325 runs-on : windows-latest
235326 env :
@@ -267,6 +358,7 @@ jobs:
267358 uses : codecov/codecov-action@v3
268359 with :
269360 files : ./coverage.xml
361+
270362 bdist-wheel :
271363 runs-on : ubuntu-latest
272364
@@ -282,6 +374,7 @@ jobs:
282374 python setup.py bdist_wheel
283375 pip install dist/*.whl
284376 ! pip show pysetenv
377+
285378 lint :
286379 runs-on : ubuntu-latest
287380
0 commit comments