-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (69 loc) · 1.96 KB
/
pypi-build-test.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
name: CI/CD 📝
on:
schedule:
- cron: "55 4 * * *"
push:
branches: [ main ]
paths:
- 'src/**'
- 'test/**'
- setup.py
- setup.cfg
- pyproject.toml
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build_wheels:
name: Wheel cp${{ matrix.python }}-${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: [38, 39, 310, 311]
arch: [x86, arm]
include:
- os: ubuntu-latest
arch: x86
platform_id: manylinux_x86_64
cibw_arch: auto
# - os: ubuntu-latest
# arch: arm
# platform_id: manylinux_aarch64
# cibw_arch: aarch64
- os: macos-latest
arch: x86
platform_id: macosx_x86_64
cibw_arch: x86_64
- os: macos-latest
arch: arm
platform_id: macosx_arm64
cibw_arch: arm64
exclude:
- os: ubuntu-latest
arch: arm
steps:
- uses: actions/checkout@v3
- name: Get history and tags for SCM versioning
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up QEMU for ARM on Linux
if: matrix.arch == 'arm' && matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }}
CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }}
CIBW_TEST_SKIP: "*_aarch64, *macosx*, *_arm64, *_universal2:arm64"
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: nuspacesim-gh-pypi-artifact
path: wheelhouse/*.whl
retention-days: 1