Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build MacOS arm64/x86 and Linux arm64 wheels #76

Merged
merged 180 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
ad1b54b
Try building arm64/aarch64 linux wheels
sjperkins Nov 4, 2023
212d7b7
Revert "Try building arm64/aarch64 linux wheels"
sjperkins Nov 4, 2023
ef0bd27
simplify
sjperkins Nov 4, 2023
0ac8949
Add arm64-linux*triplets
sjperkins Nov 5, 2023
7f16caf
Disable python-casacore install on macosx
sjperkins Nov 5, 2023
6bf5f04
Cirrus attempt one
sjperkins Nov 5, 2023
560e21a
Fix CIBW_BUILD
sjperkins Nov 5, 2023
7490b51
Fix main definition
sjperkins Nov 5, 2023
c80f589
Disable github api query
sjperkins Nov 5, 2023
45868ea
Disable source cache for now
sjperkins Nov 5, 2023
5b47c30
Fix CIBW_ENVIRONMENT_LINUX
sjperkins Nov 5, 2023
4ec4311
Simplify VCPKG_BINARY_SOURCES
sjperkins Nov 5, 2023
f0e5855
Try a .cirrus.yml
sjperkins Nov 5, 2023
02677b5
Disable CIRRUS_HTTP_CACHE_HOST again
sjperkins Nov 5, 2023
4856808
typo
sjperkins Nov 5, 2023
ee9b239
Remove alias
sjperkins Nov 5, 2023
a3ba582
Fix indent
sjperkins Nov 5, 2023
9293a2e
Revert "Fix indent"
sjperkins Nov 5, 2023
37d6b0e
Revert "Revert "Fix indent""
sjperkins Nov 5, 2023
2a627ff
Fix triplet in .cirrus.yml
sjperkins Nov 6, 2023
5735dfe
Change CPUs in wheel task to 1
sjperkins Jan 17, 2024
49d3f40
Try a basic task
sjperkins Jan 17, 2024
0ec5536
Use cibuildwheel example for cirrus ci
sjperkins Jan 17, 2024
8a77d99
Reduce ncpus to 2
sjperkins Jan 17, 2024
9273fd7
Try wheel building for linux amd64
sjperkins Jan 17, 2024
972012c
comment out macosx for now
sjperkins Jan 17, 2024
2a1a431
Uncomment macosx
sjperkins Jan 17, 2024
6c3174e
fix matrix section
sjperkins Jan 17, 2024
e6126af
arm64 need VPCKG_FORCE_SYSTEM_BINARIES=1
sjperkins Jan 17, 2024
e75b54e
Comment out macosx for now
sjperkins Jan 17, 2024
0100372
Comment out python 3.10 and 3.11 for now
sjperkins Jan 17, 2024
a606e86
VCPKG_FORCE_SYSTEM_BINARIES=1 in the correct place
sjperkins Jan 17, 2024
1016a57
Merge branch 'main' into amd64-linux-wheels
sjperkins Jan 17, 2024
a9a5fe8
Use the Cirrus CI http cache
sjperkins Jan 17, 2024
3e2fcaa
Increase cibuildwheel verbosity
sjperkins Jan 17, 2024
38e321f
Echo the binary sources variable
sjperkins Jan 17, 2024
69233a2
Add another env var
sjperkins Jan 17, 2024
d8fa8fb
Hardcode the http cache
sjperkins Jan 17, 2024
579195f
Escape possibly special characters
sjperkins Jan 17, 2024
76b42bc
Make VCPKG_BINARY_SOURCES a global env
sjperkins Jan 17, 2024
591833e
Hard code address again
sjperkins Jan 17, 2024
e5f2ccf
Guard VCPKG_BINARY_SOURCES with quotes
sjperkins Jan 17, 2024
bcde2c6
Try CIRRUS_HTTP_CACHE_HOST again
sjperkins Jan 17, 2024
7f0dc25
Print some env vars
sjperkins Jan 17, 2024
c26a2be
Try 127.0.0.1
sjperkins Jan 17, 2024
cabc590
Run cibuildwheel docker contain in host mode
sjperkins Jan 17, 2024
6f4c1d8
Configure docker network host mode through CIBW_CONTAINER_ENGINE
sjperkins Jan 17, 2024
1cab296
Fix libarrow.so version
sjperkins Jan 17, 2024
245150d
rearrangements
sjperkins Jan 17, 2024
03e28ea
only build manylinux
sjperkins Jan 17, 2024
518d532
Build for other python version
sjperkins Jan 17, 2024
92e5e6c
Try parametrize the task name
sjperkins Jan 17, 2024
1c433d8
Remove old .cirrus/ci.yml file
sjperkins Jan 17, 2024
68c870b
Move base environment variables out
sjperkins Jan 17, 2024
f7253bd
rearrange
sjperkins Jan 17, 2024
9b3c57e
macosx updates
sjperkins Jan 17, 2024
3c7b072
fix name
sjperkins Jan 17, 2024
63a06f8
Disable VCPKG_FORCE_SYSTEM_BINARIES for macosx
sjperkins Jan 17, 2024
3619f35
brew install cmake
sjperkins Jan 17, 2024
76635be
Install cmake 3.28.1
sjperkins Jan 17, 2024
11c58c8
Set cmake version in pyproject.toml
sjperkins Jan 17, 2024
450ab66
fix cmake.minimum-version
sjperkins Jan 17, 2024
c6fb1d0
fix again
sjperkins Jan 17, 2024
65fef3a
fix osx triplet
sjperkins Jan 17, 2024
347cbef
In which environment variables are placed in the environment variable…
sjperkins Jan 17, 2024
14fb59e
Fix mac image version
sjperkins Jan 17, 2024
3de6dcb
fix osx triplets
sjperkins Jan 17, 2024
6cbc3e3
LD_LIBRARY_PATH -> DYLD_FALLBACK_LIBRARY_PATH on mac
sjperkins Jan 17, 2024
cb1cb1e
Add a wcslib overlay port
sjperkins Jan 17, 2024
f1c4027
library linkage back to dynamic
sjperkins Jan 17, 2024
4b7b5d3
Update vcpkg manifest
sjperkins Jan 18, 2024
51e4901
Install latest clang with brew, rather than micromamba, which seems t…
sjperkins Jan 18, 2024
a46a00c
Install cibuildwheel
sjperkins Jan 18, 2024
46e71ce
Install python, clang and llc
sjperkins Jan 18, 2024
c348ef6
clang is included in llvm
sjperkins Jan 18, 2024
914413f
llc included in llvm
sjperkins Jan 18, 2024
7c50830
Install pip using python
sjperkins Jan 18, 2024
db53f79
python3
sjperkins Jan 18, 2024
1515b77
fix
sjperkins Jan 18, 2024
af07f54
core unnecessary in features. default-features = false
sjperkins Jan 18, 2024
03de199
Use delocate-wheel command for macosx
sjperkins Jan 18, 2024
7ee5b5d
Fix CIBW_ENVIRONMENT_MACOSX -> CIBW_ENVIRONMENT_MACOS
sjperkins Jan 18, 2024
83312dd
Install cibuildwheel main branch
sjperkins Jan 18, 2024
4953c52
Correct the excluded dylib
sjperkins Jan 18, 2024
a5c3e71
Add a DYLD_LIBRARY_PATH export
sjperkins Jan 18, 2024
e40cfb6
Set DYLD_LIBRARY_PATH immediately prior to delocate-wheel
sjperkins Jan 18, 2024
7e74024
Set up env vars correctly
sjperkins Jan 18, 2024
2df80c6
Fix env var name
sjperkins Jan 18, 2024
487b248
Add delocate-listdesp step
sjperkins Jan 18, 2024
256c702
Change macosx deployment target to 11.0
sjperkins Jan 18, 2024
2a839c8
Set rpath to @loader_path on macos
sjperkins Jan 18, 2024
a9fba0a
Print contents of lib directory
sjperkins Jan 22, 2024
c4b624d
Use @rpath
sjperkins Jan 22, 2024
049eb78
Revert "Print contents of lib directory"
sjperkins Jan 22, 2024
2e9b6fe
Set some Apple Compiler related cmake policies
sjperkins Jan 22, 2024
f32d8d3
APPLE is a variety of UNIX
sjperkins Jan 22, 2024
d58d67d
@loader_path -> @rpath again
sjperkins Jan 22, 2024
851a47f
Revert "@loader_path -> @rpath again"
sjperkins Jan 22, 2024
6a7a30b
Set CMAKE_INSTALL_NAME_DIR to @rpath on macos
sjperkins Jan 22, 2024
0642cf2
Relative @loader_path/
sjperkins Jan 22, 2024
3409b17
Upgrade cibuildwheel to 2.16.5
sjperkins Feb 18, 2024
26e0dc3
Remove python3.8, enable python 3.12
sjperkins Feb 18, 2024
a732604
Include pyarrow library dirs in REPAIR_LIBRARY_PATH
sjperkins Feb 18, 2024
38f80ce
Install pyarrow for delocate-wheel
sjperkins Feb 18, 2024
7c217a4
Spacing
sjperkins Feb 18, 2024
cd3da41
Upgrade to pyarrow 15.0.0
sjperkins Feb 18, 2024
510e823
spacing
sjperkins Feb 18, 2024
735f0a9
Install pyarrow==15.0.0 prior to delocate-wheel
sjperkins Feb 18, 2024
9fda572
Try set the path one last time
sjperkins Feb 18, 2024
e0fd453
Try --ignore-missing-dependencies
sjperkins Feb 18, 2024
54e49a8
python-casacore doesn't have 3.12 wheels yet
sjperkins Feb 18, 2024
6677103
universal2 macos triplet
sjperkins Feb 19, 2024
21d97a5
Rework github actions
sjperkins Feb 19, 2024
cb91b9c
Set triplet for C++ tests
sjperkins Feb 19, 2024
bbdaa72
More specific manylinux
sjperkins Feb 19, 2024
6ba6025
Create a common build environment env var
sjperkins Feb 19, 2024
2bb3ebf
Try a github action macos runner
sjperkins Feb 19, 2024
c605c2d
Use Python 3.10 for host python
sjperkins Feb 19, 2024
a544a4d
Install python and llvm in MACOS runner
sjperkins Feb 19, 2024
c23c2f8
Use Python 3.10 for host python
sjperkins Feb 19, 2024
ad93a6a
Fix ubuntu OS version
sjperkins Feb 19, 2024
1358d95
Set up LLVM environment variables
sjperkins Feb 19, 2024
38705e7
Setup macos paths in CIBW_BEFORE_BUILD_MACOS
sjperkins Feb 19, 2024
b68c990
Set env vars in CIBW_ENVIRONMENT_MACOS
sjperkins Feb 19, 2024
df39268
tmate
sjperkins Feb 19, 2024
b5ee5b2
Try install gfortran with brew
sjperkins Feb 19, 2024
c527003
brew reinstall
sjperkins Feb 19, 2024
915abb8
Split macosx builds
sjperkins Feb 19, 2024
09358ca
Constrain python versions
sjperkins Feb 19, 2024
b3be657
Add CIBW_ARCHS
sjperkins Feb 19, 2024
915c596
Disable x86_64 macos for now
sjperkins Feb 19, 2024
bdcb728
macos-13 seems to be the intel runner
sjperkins Feb 19, 2024
a98c460
Force brew reinstalls
sjperkins Feb 19, 2024
2895642
Try remove python first, then install with --overwrite
sjperkins Feb 19, 2024
c69d7df
Correct cirrus amd64 linux auditwheel command
sjperkins Feb 19, 2024
a90721b
brew install python llvm; brew reinstall gcc
sjperkins Feb 19, 2024
9291e10
Rearrange macos path setting
sjperkins Feb 19, 2024
cb12d89
Upgrade to actions/setup-python@v5
sjperkins Feb 19, 2024
689ac5a
Upgrade to actions/upload-artifact@v4
sjperkins Feb 19, 2024
1ce10e8
upload-artifact@v4 migration
sjperkins Feb 19, 2024
1c1adff
Upgrade to actions/download-artifact@v4
sjperkins Feb 19, 2024
bfe9144
fixes
sjperkins Feb 19, 2024
3626b1b
Add further dinstinctiveness to upload artifact names
sjperkins Feb 19, 2024
a451cc3
formatting
sjperkins Feb 19, 2024
59d21d1
fix indent
sjperkins Feb 19, 2024
83a4fd6
More indent niceties
sjperkins Feb 19, 2024
e08234e
Revert "More indent niceties"
sjperkins Feb 19, 2024
7b4693e
Remove wcslib overlay port
sjperkins Feb 19, 2024
f735217
Rename ci.yml to wheels.yml
sjperkins Feb 20, 2024
25a0add
Continuous Integration -> wheels
sjperkins Feb 20, 2024
dfad29f
Split jobs into wheel builds and uploads
sjperkins Feb 20, 2024
556ff02
Fix indent
sjperkins Feb 20, 2024
ac52f37
fix types
sjperkins Feb 20, 2024
6ca6f72
Remove cirrus macos arm64 task
sjperkins Feb 20, 2024
f2442e7
Remove quotes from workflow name
sjperkins Feb 20, 2024
52a4bf6
Rename upload to deploy
sjperkins Feb 20, 2024
ed54c07
Disable cirrus ci temporarily
sjperkins Feb 20, 2024
9c7b092
Revert "Disable cirrus ci temporarily"
sjperkins Feb 20, 2024
4a8ac34
Revert "Rename upload to deploy"
sjperkins Feb 20, 2024
dbfe786
Revert "Remove quotes from workflow name"
sjperkins Feb 20, 2024
b5fe722
Revert "fix types"
sjperkins Feb 20, 2024
abfb802
Revert "Fix indent"
sjperkins Feb 20, 2024
fe2e281
Revert "Split jobs into wheel builds and uploads"
sjperkins Feb 20, 2024
3211baa
Revert "Continuous Integration -> wheels"
sjperkins Feb 20, 2024
33b5a54
Revert "Rename ci.yml to wheels.yml"
sjperkins Feb 20, 2024
8453858
[skip ci] Update HISTORY.rst
sjperkins Feb 21, 2024
972566b
Build full range of cpython versions
sjperkins Feb 21, 2024
fb884ee
catch ImportErrors produced in multiprocessing.Pool and skip
sjperkins Feb 22, 2024
580c135
Remove tablelocking
sjperkins Feb 22, 2024
6559b74
[skip ci] Update HISTORY.rst
sjperkins Feb 22, 2024
bed2b0e
Only build all wheels in master
sjperkins Feb 22, 2024
d042ae8
Fix cpython versions
sjperkins Feb 22, 2024
43f5a03
Quotes, maybe
sjperkins Feb 22, 2024
804e3ea
Rearrange
sjperkins Feb 22, 2024
1d98c55
Always include cp312
sjperkins Feb 22, 2024
42e4b43
Remove cp311 from exclude
sjperkins Feb 22, 2024
7085e19
is_main should be a list
sjperkins Feb 22, 2024
9e41594
Revert "Remove cp311 from exclude"
sjperkins Feb 22, 2024
8be95f1
is_main list
sjperkins Feb 22, 2024
b39f0d4
[skip ci] rearrange
sjperkins Feb 22, 2024
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
62 changes: 62 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.16.5
run_cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
path: "wheelhouse/*"

