-
Notifications
You must be signed in to change notification settings - Fork 92
151 lines (133 loc) · 4.29 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Build
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
# push:
# release:
# types:
# - published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-20.04,macos-13,macos-14,windows-2019]
os: [ubuntu-20.04]
steps:
# Setup ninja
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
# Install system packages
- name: Install System Packages
uses: ConorMacBride/install-package@v1
with:
brew: curl
apt: libcurl4-openssl-dev
choco: curl
# Install Qt
- name: Install Qt on Ubuntu
uses: jurplel/install-qt-action@v4
if: ${{ startsWith(matrix.os,'ubuntu') }}
with:
version: '6.6.3'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
# Use cached VTK build if available
- name: Cache VTK
id: cache-vtk
uses: actions/cache@v4
with:
path: ${{github.workspace}}/vtk/install
key: ${{ runner.os }}-vtk-9.3.1
# Check out VTK
- name: Checkout VTK
if: steps.cache-vtk.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: 'Kitware/VTK.git'
ref: 'v9.3.1'
submodules: true
path: 'vtk'
# Build VTK
- name: Build VTK
if: steps.cache-vtk.outputs.cache-hit != 'true'
uses: threeal/[email protected]
with:
source-dir: ${{github.workspace}}/vtk
build-dir: ${{github.workspace}}/vtk/build
build-args: |
-t
install
generator: Ninja
options: |
BUILD_TESTING:BOOL=FALSE
BUILD_EXAMPLES:BOOL=FALSE
BUILD_SHARED_LIBS:BOOL=FALSE
VTK_REQUIRED_OBJCXX_FLAGS:STRING=
VTK_GROUP_ENABLE_Qt:STRING=YES
VTK_MODULE_ENABLE_VTK_GUISupportQtQuick:STRING=NO
VTK_MODULE_ENABLE_VTK_GUISupportQtSQL:STRING=NO
CMAKE_INSTALL_PREFIX=${{github.workspace}}/vtk/install
# Use cached ITK build if available
- name: Cache ITK
id: cache-itk
uses: actions/cache@v4
with:
path: ${{github.workspace}}/itk/install
key: ${{ runner.os }}-itk-5.4.0
# Check out ITK
- name: Checkout ITK
if: steps.cache-itk.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: 'InsightSoftwareConsortium/ITK.git'
ref: 'v5.4.0'
submodules: true
path: 'itk'
# Build ITK
- name: Build ITK
if: steps.cache-itk.outputs.cache-hit != 'true'
uses: threeal/[email protected]
with:
source-dir: ${{github.workspace}}/itk
build-dir: ${{github.workspace}}/itk/build
build-args: |
-t
install
generator: Ninja
options: |
BUILD_TESTING:BOOL=FALSE
BUILD_EXAMPLES:BOOL=FALSE
Module_MorphologicalContourInterpolation:BOOL=TRUE
CMAKE_INSTALL_PREFIX=${{github.workspace}}/itk/install
# Checkout ITK-SNAP code
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
path: 'itksnap'
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
# Build ITK-SNAP
- name: Build ITK-SNAP
uses: threeal/[email protected]
with:
source-dir: ${{github.workspace}}/itksnap
build-dir: ${{github.workspace}}/itksnap/build
build-args: |
-t
install
generator: Ninja
options: |
ITK-DIR=${{github.workspace}}/itk/install/lib/cmake/ITK-5.4
VTK-DIR=${{github.workspace}}/vtk/install/lib/cmake/vtk-9.3
CMAKE_PREFIX_PATH=${{github.workspace}}/../Qt/6.6.3/linux/lib/cmake
CMAKE_BUILD_TYPE=Release