-
Notifications
You must be signed in to change notification settings - Fork 8
125 lines (108 loc) · 6.05 KB
/
build_wheels.yml
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Build Wheels
on:
workflow_dispatch:
pull_request:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
strategy:
matrix:
os: [ubuntu-20.04, macos-13, windows-latest]
cibw_archs: ["auto64"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
steps:
- uses: actions/checkout@v3
name: Check out
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1
name: Add MSVS Path
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delvewheel wheel
- name: Building wheels
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: "*musllinux*"
CIBW_BUILD_VERBOSITY: 3
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL_MACOS: brew install llvm@16 &&
bash ci-utils/install_prereq_linux.sh --build_arrow yes &&
mkdir -p /tmp/nyxus_bld &&
cp -r local_install /tmp/nyxus_bld
CIBW_BEFORE_ALL_LINUX: sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo &&
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo &&
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo &&
yum install -y llvm libevent-devel openssl-devel &&
bash ci-utils/install_arrow_yum.sh &&
bash ci-utils/install_prereq_linux.sh --build_arrow no &&
mkdir -p /tmp/nyxus_bld &&
cp -r local_install /tmp/nyxus_bld
CIBW_BEFORE_ALL_WINDOWS: ci-utils\install_prereq_win.bat &&
xcopy /E /I /y local_install C:\TEMP\nyxus_bld\local_install
CIBW_ENVIRONMENT_MACOS: REPAIR_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64" PATH="$(brew --prefix llvm@16)/bin:$PATH" COMPILER="/usr/local/opt/llvm@16/bin/clang++" CFLAGS="-I /usr/local/include -I/usr/local/opt/llvm@16/include" CXXFLAGS="-I /usr/local/include -I/usr/local/opt/llvm@16/include" LDFLAGS="-L /usr/local/lib -L/usr/local/opt/llvm@16/lib -Wl,-rpath,/usr/local/opt/llvm@16/lib" CXX="/usr/local/opt/llvm@16/bin/clang++" CC="/usr/local/opt/llvm@16/bin/clang" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64:$LD_LIBRARY_PATH" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_ENVIRONMENT_WINDOWS: PATH="C:\\TEMP\\nyxus_bld\\local_install\\bin;$PATH" NYXUS_DEP_DIR="C:\\TEMP\\nyxus_bld\\local_install"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio
CIBW_TEST_COMMAND: pytest -vv {project}/tests/python
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: nyxus-wheels
path: dist/*.whl
retention-days: 1
build_wheels_apple_arm64:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
strategy:
matrix:
os: [macos-13-xlarge]
cibw_archs: ["arm64"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
steps:
- uses: actions/checkout@v3
name: Check out
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delocate wheel
- name: Building wheels
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_BUILD_VERBOSITY: 3
CIBW_ARCHS_MACOS: arm64
CIBW_BEFORE_ALL_MACOS: brew install llvm@16 &&
sudo xcode-select -s /Applications/Xcode_14.2.app &&
bash ci-utils/install_prereq_linux.sh --build_arrow yes &&
mkdir -p /tmp/nyxus_bld &&
cp -r local_install /tmp/nyxus_bld
CIBW_ENVIRONMENT_MACOS: REPAIR_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64" PATH="/opt/homebrew/opt/llvm@16/bin:$PATH" COMPILER="/opt/homebrew/opt/llvm@16/bin/clang++" CFLAGS="-I/opt/homebrew/opt/llvm@16/include" CPPFLAGS="-I/opt/homebrew/opt/llvm@16/include" LDFLAGS="-L/opt/homebrew/opt/llvm@16/lib -L/opt/homebrew/opt/llvm@16/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm@16/lib/c++" CXX="/opt/homebrew/opt/llvm@16/bin/clang++" CC="/opt/homebrew/opt/llvm@16/bin/clang" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio
CIBW_TEST_COMMAND: pytest -vv {project}/tests/python
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: nyxus-wheels-apple-arm64
path: dist/*.whl
retention-days: 1