-
Notifications
You must be signed in to change notification settings - Fork 54
82 lines (80 loc) · 2.47 KB
/
Copy pathmacosARM64_wheels.yml
File metadata and controls
82 lines (80 loc) · 2.47 KB
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
name: MacOS ARM64 Wheels
on:
push:
branches: [master]
tags:
- 'v*'
release:
types: [published]
workflow_dispatch:
jobs:
wheels-macos:
runs-on: macos-11
steps:
- name: Checkout ORE-SWIG
uses: actions/checkout@v4
- name: get QuantLib-SWIG
run: |
git submodule update --init
- name: Checkout ORE
uses: actions/checkout@v4
with:
repository: OpenSourceRisk/Engine
path: './ORE'
fetch-depth: 0
- name: get QuantLib
run: |
cd ORE
git submodule update --init
- name: Install Eigen
run: |
brew install eigen
- name: Install Boost
run: |
curl -O -L https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz
tar xfz boost_1_80_0.tar.gz
cd boost_1_80_0
./bootstrap.sh
./b2 architecture=arm address-model=64 -s NO_LZMA=1 -s NO_ZSTD=1 abi=aapcs install
- name: Build ORE CMake
run: |
cd ORE
mkdir build
cd build
cmake .. -DCMAKE_OSX_ARCHITECTURES=arm64 -DORE_USE_ZLIB=ON -DORE_BUILD_DOC=OFF -DORE_BUILD_EXAMPLES=OFF -DORE_BUILD_TESTS=OFF -DORE_BUILD_APP=OFF -DQL_BUILD_BENCHMARK=OFF -DQL_BUILD_EXAMPLES=OFF -DQL_BUILD_TEST_SUITE=OFF -DQL_ENABLE_SESSIONS=ON -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j4
cmake --install .
- name: Wrap ORE-SWIG
run: |
pwd
python -m pip install setuptools
cp wheels/oreanalytics-config.macos OREAnalytics-SWIG/oreanalytics-config
cd OREAnalytics-SWIG
ls -al
cd SWIG
ls -al
chmod +x oreanalytics.i
cd ..
cd Python
ls -al
pwd
python setup.py wrap
- name: Build Wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_SKIP: cp36-*
#CIBW_BUILD: cp310-macosx_arm64
#CIBW_BUILD: cp311-macosx_arm64
CIBW_ARCHS_MACOS: arm64
CXXFLAGS: -std=c++17 -g0 -O3
CIBW_BUILD_VERBOSITY: 2
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_LIBRARY_PATH=/usr/local/lib delocate-listdeps {wheel} &&
DYLD_LIBRARY_PATH=/usr/local/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
with:
package-dir: /Users/runner/work/ORE-SWIG/ORE-SWIG/OREAnalytics-SWIG/Python
- name: Save wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-macos-arm64
path: ./wheelhouse/*.whl