Skip to content

Commit 6b6d2d4

Browse files
committed
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 cb04fc2 commit 6b6d2d4

File tree

1 file changed

+3
-126
lines changed

1 file changed

+3
-126
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,7 @@
1-
name: Build, test, package
1+
name: Build, test
22

33
on: [push,pull_request]
44

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

0 commit comments

Comments
 (0)