这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
4f4eab5
enable apple silicon builds
Oct 15, 2023
549a6a7
restrict Apple Silicon builds to Python3.9+
Oct 15, 2023
72a907f
hw matrix setup
Oct 15, 2023
509406e
print status
Oct 15, 2023
1a096f4
matrix magic
Oct 15, 2023
7b2239b
yaml fix
Oct 15, 2023
c63d3db
test
LeonhardFS Oct 16, 2023
d2861b7
test
LeonhardFS Oct 16, 2023
ab572b8
use macos12 for delocate
LeonhardFS Oct 16, 2023
2f34623
fix
LeonhardFS Oct 16, 2023
10d6c87
Merge branch 'master' into ls-apple-silicon
Oct 22, 2023
b7ba825
Merge branch 'ls-apple-silicon' of github.com:LeonhardFS/tuplex-publi…
Oct 22, 2023
3b07d84
update scripts for arm64 wheels
Oct 24, 2023
d981cc1
experimental transitioning to vcpkg
Oct 24, 2023
1b4b344
llvm 17 can be added
Oct 24, 2023
3496cee
vcpkg support step by step
Oct 25, 2023
15c26f5
wip llvm17 compatibility, remove typed pointers
Oct 25, 2023
28a65a0
remove old functions
Oct 25, 2023
1318a6f
merge in master
Oct 25, 2023
00d56e0
llvm17 fixes, remove old code
Oct 26, 2023
767b311
fixes
Oct 26, 2023
19662ab
more API fixes for llvm17
Oct 27, 2023
13ca03a
more fixing
Oct 27, 2023
273b1ae
compile now works, need to link with llvm libs
Oct 27, 2023
728346b
llvm and cmake tune
Oct 27, 2023
a3b9586
linking and warnings
Oct 27, 2023
5af6370
everything builds now, but tests fail
Oct 27, 2023
22fd6d9
fixes and export symbols in runtime shared object
Nov 2, 2023
356d1a1
compile fixes, change lllvm version to 15 to have typed pointers
Nov 2, 2023
1dd7da8
another fix
Nov 3, 2023
f73d326
update address resolution for llvm17
Nov 3, 2023
9e4d108
update github pipelines to rely on vcpkg for this build
LeonhardFS Nov 4, 2023
7eeb6c5
cleanup cmake struct
LeonhardFS Nov 17, 2023
4319f1c
draft, wheel script with test
LeonhardFS Nov 17, 2023
4eef533
test github
LeonhardFS Nov 18, 2023
0b348e8
Merge branch 'master' into ls-cibw-test
Nov 18, 2023
ae89bf9
use 90s max timeout per pytest
Nov 18, 2023
6475ccb
protobuf change
Nov 18, 2023
986b5c5
change test script to use parametrize
Nov 19, 2023
4d24852
merge in master
Nov 19, 2023
f97bb6a
update test with parametrize and set meaningful timeout
Nov 19, 2023
55f2b6b
verbose print test run
Nov 19, 2023
2bf959e
fix exceptions
Nov 19, 2023
e47df0b
setup update
Nov 19, 2023
77168f9
increase timeout and print slowest tests
Nov 20, 2023
1a32297
next CI try
Nov 20, 2023
d9dcc96
long timeout
Nov 21, 2023
006e8b3
lower test input
LeonhardFS Nov 21, 2023
5ba5c4c
another test
LeonhardFS Nov 21, 2023
e6b06c1
test fix
LeonhardFS Nov 22, 2023
5112495
remove min
Nov 22, 2023
c2c9424
check test
Nov 22, 2023
db36068
llvm17 fixes/updates
Nov 22, 2023
2a335c2
Merge branch 'ls-llvm17-update' into ls-cibw-test
Nov 22, 2023
a969d68
llvm17 changes
Nov 22, 2023
65f01e7
bugfix wrong storage of pointer/cbool const
Nov 22, 2023
0d8b23d
add release as option
Nov 23, 2023
6619d7d
Merge branch 'ls-cibw-test' of github.com:LeonhardFS/tuplex-public in…
Nov 23, 2023
b14d3aa
changes
LeonhardFS Nov 23, 2023
67c390f
Merge branch 'ls-cibw-test' of github.com:LeonhardFS/tuplex-public in…
LeonhardFS Nov 23, 2023
10bd926
remove unnecessary includes
LeonhardFS Nov 23, 2023
a787643
use xdist
LeonhardFS Nov 30, 2023
2a4854a
install additional signals
LeonhardFS Nov 30, 2023
9b62785
add fixes re unlocking partitions when exception occurs
LeonhardFS Dec 1, 2023
18b108a
check with debug build
LeonhardFS Dec 1, 2023
9f100f0
more logging
Dec 2, 2023
90f360d
add dwarf/elf lib for backward
Dec 2, 2023
af04af7
more debugging
Dec 2, 2023
fb4e52c
add backward tracing and more debug logging
Dec 2, 2023
d17bf95
test script
Dec 2, 2023
3abc1e8
change to batch processing for result-set conversion and explicit sig…
Dec 3, 2023
4a8b3d5
row changes
LeonhardFS Dec 3, 2023
4724605
Merge branch 'ls-cibw-test' of github.com:LeonhardFS/tuplex-public in…
LeonhardFS Dec 3, 2023
565df68
more debugging, and updates
Dec 4, 2023
df51428
update dependencies
Dec 4, 2023
d72fa70
more debug
Dec 4, 2023
c3f4fb6
merge
LeonhardFS Dec 4, 2023
e33d896
merge
LeonhardFS Dec 4, 2023
1ccc238
update buffer and serializer
Dec 4, 2023
50ec114
Merge branch 'ls-cibw-test' of github.com:LeonhardFS/tuplex-public in…
Dec 4, 2023
607b06b
change settings to rel
LeonhardFS Dec 4, 2023
9df2a36
use debug print now
Dec 4, 2023
a18f17e
test
Dec 4, 2023
117d583
serializer fixes
LeonhardFS Dec 5, 2023
c0c4e83
Merge branch 'ls-cibw-test' of github.com:LeonhardFS/tuplex-public in…
LeonhardFS Dec 5, 2023
3f9f6c0
work for serializing lists
LeonhardFS Dec 5, 2023
7887bca
more serialization fixes
LeonhardFS Dec 5, 2023
19b7b69
wheel build
Dec 5, 2023
94393a3
workflow update
Dec 5, 2023
f37ac07
new test, fails right now. need to fix
LeonhardFS Dec 5, 2023
3805bdb
Merge branch 'ls-cibw-test' of github.com:LeonhardFS/tuplex-public in…
LeonhardFS Dec 5, 2023
8ce7fde
lower n for faster testing on CI
LeonhardFS Dec 6, 2023
edd7344
remove backward from build, and fix offset bug in deserializer
Dec 6, 2023
75c48ac
update workflow + linux test file
Dec 6, 2023
93e642f
fix bug with list serialize
Dec 6, 2023
550fdbc
another test fix for option serialization/encoding
Dec 6, 2023
fedae6c
allow parallel notebook run
Dec 6, 2023
5c86ed0
fix
LeonhardFS Dec 7, 2023
eb7aedf
dir create fix
LeonhardFS Dec 7, 2023
06a93ab
cache brew dependencies
Dec 8, 2023
67d10cb
llvm downgrade
Dec 9, 2023
b9eba7f
use backward to analyze ci failure
Dec 10, 2023
925d393
build target
Dec 11, 2023
59ae28c
changes for zstd
Dec 12, 2023
3e1c154
add linking step for cache
Dec 12, 2023
1b65f6c
update scripts to be lazy for macos
Dec 12, 2023
0cec731
refactor pybind conversion function
Dec 12, 2023
c9b25e9
reduce N in combined exception handling to avoid timeout of 180s
Dec 12, 2023
1fc097e
abseil link for github cache
LeonhardFS Dec 13, 2023
f7db3a2
cleanup
Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,29 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Cache brew dependencies
if: runner.os == 'macOS'
uses: actions/cache@v3.3.2
with:
# Paths to cache:
# /usr/local/Homebrew - installation folder of Homebrew
# /usr/local/Cellar - installation folder of Homebrew formulae
# /usr/local/Frameworks, /usr/local/bin, /usr/local/opt - contain (links to) binaries installed by Homebrew formulae
path: |
/usr/local/Homebrew
/usr/local/Cellar
/usr/local/Frameworks
/usr/local/bin
/usr/local/opt
key: macos-11-build-cache-${{ hashFiles('./scripts/macos/brew_dependencies.sh') }}-v2

