forked from vistle/vistle
-
Notifications
You must be signed in to change notification settings - Fork 0
164 lines (150 loc) · 5.68 KB
/
cmake.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: CMake
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
name: ${{matrix.build_type}} on ${{matrix.os}}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
variant: [All]
build_type: [Debug]
static_link: [OFF]
modules_shared: [ON]
multi_process: [ON]
double_precision: [OFF]
large_index: [OFF]
include:
- os: 'ubuntu-latest'
variant: All
build_type: Release
static_link: ON
modules_shared: OFF
multi_process: OFF
double_precision: ON
large_index: ON
steps:
- name: Show info
if: runner.os == 'Linux'
run: |
cat /etc/apt/apt.conf || true
cat /etc/apt/apt.conf.d/* || true
ls -l /etc/apt/sources.list && cat /etc/apt/sources.list || true
ls -l /etc/apt/sources.list.d/* && cat /etc/apt/sources.list.d/* || true
- name: Clean apt
if: runner.os == 'Linux'
run: >
sudo apt-get clean && sudo rm -rf /etc/apt/sources.list.d/microsoft-prod.list && sudo rm -rf /var/lib/apt/lists/* && sudo rm -f /etc/apt/sources.list.d/archive_uri-* && sudo apt-get clean
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: >
sudo apt-get update && sudo apt-get install
ninja-build
libglew-dev
qttools5-dev
qtscript5-dev
libqt5scripttools5
libqt5svg5-dev
libqt5opengl5-dev
libqt5webkit5-dev
libpng-dev
libopenscenegraph-dev
libtbb-dev
libjpeg-dev
zlib1g-dev
libassimp-dev
libboost-atomic-dev
libboost-date-time-dev
libboost-exception-dev
libboost-filesystem-dev
libboost-iostreams-dev
libboost-locale-dev
libboost-log-dev
libboost-math-dev
libboost-program-options-dev
libboost-random-dev
libboost-serialization-dev
libboost-system-dev
libboost-thread-dev
libboost-timer-dev
libboost-tools-dev
libboost-dev
libtinyxml2-dev
libturbojpeg0-dev
liblz4-dev
libzstd-dev
libzip-dev
libarchive-dev
libbotan-2-dev
libvtk9-dev
libnetcdf-mpi-dev
libembree-dev
#libsnappy-dev # lz4 and zstd are better
- name: Install ISPC
if: runner.os == 'Linux'
run: >
wget https://github.com/ispc/ispc/releases/download/v1.23.0/ispc-v1.23.0-linux.tar.gz -O - | sudo tar --strip-components=2 -C /usr/local/bin/ -x -z -v -f - ispc-v1.23.0-linux/bin/ispc
- name: Install macOS Dependencies
if: runner.os == 'macOS'
run: |
brew update
# workaround for https://github.com/actions/setup-python/issues/577
#brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
brew install ninja botan boost assimp ispc embree coreutils jpeg-turbo open-mpi zstd lz4 qt tbb glew open-scene-graph libzip libarchive vtk tinyxml2 python hdf5 netcdf pnetcdf cgal proj gdal
- name: Free disk space
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed, but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: true
- name: Sync and update submodules recursive
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.os }}-${{ matrix.build_type }}
max-size: "1000M"
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: >
cmake -G Ninja
$GITHUB_WORKSPACE
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DVISTLE_BUILD_SHARED=${{matrix.static_link}}
-DVISTLE_MODULES_SHARED=${{matrix.modules_shared}}
-DVISTLE_64BIT_INDICES=${{matrix.large_index}}
-DVISTLE_DOUBLE_PRECISION=${{matrix.double_precision}}
-DVISTLE_MULTI_PROCESS=${{matrix.multi_process}}
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config ${{matrix.build_type}}