@@ -25,10 +25,12 @@ permissions:
25
25
contents : read
26
26
pages : write
27
27
id-token : write
28
- env : # Define environment variables
29
28
30
- # Force tox and pytest to use color
29
+ env : # Define environment variables
30
+ SCIGET_NAME : fsl
31
+ SCIGET_VERSION : 6.0.7.18
31
32
FORCE_COLOR : true
33
+
32
34
jobs :
33
35
34
36
build :
@@ -62,46 +64,31 @@ jobs:
62
64
- name : Checkout repo
63
65
uses : actions/checkout@v4
64
66
65
- - name : Install Minconda
66
- uses : conda-incubator/setup-miniconda@v3
67
- with :
68
- auto-activate-base : true
69
- activate-environment : " "
70
-
71
- - name : Install fsl Packages
72
- run : >-
73
- conda install -c conda-forge -c https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/public/
74
- ciftilib cli11 elc fsl-add_module fsl-armawrap fsl-asl_mfree fsl-avwutils fsl-base
75
- fsl-basil fsl-basisfield fsl-baycest fsl-bet2 fsl-bianca fsl-biancadata fsl-bint
76
- fsl-cluster fsl-copain fsl-cprob fsl-cudimot fsl-data_atlases
77
- fsl-data_atlases_xtract fsl-data_first_models_317_bin fsl-data_first_models_336_bin fsl-data_linearmni
78
- fsl-data_omm fsl-data_possum fsl-data_standard fsl-deface fsl-discreteopt fsl-dpm fsl-dwssfp
79
- fsl-easyfeat fsl-eddy fsl-eddy_qc fsl-fabber_core fsl-fabber_models_asl fsl-fabber_models_cest
80
- fsl-fabber_models_dce fsl-fabber_models_dsc fsl-fabber_models_dualecho fsl-fabber_models_dwi
81
- fsl-fabber_models_pet fsl-fabber_models_qbold fsl-fabber_models_t1 fsl-fast4 fsl-fastpdlib
82
- fsl-fdt fsl-feat5 fsl-film fsl-filmbabe fsl-first fsl-first_lib fsl-flameo
83
- fsl-flirt fsl-fnirt fsl-fugue fsl-get_standard fsl-giftiio fsl-gps
84
- fsl-gui-desktop fsl-installer fsl-lesions fsl-libgdc fsl-libmeshutils fsl-libvis fsl-load_dicom fsl-mcflirt
85
- fsl-melodic fsl-meshclass fsl-misc_c fsl-misc_scripts fsl-misc_tcl fsl-miscmaths fsl-miscvis
86
- fsl-mist fsl-mm fsl-msm fsl-msmreglib fsl-mvdisc fsl-nets fsl-newimage
87
- fsl-newmesh fsl-newnifti fsl-newran fsl-oxford_asl fsl-possum fsl-ptx2 fsl-pyfeeds
88
- fsl-pyfeeds-tests fsl-qboot fsl-randomise fsl-relax fsl-shapemodel fsl-siena fsl-slicetimer
89
- fsl-sub fsl-sub-plugin-sge fsl-sub-plugin-slurm fsl-surface fsl-susan fsl-swe fsl-tbss
90
- fsl-topup fsl-utils fsl-vbm fsl-verbena fsl-vtkio fsl-warpfns fsl-wire fsl-xtract fsl-xtract_data
91
- fsl-znzlib fsl_mrs fsl_sub fsl_sub_plugin_sge fsl_sub_plugin_slurm
92
-
93
- - name : Download tasks converted from Nipype
94
- uses : actions/download-artifact@v4
95
- with :
96
- name : converted-nipype
97
- path : pydra/tasks/fsl/auto
67
+ - name : Revert version to most recent version tag on Nipype or Nipype2Pydra update
68
+ if : github.event_name == 'repository_dispatch'
69
+ run : git checkout $(git tag -l | grep 'v.*' | tail -n 1 | awk -F post '{print $1}')
98
70
99
- - name : Show the contents of the auto-generated tasks
100
- run : tree pydra
71
+ - name : Install Apptainer and Lmod
72
+ run : |
73
+ sudo add-apt-repository -y ppa:apptainer/ppa
74
+ sudo apt-get update
75
+ sudo apt-get install -y lmod apptainer
101
76
102
- - name : Strip auto package from gitignore so it is included in package
77
+ - name : Install Neurocommand
103
78
run : |
104
- sed -i '/\/pydra\/tasks\/fsl\/auto/d' .gitignore
79
+ git clone https://github.com/NeuroDesk/neurocommand.git
80
+ pushd neurocommand
81
+ pip3 install -r neurodesk/requirements.txt --user
82
+ bash build.sh --cli
83
+ echo "APPTAINER_BINDPATH=`pwd -P`" >> $GITHUB_ENV
84
+
85
+ source /etc/profile.d/lmod.sh
86
+ ./containers.sh "${{ env.SCIGET_NAME }}" | grep -E "^\s*\|\s*${{ env.SCIGET_NAME }}\s*\|\s*${{ env.SCIGET_VERSION }}\s*\|" | awk -F '|' '{gsub(/ /,"",$4); print $4}'
87
+ SCIGET_BUILDVERSION=$(./containers.sh "${{ env.SCIGET_NAME }}" | grep -E "^\s*\|\s*${{ env.SCIGET_NAME }}\s*\|\s*${{ env.SCIGET_VERSION }}\s*\|" | awk -F '|' '{gsub(/ /,"",$4); print $4}')
88
+
89
+ ./local/fetch_containers.sh ${{ env.SCIGET_NAME }} ${{ env.SCIGET_VERSION }} $SCIGET_BUILDVERSION
90
+ echo "SCIGET_BUILDVERSION=$SCIGET_BUILDVERSION" >> $GITHUB_ENV
91
+ popd
105
92
106
93
- name : Set up Python ${{ matrix.python-version }}
107
94
uses : actions/setup-python@v5
@@ -161,7 +148,7 @@ jobs:
161
148
- name : Set up Python
162
149
uses : actions/setup-python@v5
163
150
with :
164
- python-version : ' 3.11 '
151
+ python-version : ' 3.x '
165
152
166
153
- name : Install build tools
167
154
run : python -m pip install build twine
@@ -174,7 +161,7 @@ jobs:
174
161
175
162
- name : Check for PyPI token on tag
176
163
id : deployable
177
- if : github.event_name == 'release' || github.event_name == 'repository_dispatch'
164
+ if : github.event_name == 'release'
178
165
env :
179
166
PYPI_API_TOKEN : " ${{ secrets.PYPI_FILEFORMATS_API_TOKEN }}"
180
167
run : if [ -n "$PYPI_API_TOKEN" ]; then echo "DEPLOY=true" >> $GITHUB_OUTPUT; fi
@@ -200,7 +187,7 @@ jobs:
200
187
- name : Set up Python
201
188
uses : actions/setup-python@v5
202
189
with :
203
- python-version : ' 3.11 '
190
+ python-version : ' 3.x '
204
191
205
192
- name : Install build tools
206
193
run : python -m pip install build twine
@@ -213,7 +200,7 @@ jobs:
213
200
214
201
- name : Check for PyPI token on tag
215
202
id : deployable
216
- if : github.event_name == 'release' || github.event_name == 'repository_dispatch'
203
+ if : github.event_name == 'release'
217
204
env :
218
205
PYPI_API_TOKEN : " ${{ secrets.PYPI_FILEFORMATS_EXTRAS_API_TOKEN }}"
219
206
run : if [ -n "$PYPI_API_TOKEN" ]; then echo "DEPLOY=true" >> $GITHUB_OUTPUT; fi
@@ -227,9 +214,8 @@ jobs:
227
214
packages-dir : ./related-packages/fileformats-extras/dist
228
215
229
216
deploy :
230
- needs : [build, test]
217
+ needs : [build, test, deploy-fileformats, deploy-fileformats-extras ]
231
218
runs-on : ubuntu-latest
232
- if : github.event_name == 'release'
233
219
permissions :
234
220
attestations : write
235
221
id-token : write
@@ -240,8 +226,10 @@ jobs:
240
226
name : Packages
241
227
path : dist
242
228
- name : Upload to PyPI
229
+ if : github.event_name == 'release'
243
230
uses : pypa/gh-action-pypi-publish@release/v1
244
231
232
+
245
233
# Deploy on tags if PYPI_API_TOKEN is defined in the repository secrets.
246
234
# Secrets are not accessible in the if: condition [0], so set an output variable [1]
247
235
# [0] https://github.community/t/16928
0 commit comments