Add MacOS targets, modify build script for Darwin, generate type annotations
parent
190093f404
commit
ba9a70bf16
|
@ -42,6 +42,24 @@ jobs:
|
||||||
platform_id: manylinux_aarch64
|
platform_id: manylinux_aarch64
|
||||||
manylinux_image: manylinux2014
|
manylinux_image: manylinux2014
|
||||||
|
|
||||||
|
# MacOS x86_64
|
||||||
|
- os: macos-13
|
||||||
|
python_version: "3.10"
|
||||||
|
cibw_python_version: 310
|
||||||
|
platform_id: macosx_x86_64
|
||||||
|
# - os: macos-13
|
||||||
|
# python_version: "3.11"
|
||||||
|
# cibw_python_version: 311
|
||||||
|
# platform_id: macosx_x86_64
|
||||||
|
# - os: macos-13
|
||||||
|
# python_version: "3.12"
|
||||||
|
# cibw_python_version: 312
|
||||||
|
# platform_id: macosx_x86_64
|
||||||
|
# - os: macos-13
|
||||||
|
# python_version: "3.13"
|
||||||
|
# cibw_python_version: 313
|
||||||
|
# platform_id: macosx_x86_64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
@ -8,25 +8,25 @@ set -x
|
||||||
|
|
||||||
PYTHON_VERSION="$1"
|
PYTHON_VERSION="$1"
|
||||||
PROJECT_DIR="$2"
|
PROJECT_DIR="$2"
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
export PYTHON="python${PYTHON_VERSION}"
|
export PYTHON="python${PYTHON_VERSION}"
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
if [ "$(uname)" == "Linux" ]; then
|
||||||
if [[ $ARCH == x86_64* ]]; then
|
|
||||||
yum install -y wget ninja-build
|
|
||||||
elif [[ $ARCH == arm* ]] || [[ $ARCH = aarch64 ]]; then
|
|
||||||
yum install -y wget
|
yum install -y wget
|
||||||
|
|
||||||
|
# Install Boost from source
|
||||||
|
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz --quiet
|
||||||
|
tar -xzf boost_1_87_0.tar.gz
|
||||||
|
cd boost_1_87_0
|
||||||
|
./bootstrap.sh --prefix=/opt/boost
|
||||||
|
./b2 install --prefix=/opt/boost --with=all
|
||||||
|
elif [ "$(uname)" == "Darwin" ]; then
|
||||||
|
brew install wget cmake boost
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$(which $PYTHON) -m pip install -r $PROJECT_DIR/python/dev_requirements.txt
|
$(which $PYTHON) -m pip install -r $PROJECT_DIR/python/dev_requirements.txt
|
||||||
|
|
||||||
# Install Boost
|
|
||||||
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz --quiet
|
|
||||||
tar -xzf boost_1_87_0.tar.gz
|
|
||||||
cd boost_1_87_0
|
|
||||||
./bootstrap.sh --prefix=/opt/boost
|
|
||||||
./b2 install --prefix=/opt/boost --with=all
|
|
||||||
|
|
||||||
# Remove build/cache files that were generated on host
|
# Remove build/cache files that were generated on host
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf $PROJECT_DIR/build
|
rm -rf $PROJECT_DIR/build
|
||||||
|
@ -50,3 +50,4 @@ cmake $PROJECT_DIR \
|
||||||
|
|
||||||
cd $PROJECT_DIR/build/python
|
cd $PROJECT_DIR/build/python
|
||||||
make -j $(nproc) install
|
make -j $(nproc) install
|
||||||
|
make -j $(nproc) python-stubs
|
||||||
|
|
Loading…
Reference in New Issue