-
-
Notifications
You must be signed in to change notification settings - Fork 156
323 lines (292 loc) · 13.4 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
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# This is a basic workflow to help you get started with Actions
#
# things to fixa at some point
# - add in latest_pyside_gui
# - latest_pyqt_gui for python 3.9 (currently vtk is not on PyPi)
# - currently a duplicate build is running
name: CI
#--------------------------------------------------------------------------------------------
# ┌────────── minute (0 - 59)
# │ ┌────────── hour (0 - 23)
# │ │ ┌────────── day of the month (1 - 31)
# │ │ │ ┌────────── month (1 - 12)
# │ │ │ │ ┌────────── day of the week (0 - 6)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
# this is a 15 minute schedule
# schedule:
# - cron: '*/15 * * * *'
#on:
# push:
# pull_request:
# schedule:
# - cron: '*/15 * * * *'
# Controls when the action will run.
#on: [push]
on:
push:
paths-ignore:
#- ".github/**"
- "*.md"
- "*.rst"
# branches:
# - main
pull_request:
branches: [ main ]
schedule:
# At the end of every day
- cron: '0 0 * * *'
#on:
# Triggers the workflow on push or pull request events but only for the main branch
#push:
# branches: [ main ]
#pull_request:
# branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
#workflow_dispatch:
#--------------------------------------------------------------------------------------------
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
# '3.9', '3.11-dev'
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-latest]
# , macos-latest, windows-latest
mode: ['latest', 'latest_basic', 'old', 'latest_pyqt5_gui', 'latest_pyqt6_gui', 'latest_pyside2_gui', ]
# 'old_basic', 'old_pyside2_gui', 'old_pyqt5_gui', 'latest_pyside6_gui'
experimental: [false]
#include:
# - python: '3.11-dev'
# experimental: true
#include:
#- node: 13
# os: ubuntu-18.04
# experimental: true
exclude:
# Exclude all DB images except "mariadb_10.4" for all PHP versions except "7.3".
#- {python-version: '3.9', mode: 'latest_pyside6_gui'} # 'pip install imageio pillow' fails
#- {python-version: '3.9', mode: 'latest_pyqt5_gui'} # 'pip install imageio pillow' fails
#- {python-version: '3.9', mode: 'latest_pyqt6_gui'} # 'pip install imageio pillow' fails
- {python-version: '3.10', mode: 'old'} # redundant
- {python-version: '3.10', mode: 'latest_pyqt5_gui'} # 'pip install imageio pillow' fails
- {python-version: '3.10', mode: 'latest_pyqt6_gui'} # 'pip install imageio pillow' fails
#- {python-version: '3.11', mode: 'latest_pyside2_gui'}
#- {python-version: '3.11', mode: 'latest_pyside6_gui'}
- {python-version: '3.11', mode: 'old'} # redundant
#- {python-version: '3.11', mode: 'latest_pyqt5_gui'}
- {python-version: '3.11', mode: 'latest_pyqt6_gui'}
#- {python-version: '3.11', mode: 'latest_pyside2_gui'}
- {python-version: '3.11', mode: 'latest_pyside6_gui'} # DLL error
- {python-version: '3.12', mode: 'old'} # redundant
- {python-version: '3.12', mode: 'latest_pyqt5_gui'}
- {python-version: '3.12', mode: 'latest_pyqt6_gui'}
- {python-version: '3.12', mode: 'latest_pyside2_gui'}
#- {python-version: '3.11', mode: 'latest_pyside6_gui'}
- {python-version: '3.13', mode: 'old'} # redundant
- {python-version: '3.13', mode: 'latest_pyqt5_gui'}
- {python-version: '3.13', mode: 'latest_pyqt6_gui'}
- {python-version: '3.13', mode: 'latest_pyside2_gui'}
fail-fast: false
#- continue-on-error: ${{ matrix.experimental }}
#strategy:
# matrix:
#https://github.com/zopyx/xmldirector.connector/blob/master/.travis.yml#L15-L54
#python-version: [3.7, 3.8]
#env:
# - {COVERAGE_RUN='coverage run' CODECOV='codecov' NUMPY='numpy scipy matplotlib h5py vtk pyqt5 pandas>=0.25 imageio pillow>5.2,!=7.1.0' LIB='libblas-dev liblapack-dev'}
#python-version: 3.8
#env:
# COVERAGE_RUN='coverage run'
# CODECOV='codecov'
# NUMPY='numpy scipy matplotlib h5py vtk pyqt5 'pandas>=1.0' imageio pillow>5.2,!=7.1.0'
# LIB='libblas-dev liblapack-dev'
#--------------------------------------------------------------------------------------------------
# latest versions of package
#- name: "Python ${{ matrix.python-version }} (PyQt5)"
#python-version: [3.7, 3.8, 3.9]
#env:
#- COVERAGE_RUN='coverage run'
#- CODECOV='codecov'
#- NUMPY='numpy scipy matplotlib h5py vtk pyqt5 'pandas>=1.0' imageio pillow>5.2,!=7.1.0'
##- LIB='libblas-dev liblapack-dev'
#- LIBH5='libhdf5-dev'
#--------------------------------------------------------------------------------------------------
# oldest versions of package
#--------------------------------------------------------------------------------------------------
# Steps represent a sequence of tasks that will be executed as part of the job
#env: ${{ matrix.env }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Print environment variables exposed by GitHub
run: |
echo "GITHUB_ACTOR=$GITHUB_ACTOR"
echo "GITHUB_REPOSITORY=$GITHUB_REPOSITORY"
echo "GITHUB_SHA=$GITHUB_SHA"
echo "GITHUB_REF=$GITHUB_REF"
echo "GITHUB_HEAD_REF=$GITHUB_HEAD_REF"
echo "GITHUB_BASE_REF=$GITHUB_BASE_REF"
echo "GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME"
echo "GITHUB_RUN_ID=$GITHUB_RUN_ID"
echo "GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER"
echo "GITHUB_WORKFLOW=$GITHUB_WORKFLOW"
echo "GITHUB_ACTION=$GITHUB_ACTION"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies - ${{ matrix.mode }}
run: |
python -m pip install --upgrade pip
pip install flake8 coverage
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip list
#mode: ['latest', 'latest_basic',
# 'latest_pyside2_gui', 'latest_pyside6_gui',
# 'latest_pyqt5_gui', 'latest_pyqt6_gui',
# 'old', 'old_basic',
# 'old_pyside_gui', 'old_pyqt_gui']
#
- name: Install latest basic packages
if: ${{ matrix.mode == 'latest_basic' || matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui' }}
run: |
pip install numpy scipy
#--no-binary :all:
- name: Install latest packages (pandas, matplotlib)
if: ${{ matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui' }}
run: |
pip install 'pandas>=1.0' matplotlib
- name: Install latest packages (h5py)
if: ${{ matrix.python-version != '3.12' && (matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
run: |
pip install h5py tables
- name: Install latest packages (imageio, pillow)
#if: ${{ (
#if: ${{ matrix.python-version != '3.12' && (
# matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
# matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
if: ${{ (matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
run: |
pip install imageio pillow>=10.1.0
- name: Install latest packages (vtk)
#if: ${{ matrix.python-version != '3.13' && (
# matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
# matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
if: ${{ (matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
run: |
pip install vtk qtpy
- if: ${{ matrix.mode == 'latest_pyside2_gui' && matrix.python-version != '3.13' }}
name: Install PySide2
run: |
pip install PySide2
- if: ${{ matrix.mode == 'latest_pyside6_gui' && matrix.python-version != '3.13' }}
name: Install PySide6
run: |
pip install PySide6
- if: ${{ matrix.mode == 'latest_pyqt5_gui' && matrix.python-version != '3.13' }}
name: Install PyQt5
run: |
pip install PyQt5
- if: ${{ matrix.mode == 'latest_pyqt6_gui' && matrix.python-version != '3.13' }}
name: Install PyQt6
run: |
pip install PyQt6
#-----------------------------------------------------------------------------------
# old
# pandas==1.1.3
#- name: Install old packages (3.9)
# if: ${{ matrix.mode == 'old' && matrix.python-version == '3.9' }}
# run: |
# pip install numpy==1.19.4 scipy==1.5.4 matplotlib==3.3.3 h5py==3.0.0 pandas==1.1.3 #--no-binary :all:
#-----------------------------------------------------------------------------------
# I'd like to make this step build a wheel and install it, but you need the wheel name
# or know how to use bash to pipe an ls into a pip command, so I can do:
# >>> python setup.py bdist_wheel
# >>> pip install dist/pyNastran*.whl <--- the * is a problem
#
# python 3.9 gets everything
# any python 3.8 test that can't be run in the previous block
- name: Install dependencies (bdist_wheel & develop)
#pip install dist/pyNastran*.whl
#python setup.py bdist_wheel
#if: ${{ (matrix.python-version == '3.9') || (matrix.python-version == '3.10') }}
run: |
pip install -e .
#python setup.py develop
- name: List dependencies
run: |
pip list
- name: Run No GUI 3.12
#if: ${{ matrix.python-version == '3.12' || (
# matrix.mode == 'latest' || matrix.mode == 'latest_basic' || matrix.mode == 'old') }}
if: ${{ (matrix.mode == 'latest' || matrix.mode == 'latest_basic' || matrix.mode == 'old') }}
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
run: |
python pyNastran/all_tests_no_gui.py
coverage run pyNastran/all_tests_no_gui.py
# 3.11 - No matching distribution found for vtk
- name: Run GUI
if: ${{ (matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
#if: ${{ matrix.python-version != '3.12' && (
# matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
# matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
run: |
python pyNastran/all_tests.py
coverage run pyNastran/all_tests.py
#- name: Upload coverage
# run: |
# codecov
- name: Upload coverage
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
#--------------------------------------------------------------------------------------------------
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
# name: Python package
#
# on: [push]
#
# jobs:
# build:
#
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install flake8 pytest
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pytest