# need to make this an intermediate step, i.e. build first the different lambda runners on Ubuntu...
- name: Build Lambda runner (Linux only)
if: runner.os != 'macOS'
run: docker pull registry-1.docker.io/tuplex/ci:${{ matrix.python-version }} && export PYTHON3_VERSION=${{ matrix.python-version }}.0 && bash ./scripts/create_lambda_zip.sh && mkdir -p ./tuplex/python/tuplex/other && cp ./build-lambda/tplxlam.zip ./tuplex/python/tuplex/other
shell: bash

- name: Build wheels
- name: Build wheel
#if: runner.os != 'macOS'
uses: pypa/cibuildwheel@fff9ec32ed25a9c576750c91e06b410ed0c15db7 # hash corresponds to v2.16.2
env:
Expand All @@ -62,11 +78,15 @@ jobs:

# requires macOS 10.13 at least to build because of C++17 features.
CIBW_ENVIRONMENT_MACOS: "CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' JAVA_HOME=${JAVA_HOME_11_X64}"
# run all python tests to make sure wheels are not defunct
CIBW_TEST_REQUIRES: "pytest pytest-timeout numpy nbformat jupyter"
# use 3min timeout per test and print top 25 slowest tests
CIBW_TEST_COMMAND: "cd {project} && pytest tuplex/python/tests -v --timeout 600 --durations 25"

