-
Notifications
You must be signed in to change notification settings - Fork 4
189 lines (166 loc) · 7.65 KB
/
macos.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: macOS CI
on:
push:
branches-ignore:
- "ghxyz"
paths:
- ".github/actions/**"
- ".github/workflows/macos.yml"
- "conanfile.py"
- "CMakePresets.json"
- "CMakeHPXPresets.json"
- "environment/cmake/**"
- "environment/script/write_conan_profile.py"
- "source/**"
- "!source/qa/python/qa/**"
jobs:
build:
strategy:
matrix:
os: ["macos-13"]
compiler:
- { name: clang, c: clang, cxx: clang++ }
python_version: ["3.11"]
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / ${{ matrix.compiler.cxx }}
defaults:
run:
shell: bash -l {0}
working-directory: .
env:
lue_source_directory: lue_source
lue_build_directory: lue_build
lue_runtime_install_directory: lue_runtime_install
lue_development_install_directory: lue_development_install
lue_consume_source_directory: lue_consume_source
lue_consume_build_directory: lue_consume_build
hpx_version: 1.9.1
hpx_source_directory: hpx_source
hpx_build_directory: hpx_build
hpx_install_directory: hpx_install
mdspan_source_directory: mdspan_source
mdspan_build_directory: mdspan_build
mdspan_install_directory: mdspan_install
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.lue_source_directory }}
- name: setup platform
run: |
brew install \
asio \
boost \
doxygen \
fmt \
gdal \
glfw \
graphviz \
gperftools \
hdf5 \
hwloc \
ninja \
nlohmann-json \
numpy \
pybind11 \
tree \
vulkan-loader
pip3 install conan docopt jinja2 matplotlib ruamel.yaml
conan profile detect
- name: "install hpx"
uses: ./lue_source/.github/actions/install_hpx
with:
cache_key: ${{ matrix.os }}_${{ matrix.compiler.cxx }}_python-${{ matrix.python_version }}_hpx-${{ env.hpx_version }}
c_compiler: ${{ matrix.compiler.c }}
cxx_compiler: ${{ matrix.compiler.cxx }}
build_type: Release
cmake_preset: hpx_release_macos_node_configuration
cmake_preset_file: ${{ env.lue_source_directory }}/CMakeHPXPresets.json
hpx_version: ${{ env.hpx_version }}
source_directory: ${{ env.hpx_source_directory }}
build_directory: ${{ env.hpx_build_directory }}
install_directory: ${{ env.hpx_install_directory }}
- name: "install mdspan"
uses: ./lue_source/.github/actions/install_mdspan
with:
cxx_compiler: ${{ matrix.compiler.cxx }}
build_type: Release
mdspan_tag: a799088 # 20191010
source_directory: ${{ env.mdspan_source_directory }}
build_directory: ${{ env.mdspan_build_directory }}
install_directory: ${{ env.mdspan_install_directory }}
- name: configure
run: |
mkdir ${{ env.lue_build_directory }}
python3 ${{ env.lue_source_directory }}/environment/script/write_conan_profile.py \
${{ matrix.compiler.cxx }} \
${{ env.lue_source_directory }}/host_profile
python3 ${{ env.lue_source_directory }}/environment/script/write_conan_profile.py \
${{ matrix.compiler.cxx }} \
${{ env.lue_source_directory }}/build_profile
LUE_CONAN_PACKAGES="docopt.cpp imgui" \
conan install ${{ env.lue_source_directory }} \
--profile:host=${{ env.lue_source_directory }}/host_profile \
--profile:build=${{ env.lue_source_directory }}/build_profile \
--build=missing \
--output-folder=${{ env.lue_build_directory }}
CMAKE_PREFIX_PATH=${{ env.lue_build_directory }} \
cmake \
-S ${{ env.lue_source_directory }} \
-B ${{ env.lue_build_directory }} \
--preset conan-release \
-D CMAKE_POLICY_DEFAULT_CMP0144=NEW \
-D LUE_BUILD_QA=TRUE \
-D LUE_QA_WITH_PYTHON_API=TRUE \
-D LUE_QA_WITH_TESTS=TRUE \
-D LUE_QA_TEST_NR_LOCALITIES_PER_TEST=1 \
-D LUE_QA_TEST_NR_THREADS_PER_LOCALITY=2 \
-D LUE_DATA_MODEL_WITH_PYTHON_API=TRUE \
-D LUE_DATA_MODEL_WITH_UTILITIES=TRUE \
-D LUE_FRAMEWORK_WITH_PYTHON_API=TRUE \
-D HPX_ROOT=${{ env.hpx_install_directory }} \
-D MDSPAN_ROOT=${{ env.mdspan_install_directory }} \
-D Python3_EXECUTABLE="/usr/local/bin/python3"
- name: build
run: |
cmake --build ${{ env.lue_build_directory }} --target all
- name: install
run: |
cmake \
--install ${{ env.lue_build_directory }} \
--prefix ${{ env.lue_runtime_install_directory }} \
--component lue_runtime \
--strip
cmake \
--install ${{ env.lue_build_directory }} \
--prefix ${{ env.lue_development_install_directory }} \
--component lue_development \
--strip
- name: test
run: |
# Unit tests
ctest --test-dir ${{ env.lue_build_directory }} --output-on-failure
# Test of runtime targets
${{ env.lue_runtime_install_directory }}/bin/lue_translate --version
${{ env.lue_runtime_install_directory }}/bin/lue_validate --version
${{ env.lue_runtime_install_directory }}/bin/lue_view --version
export PYTHONPATH="${{ env.lue_runtime_install_directory }}/lib/python${{ matrix.python_version}}:$PYTHONPATH"
export DYLD_FALLBACK_LIBRARY_PATH="${{ env.hpx_install_directory }}/lib:$DYLD_FALLBACK_LIBRARY_PATH"
python3 ${{ env.lue_runtime_install_directory }}/bin/lue_calculate --version
python3 ${{ env.lue_runtime_install_directory }}/bin/lue_scalability --version
python3 -c "import lue, lue.data_model, lue.framework, lue.pcraster, lue.qa.scalability; print(lue.__version__)"
# Test of imported CMake targets
git clone https://github.com/computationalgeography/lue_consume.git ${{ env.lue_consume_source_directory }}
cmake \
-S ${{ env.lue_consume_source_directory }} \
-B ${{ env.lue_consume_build_directory }} \
-G "Ninja" \
-D CMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_POLICY_DEFAULT_CMP0144=NEW \
-D LUE_ROOT=${{ env.lue_development_install_directory }} \
-D HPX_ROOT=${{ env.hpx_install_directory }} \
-D MDSPAN_ROOT=${{ env.mdspan_install_directory }}
cmake --build ${{ env.lue_consume_build_directory }} --target all
${{ env.lue_consume_build_directory }}/lue_consume_data_model
${{ env.lue_consume_build_directory }}/lue_consume_framework