-
Notifications
You must be signed in to change notification settings - Fork 91
108 lines (88 loc) · 2.37 KB
/
build_library.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
name: Library Release Build
on:
push:
branches:
- release-library/**
env:
CARGO_TERM_COLOR: always
jobs:
linux:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
build-arch:
- i686
- x86_64
- aarch64
name: Python Linux ${{ matrix.build-arch }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- if: matrix.build-arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Build in Docker
run: scripts/docker-manylinux.sh
env:
TARGET: ${{ matrix.build-arch }}
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: py/dist/*
macos:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-apple-darwin
py-platform: macosx-10_15_x86_64
- target: aarch64-apple-darwin
py-platform: macosx-11_0_arm64
name: Python macOS ${{ matrix.py-platform }}
runs-on: macos-11
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust Toolchain
run: |
rustup set profile minimal
rustup toolchain install stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build Wheel
run: |
pip install wheel
python setup.py bdist_wheel -p ${{ matrix.py-platform }}
working-directory: py
env:
# consumed by cargo and setup.py to obtain the target dir
CARGO_BUILD_TARGET: ${{ matrix.target }}
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: py/dist/*
sdist:
name: Python sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build sdist
run: python setup.py sdist --format=zip
working-directory: py
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: py/dist/*