env:
VCPKG_INSTALLED_DIR: /tmp/vcpkg_installed
CIBW_BUILD_FRONTEND: build
CIBW_BEFORE_ALL_LINUX: yum install -y zip flex bison gcc-gfortran
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
auditwheel repair -w {dest_dir} {wheel}
--exclude libarrow_python.so
--exclude libarrow.so.1500
# There's no python-casacore wheel for amd64-linux or macosx
# CIBW_TEST_EXTRAS: test
# CIBW_TEST_COMMAND: py.test -s -vvv --pyargs arcae

linux_aarch64_task:
name: Build linux amd64 ${PYTHON_VERSION_NAME} manylinux_2_28 wheel
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder-arm64
architecture: arm64
platform: linux
cpu: 2
memory: 4G

install_pre_requirements_script:
- apt install -y python3-venv python-is-python3
<<: *BUILD_AND_STORE_WHEELS

matrix:
- env:
PYTHON_VERSION_NAME: python 3.9
CIBW_BUILD: cp39-manylinux*
only_if: $CIRRUS_BRANCH == 'main'
- env:
PYTHON_VERSION_NAME: python 3.10
CIBW_BUILD: cp310-manylinux*
only_if: $CIRRUS_BRANCH == 'main'
- env:
PYTHON_VERSION_NAME: python 3.11
CIBW_BUILD: cp311-manylinux*
only_if: $CIRRUS_BRANCH == 'main'
- env:
PYTHON_VERSION_NAME: python 3.12
CIBW_BUILD: cp312-manylinux*
env:
# Run the container in host mode so that vcpkg has access to the Cirrus CI cache
CIBW_CONTAINER_ENGINE: "docker; create_args: --network=host"
VCPKG_TARGET_TRIPLET: arm64-linux-dynamic-cxx17-abi1-rel
CIBW_ENVIRONMENT_LINUX: >
CMAKE_ARGS=-DBUILD_TESTING=OFF
VCPKG_BINARY_SOURCES="clear;http,http://127.0.0.1:12321/{name}/{version}/{sha},readwrite"
VCPKG_INSTALLED_DIR=$VCPKG_INSTALLED_DIR
VCPKG_FORCE_SYSTEM_BINARIES=1
VCPKG_TARGET_TRIPLET=$VCPKG_TARGET_TRIPLET
LD_LIBRARY_PATH=$VCPKG_INSTALLED_DIR/$VCPKG_TARGET_TRIPLET/lib
166 changes: 105 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,32 @@ on:
- cron: '30 2 * * 1,4' # Every Monday and Thursday @ 2h30am UTC

