forked from vaexio/vaex
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (94 loc) · 3.37 KB
/
wheel.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
name: Build binary wheel
on:
push:
tags:
- core-*
release:
types: [released, prereleased]
workflow_dispatch: # allows running workflow manually from the Actions tab
jobs:
build_wheels_matrix:
runs-on: ubuntu-latest
outputs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: pip install cibuildwheel~=2.16
- id: set-matrix
run: |
MATRIX_INCLUDE=$(
{
cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-20.04"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macOS-11"}' \
&& cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}'
} | jq -sc
)
echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
working-directory: packages/vaex-core/
build_wheels:
needs: build_wheels_matrix
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.only }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.build_wheels_matrix.outputs.include) }}
permissions:
contents: write # for uploading release assets
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Copy dll
if: matrix.os == 'windows-latest'
uses: ./ci/actions/windll
- name: chores
if: matrix.os != 'windows-latest'
run: |
mkdir packages/vaex-core/bin
cp bin/install_pcre.sh packages/vaex-core/bin/
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
- uses: pypa/[email protected]
with:
only: ${{ matrix.only }}
package-dir: packages/vaex-core/
output-dir: packages/vaex-core/dist/
env:
CIBW_BEFORE_BUILD: ${{ ( matrix.os != 'windows-latest' && 'bin/install_pcre.sh' ) || '' }}
CIBW_BUILD_VERBOSITY: 2
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'"
CIBW_ENVIRONMENT_MACOS: "CFLAGS='-I/usr/local/include -L/usr/local/lib' CXXFLAGS='-I/usr/local/include -L/usr/local/lib' LDFLAGS='-L/usr/local/lib'"
- name: Upload release assets
if: github.event_name == 'release'
uses: softprops/[email protected]
with:
files: packages/vaex-core/dist/*
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Make source distribution
run: python setup.py sdist
working-directory: packages/vaex-core/
- uses: actions/upload-artifact@v3
with:
name: distributions
path: packages/vaex-core/dist
- name: Publish a Python distribution to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }}
run: |
pip install twine wheel
openssl sha256 dist/*
twine upload --skip-existing
working-directory: packages/vaex-core/