Skip to content

Commit 14cf740

Browse files
committed
github actions: build - workaround for ITK install bug on Windows - keep build/src there instead
1 parent b74ede7 commit 14cf740

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,16 @@ jobs:
9595
path: itk-5.4.0
9696
key: ${{ runner.os }}-qt${{env.QT_VERSION}}-itk-5.4.0
9797

98-
- if: steps.cache-itk.outputs.cache-hit != 'true'
98+
- if: runner.os == 'Windows'
99+
# Since ITK install is currently broken on Windows (see below), we also need to cache source folder here:
100+
name: Check cache for ITK source folder
101+
id: cache-itk-src
102+
uses: actions/cache@v4
103+
with:
104+
path: itk-src-5.4.0
105+
key: ${{ runner.os }}-qt${{env.QT_VERSION}}-itk-src-5.4.0
106+
107+
- if: ${{ runner.os == 'Linux' && steps.cache-itk.outputs.cache-hit != 'true' }}
99108
name: ITK download, extract, configure, build, install
100109
run: |
101110
mkdir -p itk
@@ -110,6 +119,21 @@ jobs:
110119
cd ../..
111120
rm -r itk
112121
122+
- if: ${{ runner.os == 'Windows' && (steps.cache-itk.outputs.cache-hit != 'true' || steps.cache-itk-src.outputs.cache-hit != 'true') }}
123+
# ITK install is currently broken on Windows, see https://discourse.itk.org/t/7414
124+
# therefore, we build ITK instead at the location to which we would otherwise install it, and keep the build and source folder (see also src cache step above):
125+
name: ITK download, extract, configure, build, install
126+
run: |
127+
curl -L https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.4.0/InsightToolkit-5.4.0.tar.gz --output src-5.4.0.tar.gz
128+
tar -xzf src-5.4.0.tar.gz
129+
mv InsightToolkit-5.4.0 itk-src-5.4.0
130+
mkdir itk-5.4.0
131+
cd itk-5.4.0
132+
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.ITK_CMAKE_OPTIONS}} -DVTK_DIR:PATH=${{github.workspace}}/vtk-9.4.1/lib/cmake/vtk-9.4 ../itk-src-5.4.0
133+
cmake --build . --config ${{env.BUILD_TYPE}} -j 4
134+
cd ..
135+
rm -r src-5.4.0.tar.gz
136+
113137
- name: Install npm
114138
uses: actions/setup-node@v4
115139
with:

0 commit comments

Comments
 (0)