-
Notifications
You must be signed in to change notification settings - Fork 81
94 lines (82 loc) · 2.38 KB
/
build_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
name: cibuildwheel
permissions: write-all
on:
push:
branches: [latest]
tags: v*
pull_request:
schedule:
- cron: "0 0 * * *" # daily
jobs:
build_wheels:
name: Build wheels for ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [
linux-x86_64,
macos-x86_64,
macos-arm64,
]
include:
- build: linux-x86_64
os: ubuntu-20.04
arch: x86_64
macos_target: ''
- build: macos-x86_64
os: macos-latest
arch: x86_64
macos_target: 'MACOSX_DEPLOYMENT_TARGET=11.0 CARGO_BUILD_TARGET=x86_64-apple-darwin'
- build: macos-arm64
os: macos-latest
arch: arm64
macos_target: 'MACOSX_DEPLOYMENT_TARGET=11.0 CARGO_BUILD_TARGET=aarch64-apple-darwin'
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.10'
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ENVIRONMENT_MACOS: ${{ matrix.macos_target }}
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.build }}-${{ matrix.os }}
path: './wheelhouse/sourmash*.whl'
build_wasm:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_PLATFORM: pyodide
CIBW_BUILD: 'cp312-pyodide_wasm32'
- uses: actions/upload-artifact@v4
with:
name: wheel-wasm
path: './wheelhouse/sourmash*.whl'
release:
name: Publish wheels
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/v')
needs: [build_wheels, build_wasm]
steps:
- name: Fetch wheels from artifacts
id: fetch_artifacts
uses: actions/download-artifact@v4
with:
path: 'wheels/'
# if it matches a Python release tag, upload to github releases
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
${{steps.fetch_artifacts.outputs.download-path}}/wheel-*/*