From d3cda3fa8cce08c02484498e907305ee0a70f866 Mon Sep 17 00:00:00 2001 From: Joshua Newton Date: Tue, 7 Jan 2025 12:39:03 -0500 Subject: [PATCH] `build-ants.yml`: Add curl+unzip for prebuilt binaries --- .github/workflows/build-ants.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-ants.yml b/.github/workflows/build-ants.yml index 9c4f4b7..acc9159 100644 --- a/.github/workflows/build-ants.yml +++ b/.github/workflows/build-ants.yml @@ -26,9 +26,19 @@ 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" + ;; + 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-unix/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/ @@ -51,9 +61,12 @@ jobs: steps: - 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-centos/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-windows/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/