env:
CIBW_BUILD_FRONTEND: build
CIBW_BEFORE_ALL_LINUX: yum install -y zip flex bison gcc-gfortran
# Need to reinstall gcc in order to get gfortran
CIBW_BEFORE_ALL_MACOS: |
brew install python llvm
brew reinstall gcc
CIBW_BEFORE_BUILD_MACOS: |
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
CIBW_TEST_EXTRAS: applications,test
HOST_PYTHON_VERSION: "3.10"
VCPKG_INSTALLED_DIR: /tmp/vcpkg_installed
ARTIFACT_NAME: distribution
ARTIFACT_NAME: wheel

jobs:
build-sdist:
name: Build Source Distribution
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
python: ["3.8"]
steps:
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
- name: Set up Python ${{ env.HOST_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
python-version: ${{ env.HOST_PYTHON_VERSION }}

- name: Upgrade pip and install build
run: python -m pip install -U pip build
Expand All @@ -38,9 +48,9 @@ jobs:
run: python -m build --sdist

- name: Upload wheel artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}-source
path: ./dist/*.tar.gz

cpp-tests:
Expand All @@ -49,18 +59,21 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
triplet:
- x64-linux-dynamic-cxx17-abi1-rel

env:
VCPKG_TARGET_TRIPLET: "x64-linux-dynamic-cxx17-abi1-rel"

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
- name: Set up Python ${{ env.HOST_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
python-version: ${{ env.HOST_PYTHON_VERSION }}

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3

- name: List directory structure
run: tree
Expand All @@ -72,17 +85,10 @@ jobs:
python -m pip install -U pip
python -m pip install pyarrow

- name: Get Github Action Cache Variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: Build C++ libraries and tests
env:
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
VCPKG_TARGET_TRIPLET: ${{ matrix.triplet }}
VCPKG_TARGET_TRIPLET: ${{ env.VCPKG_TARGET_TRIPLET }}
run: |
cmake -S . -B build
cmake --build build
Expand All @@ -99,67 +105,103 @@ jobs:

build-wheels:
name: Build and Test Binary Wheels
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "macos-13", "macos-14"]
# https://peps.python.org/pep-0425
python:
# python version, cpython tag
- ["3.8", "cp38"]
- ["3.9", "cp39"]
- ["3.10", "cp310"]
- ["3.11", "cp311"]
platform:
# platform tag, manylinux tag, vcpkg triplet
- [manylinux_x86_64, manylinux_2_28, x64-linux-dynamic-cxx17-abi1-rel]

cpython: ["cp39", "cp310", "cp311", "cp312"]
is_main:
- ${{ contains(github.ref, 'main') }}
# Avoid building all wheels in a PR
exclude:
- is_main: false
cpython: cp39
- is_main: false
cpython: cp310
- is_main: false
cpython: cp311
include:
- os: ubuntu-22.04
os_short: linux
arch: "x86_64"
triplet: "x64-linux-dynamic-cxx17-abi1-rel"
extra_build: "manylinux_x86_64"
- os: macos-13
os_short: macos
arch: "x86_64"
triplet: "x64-osx-dynamic-cxx17-abi1-rel"
extra_build: "macosx_x86_64"
- os: macos-14
os_short: macos
arch: "arm64"
triplet: "arm64-osx-dynamic-cxx17-abi1-rel"
extra_build: "macosx_arm64"
- cpython: cp312
steps:
- name: Set up Python ${{ matrix.python[0] }}
uses: actions/setup-python@v4
- name: Set up Python ${{ env.HOST_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python[0] }}
python-version: ${{ env.HOST_PYTHON_VERSION }}

- name: Upgrade pip and install virtualenv
run: python -m pip install -U pip virtualenv

- name: Checkout source
uses: actions/checkout@v4

- name: Get Github Action Cache Variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3

- name: Run cibuildwheel
uses: pypa/cibuildwheel@v2.13.1
- name: Set Common Build Environment Variable
env:
CIBW_BUILD: ${{ matrix.python[1] }}-${{ matrix.platform[0] }}
CIBW_BUILD_FRONTEND: build
CIBW_BEFORE_ALL_LINUX: yum install -y zip flex bison gcc-gfortran
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/${{ matrix.platform[1] }}_x86_64
CIBW_ENVIRONMENT_LINUX: >
COMMON_ENV: >
CMAKE_ARGS=-DBUILD_TESTING=OFF
ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
VCPKG_BINARY_SOURCES="clear;x-gha,readwrite"
VCPKG_TARGET_TRIPLET=${{ matrix.platform[2] }}
VCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
VCPKG_INSTALLED_DIR=${{ env.VCPKG_INSTALLED_DIR }}
LD_LIBRARY_PATH=${{ env.VCPKG_INSTALLED_DIR }}/${{ matrix.platform[2] }}/lib
LD_LIBRARY_PATH=${{ env.VCPKG_INSTALLED_DIR }}/${{ matrix.triplet }}/lib
run: echo "CIBW_ENVIRONMENT_COMMON=$COMMON_ENV" >> $GITHUB_ENV

- name: Run cibuildwheel
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_BUILD: ${{ matrix.cpython }}-${{ matrix.extra_build }}*
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_ENVIRONMENT_LINUX: ${{ env.CIBW_ENVIRONMENT_COMMON }}
CIBW_ENVIRONMENT_MACOS: >
${{ env.CIBW_ENVIRONMENT_COMMON }}
MACOSX_DEPLOYMENT_TARGET=11.0
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
auditwheel repair -w {dest_dir} {wheel} --exclude libarrow_python.so --exclude libarrow.so.1400
CIBW_TEST_EXTRAS: applications,test
CIBW_TEST_COMMAND: py.test -s -vvv --pyargs arcae
auditwheel repair
-w {dest_dir} {wheel}
--exclude libarrow_python.so
--exclude libarrow.so.1500
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH delocate-listdeps {wheel}
DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH delocate-wheel \
--require-archs {delocate_archs} \
-w {dest_dir} \
-v {wheel} \
--exclude libarrow_python.dylib \
--exclude libarrow.1500.dylib \
--ignore-missing-dependencies
CIBW_TEST_COMMAND_LINUX: py.test -s -vvv --pyargs arcae

- name: Upload wheel artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}-${{ matrix.os_short }}-${{ matrix.cpython }}-${{ matrix.arch }}
path: ./wheelhouse/*.whl

# - name: Debug with tmate on failure
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3

upload-to-test-pypi:
name: Upload release to Test PyPI
needs: [build-sdist, build-wheels]
Expand All @@ -170,9 +212,10 @@ jobs:
id-token: write
steps:
- name: Download distribution artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
path: dist

- name: List artifacts
Expand All @@ -196,9 +239,10 @@ jobs:
id-token: write
steps:
- name: Download distribution artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
path: dist

- name: List artifacts
Expand Down
23 changes: 21 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
cmake_minimum_required(VERSION 3.25)

# Compiler id for Apple Clang is now AppleClang
cmake_policy(SET CMP0025 NEW)

# Enable MACOS_RPATH
# https://cmake.org/cmake/help/latest/policy/CMP0042.html
cmake_policy(SET CMP0042 NEW)

cmake_host_system_information(RESULT ncores QUERY NUMBER_OF_PHYSICAL_CORES)
enable_testing()

Expand All @@ -7,8 +15,19 @@ set(CMAKE_CXX_STANDARD_REQUIRED On)
set(CMAKE_CXX_EXTENSIONS Off)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules)

set(CMAKE_INSTALL_RPATH "$ORIGIN")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if(UNIX)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path/")
set(CMAKE_INSTALL_NAME_DIR "@rpath")
else()
set(CMAKE_INSTALL_RPATH "$ORIGIN")
endif()
elseif(WIN32)
message(FATAL_ERROR "Windows is not supported")
endif()

message(STATUS "CMAKE_INSTALL_RPATH=$CMAKE_INSTALL_RPATH")

set(CMAKE_JOB_POOL_COMPILE "compile")
set(CMAKE_JOB_POOL_LINK "link")
Expand Down
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ History

X.Y.Z (YYYY-MM-DD)
------------------
* Upgrade to pyarrow 15.0.0 (:pr:`76`)
* Build linux arm64 and macos arm64/x86_64 wheels (:pr:`76`)
* Upgrade vcpkg version to include wcslib 8.2.1 (:pr:`82`)
* Export compile_commands.json by default (:pr:`81`)
* Make export application dependencies optional (:pr:`80`)
Expand Down
Loading