forked from OpenSourceRisk/Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (101 loc) · 3.44 KB
/
linux_manylinux_wheels_02.yml
File metadata and controls
103 lines (101 loc) · 3.44 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Linux x86_64 ManyLinux Wheels (cp*)
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
wheels-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-wheel: "cp38"
python-version: "3.8"
- python-wheel: "cp39"
python-version: "3.9"
- python-wheel: "cp310"
python-version: "3.10"
- python-wheel: "cp311"
python-version: "3.11"
- python-wheel: "cp312"
python-version: "3.12"
- python-wheel: "cp313"
python-version: "3.13"
steps:
- name: Checkout ORE
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
if: ${{ matrix.python-version }} != "3.13"
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install setuptools for Python 3.12
if: ${{ matrix.python-version }} == "3.12"
run: |
pip install setuptools
#- name: get QuantLib
# run: |
# git submodule update --init --recursive
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- name: Install eigen
run: |
curl -O -L https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
tar zxvf eigen-3.4.0.tar.gz
cd eigen-3.4.0
mkdir build
cd build
cmake ..
export
export Eigen3_DIR=$CURRENT_DIR/eigen-3.4.0
- name: Build Zlib
run: |
pwd
curl -O -L https://www.zlib.net/zlib-1.3.1.tar.gz
tar xzvf zlib-1.3.1.tar.gz
cd zlib-1.3.1
./configure
make
export ZLIB_ROOT=$CURRENT_DIR/zlib-1.3.1
# - name: Build ORE
# run : pwd; cd ORE; mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release -DORE_USE_ZLIB=ON -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -G "Ninja" ..
# - name: cmake build
# run: pwd; cd ORE; cd build; cmake --build . -j $(nproc)
# - name: Wrap ORE-SWIG
# run: pwd; cd OREAnalytics-SWIG/Python; python setup.py wrap
- name: Copy Configuration
run: |
pwd
cp ORE-SWIG/Wheels/oreanalytics-config.linux ORE-SWIG/oreanalytics-config
chmod +x ORE-SWIG/oreanalytics-config
cd ORE-SWIG/Wheels
chmod +x before_all_linux.sh
- name: Build ORE wheels
uses: pypa/cibuildwheel@v3.2.1
env:
#CIBW_BUILD: "*-manylinux_x86_64"
#CIBW_SKIP: cp36-* pp*
#CIBW_BUILD: cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64
CIBW_BUILD: ${{matrix.python-wheel}}-manylinux_x86_64
CIBW_ARCHS_LINUX: x86_64
CIBW_BUILD_VERBOSITY: 2
CIBW_BEFORE_BUILD_LINUX: ./ORE-SWIG/Wheels/before_all_linux.sh
#CIBW_ENVIRONMENT_LINUX: CXXFLAGS="-O3 -g0"
CIBW_ENVIRONMENT_LINUX: CXXFLAGS="-std=c++20 -DNDEBUG -O3 -g0" ORE=/project
CIBW_ENVIRONMENT_PASS_LINUX: CXXFLAGS
with:
package-dir: ${{ github.workspace }}/ORE-SWIG
- name: Save wheels as artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: wheels-linux-manylinux-x86_64-${{ matrix.python-version }}
path: ./wheelhouse/*.whl