Skip to content

Linux x86_64 ManyLinux Wheels (cp*) #2

Linux x86_64 ManyLinux Wheels (cp*)

Linux x86_64 ManyLinux Wheels (cp*) #2

name: Linux x86_64 ManyLinux Wheels (cp*)
on:
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