@@ -3,16 +3,16 @@ name: Dev build CI
3
3
on :
4
4
push :
5
5
paths-ignore :
6
- - ' README**'
6
+ - " README**"
7
7
branches :
8
- - ' ** '
8
+ - " ** "
9
9
tags :
10
- - ' v* '
10
+ - " v* "
11
11
pull_request :
12
12
branches :
13
- - ' * '
13
+ - " * "
14
14
paths-ignore :
15
- - ' README**'
15
+ - " README**"
16
16
# Allows you to run this workflow manually from the Actions tab
17
17
workflow_dispatch :
18
18
@@ -30,9 +30,9 @@ concurrency:
30
30
cancel-in-progress : true
31
31
32
32
env :
33
- PREFERED_PYTHON_VERSION : ' 3.12'
33
+ PREFERED_PYTHON_VERSION : " 3.12"
34
34
MLM_LICENSE_TOKEN : ${{secrets.MLM_LICENSE_TOKEN }}
35
- CALIBRATION_CODE_LOCATION : ' src/matlab/calibration'
35
+ CALIBRATION_CODE_LOCATION : " src/matlab/calibration"
36
36
jobs :
37
37
qa :
38
38
runs-on : ubuntu-latest
43
43
build :
44
44
strategy :
45
45
matrix :
46
- python-versions : [' 3.10', ' 3.11', ' 3.12' ]
46
+ python-versions : [" 3.10", " 3.11", " 3.12" ]
47
47
os : [ubuntu-latest]
48
48
runs-on : ${{ matrix.os }}
49
49
# map step outputs to job outputs so they can be share among jobs
@@ -169,7 +169,7 @@ jobs:
169
169
if : success() || failure()
170
170
with :
171
171
name : Test Results (${{ matrix.python-versions }})
172
- path : ' test-results.xml'
172
+ path : " test-results.xml"
173
173
reporter : java-junit
174
174
175
175
- name : Coverage Report
@@ -193,7 +193,7 @@ jobs:
193
193
matlab-build :
194
194
strategy :
195
195
matrix :
196
- python-versions : [' 3.10', ' 3.11', ' 3.12' ]
196
+ python-versions : [" 3.10", " 3.11", " 3.12" ]
197
197
os : [ubuntu-latest]
198
198
runs-on : ${{ matrix.os }}
199
199
# map step outputs to job outputs so they can be share among jobs
@@ -244,12 +244,12 @@ jobs:
244
244
- name : Check out calibration code into ${{ env.CALIBRATION_CODE_LOCATION }} in repository
245
245
uses : actions/checkout@v4
246
246
with :
247
- path : ${{ env.CALIBRATION_CODE_LOCATION}}
248
- sparse-checkout : |
249
- +calibration
250
- +general
251
- repository : ${{ vars.CALIBRATION_REPO }}
252
- ssh-key : ${{ secrets.IMAP_MAG_CALIBRATION_DEPLOY_KEY }}
247
+ path : ${{ env.CALIBRATION_CODE_LOCATION}}
248
+ sparse-checkout : |
249
+ +calibration
250
+ +general
251
+ repository : ${{ vars.CALIBRATION_REPO }}
252
+ ssh-key : ${{ secrets.IMAP_MAG_CALIBRATION_DEPLOY_KEY }}
253
253
254
254
- name : build
255
255
run : ./build.sh --skip-tests
@@ -305,7 +305,7 @@ jobs:
305
305
test_on_windows :
306
306
strategy :
307
307
matrix :
308
- python-versions : [' 3.10', ' 3.11', ' 3.12' ]
308
+ python-versions : [" 3.10", " 3.11", " 3.12" ]
309
309
os : [windows-latest]
310
310
runs-on : ${{ matrix.os }}
311
311
steps :
@@ -336,10 +336,9 @@ jobs:
336
336
if : success() || failure()
337
337
with :
338
338
name : Test Results (${{ matrix.os }}) (${{ matrix.python-versions }})
339
- path : ' test-results.xml'
339
+ path : " test-results.xml"
340
340
reporter : java-junit
341
341
342
-
343
342
build_single_file_binary :
344
343
strategy :
345
344
matrix :
@@ -356,75 +355,75 @@ jobs:
356
355
357
356
runs-on : ubuntu-latest
358
357
steps :
359
- - uses : actions/checkout@v4
360
- - uses : actions/setup-python@v5
361
- with :
362
- python-version : ${{ env.PREFERED_PYTHON_VERSION }}
358
+ - uses : actions/checkout@v4
359
+ - uses : actions/setup-python@v5
360
+ with :
361
+ python-version : ${{ env.PREFERED_PYTHON_VERSION }}
363
362
364
- - name : Install dependencies
365
- run : |
366
- python -m pip install --upgrade pip
367
- pip install poetry
363
+ - name : Install dependencies
364
+ run : |
365
+ python -m pip install --upgrade pip
366
+ pip install poetry
368
367
369
- - name : Set REVISION
370
- run : echo "REVISION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
368
+ - name : Set REVISION
369
+ run : echo "REVISION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
371
370
372
- - name : Declare version variables for dev builds
373
- id : variables_step_dev
374
- run : |
375
- # Override the version with a dev suffix because we are not on a tag. Tag builds pull version directly from pyproject.toml
376
- poetry version $(poetry version --short)-dev.$GITHUB_RUN_NUMBER
377
- echo "Using version from pyproject.toml file with dev suffix (because not on a tag): $(poetry version --short)"
378
- echo "PACKAGE_NAME=$(poetry version | awk '{print $1}')" >> $GITHUB_ENV
379
- echo "PACKAGE_VERSION=$(poetry version --short)" >> $GITHUB_ENV
380
- if : ${{ !startsWith(github.ref, 'refs/tags/') }}
381
- shell : bash
382
-
383
- - name : Declare variables PACKAGE_NAME and PACKAGE_VERSION
384
- id : variables_step
385
- run : |
386
- echo "Version used by poetry: $(poetry version --short)"
387
- echo "PACKAGE_NAME=$(poetry version | awk '{print $1}')" >> $GITHUB_ENV
388
- echo "PACKAGE_VERSION=$(poetry version --short)" >> $GITHUB_ENV
389
- shell : bash
390
-
391
- - uses : addnab/docker-run-action@v3
392
- with :
393
- registry : gcr.io
394
- image : ${{ matrix.image }}
395
- options : -v ${{ github.workspace }}:/src/
396
- run : |
397
- python -m pip install poetry
398
- python -m poetry self add poetry-pyinstaller-plugin
399
- python -m poetry install
400
- python -m poetry build
401
- if [ ! -f dist/pyinstaller/${{ matrix.folder }}/${{ matrix.executable }} ]
402
- then
403
- echo "Cannot find dist/pyinstaller/${{ matrix.folder }}/${{ matrix.executable }}"
404
- exit 1
405
- fi
406
-
407
- - name : Zip up the binary
371
+ - name : Declare version variables for dev builds
372
+ id : variables_step_dev
373
+ run : |
374
+ # Override the version with a dev suffix because we are not on a tag. Tag builds pull version directly from pyproject.toml
375
+ poetry version $(poetry version --short)-dev.$GITHUB_RUN_NUMBER
376
+ echo "Using version from pyproject.toml file with dev suffix (because not on a tag): $(poetry version --short)"
377
+ echo "PACKAGE_NAME=$(poetry version | awk '{print $1}')" >> $GITHUB_ENV
378
+ echo "PACKAGE_VERSION=$(poetry version --short)" >> $GITHUB_ENV
379
+ if : ${{ !startsWith(github.ref, 'refs/tags/') }}
380
+ shell : bash
381
+
382
+ - name : Declare variables PACKAGE_NAME and PACKAGE_VERSION
383
+ id : variables_step
384
+ run : |
385
+ echo "Version used by poetry: $(poetry version --short)"
386
+ echo "PACKAGE_NAME=$(poetry version | awk '{print $1}')" >> $GITHUB_ENV
387
+ echo "PACKAGE_VERSION=$(poetry version --short)" >> $GITHUB_ENV
388
+ shell : bash
389
+
390
+ - uses : addnab/docker-run-action@v3
391
+ with :
392
+ registry : gcr.io
393
+ image : ${{ matrix.image }}
394
+ options : -v ${{ github.workspace }}:/src/
408
395
run : |
409
- sudo chown -R $(whoami):$(whoami) .
410
- cp pyinstaller/${{ matrix.folder }}/${{ matrix.executable}} .
411
- zip -r ${{ env.PACKAGE_NAME }}_${{ matrix.executable }}_v${{ env.PACKAGE_VERSION }}.zip ${{ matrix.executable }}
412
- echo "PACKAGE_ZIP=${{ env.PACKAGE_NAME }}_${{ matrix.executable }}_v${{ env.PACKAGE_VERSION }}.zip" >> $GITHUB_ENV
413
- working-directory : dist
414
-
415
- - name : Upload build artifacts
416
- uses : actions/upload-artifact@v4
417
- with :
418
- name : ${{ env.PACKAGE_ZIP }}
419
- path : dist/${{ env.PACKAGE_ZIP }}
420
- if-no-files-found : error
421
-
422
- - name : Upload artifacts to release (tagged only))
423
- uses : softprops/action-gh-release@v2
424
- if : startsWith(github.ref, 'refs/tags/')
425
- with :
426
- draft : false
427
- prerelease : false
428
- fail_on_unmatched_files : true
429
- files : |
430
- dist/${{ env.PACKAGE_ZIP }}
396
+ python -m pip install poetry
397
+ python -m poetry self add poetry-pyinstaller-plugin
398
+ python -m poetry install
399
+ python -m poetry build
400
+ if [ ! -f dist/pyinstaller/${{ matrix.folder }}/${{ matrix.executable }} ]
401
+ then
402
+ echo "Cannot find dist/pyinstaller/${{ matrix.folder }}/${{ matrix.executable }}"
403
+ exit 1
404
+ fi
405
+
406
+ - name : Zip up the binary
407
+ run : |
408
+ sudo chown -R $(whoami):$(whoami) .
409
+ cp pyinstaller/${{ matrix.folder }}/${{ matrix.executable}} .
410
+ zip -r ${{ env.PACKAGE_NAME }}_${{ matrix.executable }}_v${{ env.PACKAGE_VERSION }}.zip ${{ matrix.executable }}
411
+ echo "PACKAGE_ZIP=${{ env.PACKAGE_NAME }}_${{ matrix.executable }}_v${{ env.PACKAGE_VERSION }}.zip" >> $GITHUB_ENV
412
+ working-directory : dist
413
+
414
+ - name : Upload build artifacts
415
+ uses : actions/upload-artifact@v4
416
+ with :
417
+ name : ${{ env.PACKAGE_ZIP }}
418
+ path : dist/${{ env.PACKAGE_ZIP }}
419
+ if-no-files-found : error
420
+
421
+ - name : Upload artifacts to release (tagged only))
422
+ uses : softprops/action-gh-release@v2
423
+ if : startsWith(github.ref, 'refs/tags/')
424
+ with :
425
+ draft : false
426
+ prerelease : false
427
+ fail_on_unmatched_files : true
428
+ files : |
429
+ dist/${{ env.PACKAGE_ZIP }}
0 commit comments