4
4
pull_request :
5
5
branches : [ master ]
6
6
workflow_dispatch :
7
- inputs :
8
- git_ref :
9
- description : ' Upstream ANTsX/ANTs commit ref to check out when building'
10
- required : true
11
- default : ' b37e8b56e4e518b0f2947f80d0e3701a5ddfe120'
12
7
13
8
jobs :
14
9
@@ -26,10 +21,22 @@ jobs:
26
21
echo "ARTIFACT=$OS" >> $GITHUB_ENV
27
22
- name : package
28
23
run : |
24
+ # download and extract pre-built ants
25
+ case "${{ env.ARTIFACT }}" in
26
+ ubuntu-latest)
27
+ URL="https://github.com/ANTsX/ANTs/releases/download/v2.4.4/ants-2.4.4-ubuntu-22.04-X64-gcc.zip"
28
+ ;;
29
+ macos-latest)
30
+ URL="https://github.com/ANTsX/ANTs/releases/download/v2.4.4/ants-2.4.4-macos-12-X64-clang.zip"
31
+ ;;
32
+ esac
33
+ curl -L "$URL" -o ants-unix.zip
34
+ unzip ants-unix.zip
29
35
# snip out the apps we need for https://github.com/neuropoly/spinalcordtoolbox, since including all of ANTS is too much
30
36
mkdir sct-apps/
31
- cp antsbin/ANTS-build/Examples /{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform} sct-apps
37
+ cp ants-2.4.4/bin /{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform} sct-apps
32
38
(cd sct-apps; for i in *; do mv $i isct_$i; done)
39
+ curl https://raw.githubusercontent.com/ANTsX/ANTs/refs/heads/master/COPYING.txt -o COPYING.txt
33
40
cp COPYING.txt sct-apps
34
41
tar -zcvf sct-apps_${{ env.ARTIFACT }}.tar.gz sct-apps/
35
42
continue-on-error : true
@@ -49,14 +56,25 @@ jobs:
49
56
runs-on : ubuntu-latest
50
57
container : ${{ matrix.os }}
51
58
steps :
59
+ - name : install centos toolchain
60
+ if : contains(matrix.os, 'centos:stream8')
61
+ run : |
62
+ # Sed commands come from https://archive.ph/FS47T
63
+ sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
64
+ sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
65
+ yum install -y gcc git curl unzip
52
66
- name : package
53
67
run : |
68
+ # download and extract pre-built ants
69
+ curl -L "https://github.com/ANTsX/ANTs/releases/download/v2.4.4/ants-2.4.4-centos7-X64-gcc.zip" -o ants-centos.zip
70
+ unzip ants-centos.zip
54
71
# snip out the apps we need for https://github.com/neuropoly/spinalcordtoolbox, since including all of ANTS is too much
55
72
mkdir sct-apps/
56
- cp antsbin/ANTS-build/Examples /{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform} sct-apps
73
+ cp ants-2.4.4/bin /{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform} sct-apps
57
74
(cd sct-apps; for i in `ls`; do mv $i isct_$i; done)
75
+ curl https://raw.githubusercontent.com/ANTsX/ANTs/refs/heads/master/COPYING.txt -o COPYING.txt
58
76
cp COPYING.txt sct-apps
59
- tar -zcvf sct-apps_${{ env.ARTIFACT }} .tar.gz sct-apps/
77
+ tar -zcvf sct-apps_centos-8 .tar.gz sct-apps/
60
78
continue-on-error : true
61
79
- name : results (DEBUG)
62
80
run : find .
@@ -84,10 +102,13 @@ jobs:
84
102
echo "ARTIFACT=$OS" >> $GITHUB_ENV
85
103
- name : package
86
104
run : |
105
+ curl -L "https://github.com/ANTsX/ANTs/releases/download/v2.4.4/ants-2.4.4-windows-2022-X64-VS2019.zip" -o ants-windows.zip
106
+ unzip ants-windows.zip
87
107
# snip out the apps we need for https://github.com/neuropoly/spinalcordtoolbox, since including all of ANTS is too much
88
108
mkdir sct-apps/
89
- cp antsbin/ANTS-build/Examples/Release /{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform}.exe sct-apps
109
+ cp ants-2.4.4/bin /{antsRegistration,antsSliceRegularizedRegistration,antsApplyTransforms,ComposeMultiTransform}.exe sct-apps
90
110
(cd sct-apps; for i in `ls`; do mv $i isct_$i; done)
111
+ curl https://raw.githubusercontent.com/ANTsX/ANTs/refs/heads/master/COPYING.txt -o COPYING.txt
91
112
cp COPYING.txt sct-apps
92
113
tar -zcvf sct-apps_${{ env.ARTIFACT }}.tar.gz sct-apps/
93
114
continue-on-error : true
@@ -148,4 +169,4 @@ jobs:
148
169
name : Release ${{ github.sha }}
149
170
draft : true
150
171
prerelease : true
151
- artifacts : ' sct-apps_centos-8/sct-apps_centos-8 .tar.gz,sct-apps_ubuntu-latest/sct-apps_ubuntu-latest .tar.gz,sct-apps_macos-latest/sct-apps_macos-latest .tar.gz,sct-apps_windows-latest/ sct-apps_windows-latest.tar.gz'
172
+ artifacts : ' sct-apps_centos-8.tar.gz,sct-apps_ubuntu-latest.tar.gz,sct-apps_macos-latest.tar.gz,sct-apps_windows-latest.tar.gz'
0 commit comments