diff --git a/.github/workflows/build-ants.yml b/.github/workflows/build-ants.yml index 9c4f4b7..c96ccb6 100644 --- a/.github/workflows/build-ants.yml +++ b/.github/workflows/build-ants.yml @@ -4,11 +4,6 @@ on: pull_request: branches: [ master ] workflow_dispatch: - inputs: - git_ref: - description: 'Upstream ANTsX/ANTs commit ref to check out when building' - required: true - default: 'b37e8b56e4e518b0f2947f80d0e3701a5ddfe120' jobs: @@ -26,9 +21,20 @@ jobs: echo "ARTIFACT=$OS" >> $GITHUB_ENV - name: package run: | + # download and extract pre-built ants + case "${{ env.ARTIFACT }}" in + ubuntu-latest) + URL="https://github.com/spinalcordtoolbox/build_ANTs/releases/download/r20220516-2/sct-apps_centos7.tar.gz" + ;; + macos-latest) + URL="https://github.com/spinalcordtoolbox/build_ANTs/releases/download/r20220516-2/sct-apps_macos-10.15.tar.gz" + ;; + esac + curl -L "$URL" -o ants-unix.tar.gz + unzip ants-unix.tar.gz # snip out the apps we need for https://github.com/neuropoly/spinalcordtoolbox, since including all of ANTS is too much mkdir sct-apps/ - cp antsbin/ANTS-build/Examples/{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform} sct-apps + cp ants-2.4.4/bin/{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform} sct-apps (cd sct-apps; for i in *; do mv $i isct_$i; done) cp COPYING.txt sct-apps tar -zcvf sct-apps_${{ env.ARTIFACT }}.tar.gz sct-apps/ @@ -49,11 +55,18 @@ jobs: runs-on: ubuntu-latest container: ${{ matrix.os }} steps: + - name: install centos toolchain + if: contains(matrix.os, 'centos:stream8') + run: | + yum install -y unzip - name: package run: | + # download and extract pre-built ants + curl -L "https://github.com/ANTsX/ANTs/releases/download/v2.4.4/ants-2.4.4-centos7-X64-gcc.zip" -o ants-centos.tar.gz + unzip ants-centos.tar.gz # snip out the apps we need for https://github.com/neuropoly/spinalcordtoolbox, since including all of ANTS is too much mkdir sct-apps/ - cp antsbin/ANTS-build/Examples/{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform} sct-apps + cp ants-2.4.4/bin/{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform} sct-apps (cd sct-apps; for i in `ls`; do mv $i isct_$i; done) cp COPYING.txt sct-apps tar -zcvf sct-apps_${{ env.ARTIFACT }}.tar.gz sct-apps/ @@ -84,9 +97,11 @@ jobs: echo "ARTIFACT=$OS" >> $GITHUB_ENV - name: package run: | + curl -L "https://github.com/ANTsX/ANTs/releases/download/v2.4.4/ants-2.4.4-ubuntu-22.04-X64-gcc.zip" -o ants-windows.tar.gz + unzip ants-windows.tar.gz # snip out the apps we need for https://github.com/neuropoly/spinalcordtoolbox, since including all of ANTS is too much mkdir sct-apps/ - cp antsbin/ANTS-build/Examples/Release/{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform}.exe sct-apps + cp ants-2.4.4/bin/{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform}.exe sct-apps (cd sct-apps; for i in `ls`; do mv $i isct_$i; done) cp COPYING.txt sct-apps tar -zcvf sct-apps_${{ env.ARTIFACT }}.tar.gz sct-apps/