Skip to content

Commit d6d56e7

Browse files
thewtexhjmjohnson
authored andcommitted
ENH: Update GitHub Actions configuration for ITK 5.4.0
Points to `main`, which is currently up-to-date with ITK v5.4.0.
1 parent 12f4574 commit d6d56e7

File tree

1 file changed

+2
-125
lines changed

1 file changed

+2
-125
lines changed
Lines changed: 2 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build, test, package
1+
name: Build, test
22

33
on:
44
push:
@@ -12,127 +12,4 @@ on:
1212

1313
jobs:
1414
cxx-build-workflow:
15-
runs-on: ${{ matrix.os }}
16-
strategy:
17-
max-parallel: 3
18-
matrix:
19-
os: [ubuntu-24.04, windows-2022, macos-10.15]
20-
include:
21-
- os: ubuntu-24.04
22-
c-compiler: "gcc"
23-
cxx-compiler: "g++"
24-
itk-git-tag: "v6.0a02"
25-
cmake-build-type: "MinSizeRel"
26-
- os: windows-2022
27-
c-compiler: "cl.exe"
28-
cxx-compiler: "cl.exe"
29-
itk-git-tag: "v6.0a02"
30-
cmake-build-type: "Release"
31-
- os: macos-10.15
32-
c-compiler: "clang"
33-
cxx-compiler: "clang++"
34-
itk-git-tag: "v6.0a02"
35-
cmake-build-type: "MinSizeRel"
36-
37-
steps:
38-
- uses: actions/checkout@v4
39-
40-
- name: Set up Python 3.12
41-
uses: actions/setup-python@v5
42-
with:
43-
python-version: 3.12
44-
45-
- name: Install build dependencies
46-
run: |
47-
python -m pip install --upgrade pip
48-
python -m pip install ninja
49-
50-
- name: Get specific version of CMake, Ninja
51-
uses: lukka/[email protected]
52-
53-
- name: Download ITK
54-
run: |
55-
cd ..
56-
git clone https://github.com/InsightSoftwareConsortium/ITK.git
57-
cd ITK
58-
git checkout ${{ matrix.itk-git-tag }}
59-
60-
- name: Build ITK
61-
if: matrix.os != 'windows-2022'
62-
run: |
63-
cd ..
64-
mkdir ITK-build
65-
cd ITK-build
66-
cmake -DCMAKE_C_COMPILER:FILEPATH="${{ matrix.c-compiler }}" -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake-build-type }} -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
67-
ninja
68-
69-
- name: Build ITK
70-
if: matrix.os == 'windows-2022'
71-
run: |
72-
cd ..
73-
mkdir ITK-build
74-
cd ITK-build
75-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
76-
cmake -DCMAKE_C_COMPILER:FILEPATH="${{ matrix.c-compiler }}" -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake-build-type }} -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
77-
ninja
78-
shell: cmd
79-
80-
- name: Fetch CTest driver script
81-
run: |
82-
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITK/dashboard/itk_common.cmake -O
83-
84-
- name: Configure CTest script
85-
shell: bash
86-
run: |
87-
operating_system="${{ matrix.os }}"
88-
cat > dashboard.cmake << EOF
89-
set(CTEST_SITE "GitHubActions")
90-
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/.." CTEST_DASHBOARD_ROOT)
91-
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/" CTEST_SOURCE_DIRECTORY)
92-
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/../build" CTEST_BINARY_DIRECTORY)
93-
set(dashboard_source_name "${GITHUB_REPOSITORY}")
94-
if(ENV{GITHUB_REF} MATCHES "master")
95-
set(branch "-master")
96-
set(dashboard_model "Continuous")
97-
else()
98-
set(branch "-${GITHUB_REF}")
99-
set(dashboard_model "Experimental")
100-
endif()
101-
set(CTEST_BUILD_NAME "${GITHUB_REPOSITORY}-${operating_system}-\${branch}")
102-
set(CTEST_UPDATE_VERSION_ONLY 1)
103-
set(CTEST_TEST_ARGS \${CTEST_TEST_ARGS} PARALLEL_LEVEL \${PARALLEL_LEVEL})
104-
set(CTEST_BUILD_CONFIGURATION "Release")
105-
set(CTEST_CMAKE_GENERATOR "Ninja")
106-
set(CTEST_CUSTOM_WARNING_EXCEPTION
107-
\${CTEST_CUSTOM_WARNING_EXCEPTION}
108-
# macOS Azure VM Warning
109-
"ld: warning: text-based stub file"
110-
)
111-
set(dashboard_no_clean 1)
112-
set(ENV{CC} ${{ matrix.c-compiler }})
113-
set(ENV{CXX} ${{ matrix.cxx-compiler }})
114-
if(WIN32)
115-
set(ENV{PATH} "\${CTEST_DASHBOARD_ROOT}/ITK-build/bin;\$ENV{PATH}")
116-
endif()
117-
set(dashboard_cache "
118-
ITK_DIR:PATH=\${CTEST_DASHBOARD_ROOT}/ITK-build
119-
BUILD_TESTING:BOOL=ON
120-
")
121-
string(TIMESTAMP build_date "%Y-%m-%d")
122-
message("CDash Build Identifier: \${build_date} \${CTEST_BUILD_NAME}")
123-
message("CTEST_SITE = \${CTEST_SITE}")
124-
include(\${CTEST_SCRIPT_DIRECTORY}/itk_common.cmake)
125-
EOF
126-
cat dashboard.cmake
127-
128-
- name: Build and test
129-
if: matrix.os != 'windows-2022'
130-
run: |
131-
ctest --output-on-failure -j 2 -V -S dashboard.cmake
132-
133-
- name: Build and test
134-
if: matrix.os == 'windows-2022'
135-
run: |
136-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
137-
ctest --output-on-failure -j 2 -VV -S dashboard.cmake
138-
shell: cmd
15+
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@main

0 commit comments

Comments
 (0)