@@ -25,10 +25,12 @@ permissions:
2525 contents : read
2626 pages : write
2727 id-token : write
28- env : # Define environment variables
2928
30- # Force tox and pytest to use color
29+ env : # Define environment variables
30+ SCIGET_NAME : fsl
31+ SCIGET_VERSION : 6.0.7.18
3132 FORCE_COLOR : true
33+
3234jobs :
3335
3436 build :
@@ -62,46 +64,31 @@ jobs:
6264 - name : Checkout repo
6365 uses : actions/checkout@v4
6466
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}')
9870
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
10176
102- - name : Strip auto package from gitignore so it is included in package
77+ - name : Install Neurocommand
10378 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
10592
10693 - name : Set up Python ${{ matrix.python-version }}
10794 uses : actions/setup-python@v5
@@ -161,7 +148,7 @@ jobs:
161148 - name : Set up Python
162149 uses : actions/setup-python@v5
163150 with :
164- python-version : ' 3.11 '
151+ python-version : ' 3.x '
165152
166153 - name : Install build tools
167154 run : python -m pip install build twine
@@ -174,7 +161,7 @@ jobs:
174161
175162 - name : Check for PyPI token on tag
176163 id : deployable
177- if : github.event_name == 'release' || github.event_name == 'repository_dispatch'
164+ if : github.event_name == 'release'
178165 env :
179166 PYPI_API_TOKEN : " ${{ secrets.PYPI_FILEFORMATS_API_TOKEN }}"
180167 run : if [ -n "$PYPI_API_TOKEN" ]; then echo "DEPLOY=true" >> $GITHUB_OUTPUT; fi
@@ -200,7 +187,7 @@ jobs:
200187 - name : Set up Python
201188 uses : actions/setup-python@v5
202189 with :
203- python-version : ' 3.11 '
190+ python-version : ' 3.x '
204191
205192 - name : Install build tools
206193 run : python -m pip install build twine
@@ -213,7 +200,7 @@ jobs:
213200
214201 - name : Check for PyPI token on tag
215202 id : deployable
216- if : github.event_name == 'release' || github.event_name == 'repository_dispatch'
203+ if : github.event_name == 'release'
217204 env :
218205 PYPI_API_TOKEN : " ${{ secrets.PYPI_FILEFORMATS_EXTRAS_API_TOKEN }}"
219206 run : if [ -n "$PYPI_API_TOKEN" ]; then echo "DEPLOY=true" >> $GITHUB_OUTPUT; fi
@@ -227,9 +214,8 @@ jobs:
227214 packages-dir : ./related-packages/fileformats-extras/dist
228215
229216 deploy :
230- needs : [build, test]
217+ needs : [build, test, deploy-fileformats, deploy-fileformats-extras ]
231218 runs-on : ubuntu-latest
232- if : github.event_name == 'release'
233219 permissions :
234220 attestations : write
235221 id-token : write
@@ -240,8 +226,10 @@ jobs:
240226 name : Packages
241227 path : dist
242228 - name : Upload to PyPI
229+ if : github.event_name == 'release'
243230 uses : pypa/gh-action-pypi-publish@release/v1
244231
232+
245233# Deploy on tags if PYPI_API_TOKEN is defined in the repository secrets.
246234# Secrets are not accessible in the if: condition [0], so set an output variable [1]
247235# [0] https://github.community/t/16928
0 commit comments