- name: reorganize files
run: touch ./scripts/dummy.version && cp ./scripts/*.version ./wheelhouse && cp ./.github/scripts/test_pypi.sh ./wheelhouse

- uses: actions/upload-artifact@v3
with:
path: |
./wheelhouse/*.whl
./wheelhouse/*.whl
39 changes: 39 additions & 0 deletions scripts/azure/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM ubuntu:22.04

ARG GIT_HASH
ARG GIT_REMOTE

ENV PATH=/opt/bin:$PATH

RUN mkdir -p /opt/sbin

RUN echo "Building tuplex for commit ${GIT_HASH} / ${GIT_REMOTE}"

RUN echo "Install MongoDB"
ADD install_mongodb.sh /opt/sbin/install_mongodb.sh
RUN bash /opt/sbin/install_mongodb.sh

RUN echo "Install required packages"
ADD install_azure_ci_reqs.sh /opt/sbin/install_azure_ci_reqs.sh
RUN bash /opt/sbin/install_azure_ci_reqs.sh

RUN echo 'Install python dependencies'
RUN apt-get update -y && apt-get install -y python3 python3-pip python3-setuptools ninja-build && python3 -m pip install pytest pygments>=2.4.1 MarkupSafe==2.0 pexpect setuptools astor PyYAML jupyter nbformat pymongo eventlet==0.30.0 gunicorn pymongo && jupyter --version

RUN echo "Clone tuplex and checkout"
# Install git & add github to known hosts
RUN apt-get install -y git && mkdir -p /root/.ssh/ && touch /root/.ssh/known_hosts && ssh-keyscan github.com >>/root/.ssh/known_hosts
RUN mkdir -p /code && cd /code && git clone "${GIT_REMOTE}" tuplex && cd tuplex && git checkout "${GIT_HASH}"


RUN echo 'Test local MongoDB'
RUN cd /code/tuplex/python && python3 -m pip install -r requirements.txt && python3 mongodb_test.py && pkill mongod || true

RUN echo "Build Tuplex"
RUN cd /code/tuplex && TUPLEX_BUILD_ALL=1 CMAKE_ARGS="-DBUILD_WITH_ORC=ON -DLLVM_ROOT_DIR=/usr/lib/llvm-16 -DCMAKE_BUILD_TYPE=Release -DBUILD_FOR_CI=ON" python3 setup.py install --user

RUN echo "C++ tests"
RUN cd /code/tuplex && cd build/temp.linux-x86_64-3.10 && ctest --timeout 180 --output-on-failure --repeat until-pass:3 -j 2

RUN echo "Python tests"
RUN cd /code/tuplex && cd build/temp.linux-x86_64-3.10/dist/python && python3.10 -m pytest -x --full-trace -l --log-cli-level=DEBUG --capture=tee-sys
10 changes: 10 additions & 0 deletions scripts/azure/simulate_ci_locally.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

echo "Retrieving last commit has"
GIT_HASH=`git rev-parse --short HEAD`

GIT_REMOTE=`git remote -v | cut -f2 | head -n 1 | cut -f1 -d ' '`
GIT_REMOTE="https://github.com/$(git remote get-url origin | sed 's/https:\/\/github.com\///' | sed 's/git@github.com://')"
echo "Building docker image for hash ${GIT_HASH}, remote ${GIT_REMOTE}"
docker build --no-cache -t tuplex/azure --build-arg GIT_HASH=${GIT_HASH} --build-arg GIT_REMOTE=${GIT_REMOTE} .

7 changes: 5 additions & 2 deletions scripts/build_linux_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi
export CIBW_ENVIRONMENT="TUPLEX_LAMBDA_ZIP='./tuplex/other/tplxlam.zip' CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' LD_LIBRARY_PATH=/usr/local/lib:/opt/lib"

# Use the following line to build only python3.7-3.9 wheel
export CIBW_BUILD="cp3{7,8,9}-*"
export CIBW_BUILD="cp3{8,9,10,11}-*"
export CIBW_ARCHS_LINUX="x86_64"

# do not build musllinux yet
Expand All @@ -50,7 +50,10 @@ export CIBW_SKIP="*-musllinux_*"
#export CIBW_SKIP="cp3{5,6,7,8}-macosx* pp*"

export CIBW_BUILD_VERBOSITY=3
export CIBW_PROJECT_REQUIRES_PYTHON=">=3.7"
export CIBW_PROJECT_REQUIRES_PYTHON=">=3.8"

# uncomment to increase verbosity of cibuildwheel
# export CIBW_BUILD_VERBOSITY=3

cibuildwheel --platform linux .

Expand Down
65 changes: 65 additions & 0 deletions scripts/build_linux_wheels_with_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
# (c) 2023 Tuplex team
# this script invokes the cibuildwheel process with necessary env variables to build the wheel for linux/docker
# builds wheels for python 3.7 - 3.9

# check from where script is invoked
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"

echo "Executing buildwheel script located in $CWD"
pushd $CWD > /dev/null
cd ..

# delete dir if exists
rm -rf wheelhouse
# delete in tree build files
rm -rf tuplex/python/tuplex/libexec/tuplex*.so


# CIBUILDWHEEL CONFIGURATION
export CIBUILDWHEEL=1
export TUPLEX_BUILD_ALL=0
export CIBW_ARCHS_LINUX=x86_64
export CIBW_MANYLINUX_X86_64_IMAGE='registry-1.docker.io/tuplex/ci:latest'

# uncomment to prefer local image when building locally
# export CIBW_MANYLINUX_X86_64_IMAGE='tuplex/ci'

# check whether lambda zip was build and stored in build-lambda
TUPLEX_LAMBDA_ZIP=${TUPLEX_LAMBDA_ZIP:-build-lambda/tplxlam.zip}

echo "work dir is: $(pwd)"
if [[ -f "${TUPLEX_LAMBDA_ZIP}" ]]; then
echo "Found lambda runner ${TUPLEX_LAMBDA_ZIP}, adding to package"
mkdir -p tuplex/other
cp ${TUPLEX_LAMBDA_ZIP} tuplex/other/tplxlam.zip
fi

# add to environment, e.g. TUPLEX_BUILD_TYPE=tsan to force a tsan build. Release is the default mode
export CIBW_ENVIRONMENT="TUPLEX_LAMBDA_ZIP='./tuplex/other/tplxlam.zip' CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' LD_LIBRARY_PATH=/usr/local/lib:/opt/lib"

# Use the following line to build only python3.7-3.9 wheel
export CIBW_BUILD="cp3{8,9,10,11}-*"
export CIBW_ARCHS_LINUX="x86_64"

# do not build musllinux yet
export CIBW_SKIP="*-musllinux_*"

# to test the others from 3.7-3.9, use these two lines:
#export CIBW_BUILD="cp3{7,8,9}-*"
#export CIBW_SKIP="cp3{5,6,7,8}-macosx* pp*"

export CIBW_BUILD_VERBOSITY=3
export CIBW_PROJECT_REQUIRES_PYTHON=">=3.8"

# uncomment to increase verbosity of cibuildwheel
# export CIBW_BUILD_VERBOSITY=3

export CIBW_TEST_REQUIRES="pytest pytest-timeout numpy nbformat jupyter"
export CIBW_TEST_COMMAND="cd {project} && pytest tuplex/python/tests --timeout_method thread --timeout 300 -l -v"

cibuildwheel --platform linux .

popd > /dev/null

echo "Done!"
7 changes: 2 additions & 5 deletions scripts/build_macos_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ fi

echo "-- Building wheels for ${CIBW_BUILD}"

# if macOS is 10.x -> use this as minimum
MINIMUM_TARGET="10.13"

MACOS_VERSION=$(sw_vers -productVersion)
echo "-- Processing on MacOS ${MACOS_VERSION}"
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
Expand All @@ -82,13 +79,13 @@ cd ..

# Note: protobuf 3.20 - 3.21.2 is broken for MacOS, do not use those versions
export CIBW_BEFORE_BUILD_MACOS="brew install protobuf coreutils zstd zlib libmagic llvm@16 aws-sdk-cpp pcre2 antlr4-cpp-runtime googletest gflags yaml-cpp celero wget boost ninja snappy"
export CIBW_ENVIRONMENT_MACOS="MACOSX_DEPLOYMENT_TARGET=${MINIMUM_TARGET} CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' "
export CIBW_ENVIRONMENT_MACOS="MACOSX_DEPLOYMENT_TARGET=${MINIMUM_TARGET} CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON -DCMAKE_BUILD_TYPE=Release' CMAKE_BUILD_TYPE=Release"

export CIBW_BUILD="${CIBW_BUILD}"
export CIBW_PROJECT_REQUIRES_PYTHON=">=3.8"

# uncomment to increase verbosity of cibuildwheel
# export CIBW_BUILD_VERBOSITY=3
export CIBW_BUILD_VERBOSITY=3

cibuildwheel --platform macos

Expand Down
108 changes: 108 additions & 0 deletions scripts/build_macos_wheels_with_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#!/usr/bin/env bash
# (c) 2017-2023 Tuplex team
# builds x86_64 (and arm64) wheels

# add -x option for verbose output
set -euo pipefail

function fail {
printf '%s\n' "$1" >&2
exit "${2-1}"
}

function detect_instruction_set() {
arch="$(uname -m)" # -i is only linux, -m is linux and apple
if [[ "$arch" = x86_64* ]]; then
if [[ "$(uname -a)" = *ARM64* ]]; then
echo 'arm64'
else
echo 'x86_64'
fi
elif [[ "$arch" = i*86 ]]; then
echo 'x86_32'
elif [[ "$arch" = arm* ]]; then
echo $arch
elif test "$arch" = aarch64; then
echo 'arm64'
else
exit 1
fi
}

# check from where script is invoked
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
echo " || Tuplex macOS wheel builder || "
echo "-- Executing buildwheel script located in $CWD"

# check platform is darwin
if [ ! "$(uname -s)" = "Darwin" ]; then
fail "Error: Need to run script under macOS"
fi

# check which tags are supported
arch=$(detect_instruction_set)
echo "-- Detected arch ${arch}"

# try to extract version of compiler first via command-line tools or xcode
# either needs to be installed.
xcode_version_str=$(pkgutil --pkg-info=com.apple.pkg.CLTools_Executables 2>/dev/null | grep version || pkgutil --pkg-info=com.apple.pkg.Xcode | grep version)
echo "-- Detected Xcode ${xcode_version_str}"

# if no param is given, use defaults to build all
if [ "${arch}" = "arm64" ]; then
# build Python 3.9 - 3.11
CIBW_BUILD=${CIBW_BUILD-"cp3{9,10,11}-macosx_arm64"}
else
# build Python 3.8 - 3.11
CIBW_BUILD=${CIBW_BUILD-"cp3{8,9,10,11}-macosx_x86_64"}
fi

echo "-- Building wheels for ${CIBW_BUILD}"

MACOS_VERSION=$(sw_vers -productVersion)
echo "-- Processing on MacOS ${MACOS_VERSION}"
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }

MACOS_VERSION_MAJOR=`echo $MACOS_VERSION | cut -d . -f1`

if [ "$MACOS_VERSION_MAJOR" -ge 11 ]; then
echo "-- Newer MacOS detected (>=11.0), using more recent base target."
echo "-- Using minimum target ${MACOS_VERSION_MAJOR}.0"
MINIMUM_TARGET="${MACOS_VERSION_MAJOR}.0"
else
# keep as is
echo "-- Defaulting build to use as minimum target ${MINIMUM_TARGET}"
fi

pushd $CWD > /dev/null
cd ..

# fix because of Python
MINIMUM_TARGET=11.0

# Note: 3.8 only supports tags up to 10.16
MINIMUM_TARGET=10.13

# Note: protobuf 3.20 - 3.21.2 is broken for MacOS, do not use those versions
export CIBW_BEFORE_BUILD_MACOS="brew install protobuf coreutils zstd zlib libmagic llvm@16 aws-sdk-cpp pcre2 antlr4-cpp-runtime googletest gflags yaml-cpp celero wget boost ninja snappy libdwarf libelf"


# Note: orc build breaks wheel right now...
export CIBW_ENVIRONMENT_MACOS="MACOSX_DEPLOYMENT_TARGET=${MINIMUM_TARGET} CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' TUPLEX_BUILD_TYPE=RelWithDebInfo"
#export CIBW_ENVIRONMENT_MACOS="MACOSX_DEPLOYMENT_TARGET=${MINIMUM_TARGET} CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' TUPLEX_BUILD_TYPE=Debug"

export CIBW_BUILD="${CIBW_BUILD}"
export CIBW_PROJECT_REQUIRES_PYTHON=">=3.8"

# uncomment to increase verbosity of cibuildwheel
export CIBW_BUILD_VERBOSITY=3

# uncomment and set to specific identifier
#export CIBW_BUILD="cp39-macosx_x86_64"

export CIBW_TEST_REQUIRES="pytest pytest-timeout numpy nbformat jupyter"
export CIBW_TEST_COMMAND="cd {project} && pytest tuplex/python/tests --timeout_method thread --timeout 300 -l -v"

cibuildwheel --platform macos

popd
7 changes: 6 additions & 1 deletion scripts/macos/brew_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
# This script installs all required dependencies via brew
# for instructions on how to install brew, visit https://brew.sh/

brew install openjdk@11 cmake coreutils protobuf zstd zlib libmagic llvm@16 pcre2 gflags yaml-cpp celero wget boost googletest

# brew doesn't provide llvm@16 bottle anymore for big sur, but python3.8 only works with big sur tags. use llvm@15 instead
brew install openjdk@11 cmake coreutils protobuf zstd zlib libmagic llvm@15 pcre2 gflags yaml-cpp celero wget boost googletest libdwarf libelf

# link (when e.g. used from restoring cache)
brew link --overwrite cmake coreutils protobuf zstd zlib libmagic llvm@15 pcre2 gflags yaml-cpp celero wget boost googletest libdwarf libelf abseil
5 changes: 5 additions & 0 deletions scripts/macos/install_antlr4_cpp_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ PREFIX=/usr/local
# if antlr4 exists already, skip
[ -d "antlr4" ] && exit 0

if [ -d "${PREFIX}/include/antlr4-runtime" ]; then
echo "skip antlr4 runtime install, directory already exists"
exit 0
fi

# if macOS is 10.x -> use this as minimum
MINIMUM_TARGET="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"

Expand Down
6 changes: 6 additions & 0 deletions scripts/macos/install_aws-sdk-cpp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

# check if dir exists (i.e. restored from cache, then skip)
if [ -d "/usr/local/include/aws" ]; then
echo ">> Skip aws-sdk-cpp compile from source, already exists"
exit 0
fi

echo ">> installing AWS SDK from source"
CPU_CORES=$(sysctl -n hw.physicalcpu)

Expand Down
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,13 @@ def find_pkg_path(lines):
except:
logging.error('Could not detect macos version, defaulting to macos 10.13 as build target')

# special case: Python3.8 earlier, widely deployed versions only support suffxi 10_13 or up to 10.16 so use that as target
if sys.version_info.major == 3 and sys.version_info.minor == 8:
if macos_build_target != "10.13" or macos_build_target != "10.16":
logging.warning(f"Building Tuplex with Python {sys.version_info}, however earlier versions of Python 3.8 can only comprehend tag 10_13, using therefore deployment target 10.13")
macos_build_target = "10.13"

logging.info(f"Building with macOS platform tag {macos_build_target}")
# get mac OS version
cmake_args.append('-DCMAKE_OSX_DEPLOYMENT_TARGET={}'.format(macos_build_target))

Expand Down
Loading