Skip to content

Commit

Permalink
build-ants.yml: Add curl+unzip for prebuilt binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacwnewton committed Jan 7, 2025
1 parent 3640b63 commit d3cda3f
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/build-ants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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/
Expand Down Expand Up @@ -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/
Expand Down

0 comments on commit d3cda3f

Please sign in to comment.