-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (58 loc) · 1.83 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust-target: ['i686-pc-windows-msvc', 'x86_64-pc-windows-msvc', 'x86_64-apple-darwin', 'x86_64-unknown-linux-gnu']
include:
- rust-target: 'i686-pc-windows-msvc'
os: windows-latest
python-arch: x86
- rust-target: 'x86_64-pc-windows-msvc'
os: windows-latest
python-arch: x64
- rust-target: 'x86_64-unknown-linux-gnu'
os: ubuntu-latest
python-arch: x64
- rust-target: 'x86_64-apple-darwin'
os: macos-latest
python-arch: x64
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.rust-target }}
- uses: actions/setup-python@v2
with:
python-version: '3.6'
architecture: ${{ matrix.python-arch }}
- uses: actions/setup-python@v2
with:
python-version: '3.7'
architecture: ${{ matrix.python-arch }}
- uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: ${{ matrix.python-arch }}
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: ${{ matrix.python-arch }}
- name: Install maturin
run: |
python -m pip install --upgrade pip
pip install maturin==0.10
- name: Build package
run: |
maturin build --release --strip --target ${{ matrix.rust-target }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: lib-${{ matrix.rust-target }}
path: |
target/wheels