forked from RosettaCommons/binder
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 1.95 KB
/
wheels.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: Wheels
on:
pull_request:
branches:
- master
release:
types: [published]
concurrency:
group: wheels-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os:
- ubuntu-latest
- macos-13
- macos-14
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install LLVM and Clang
id: install-llvm
uses: KyleMayes/install-llvm-action@v2
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
- name: Install Ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt -y install cmake make gcc g++ python3 python3-dev pybind11-dev
- name: Install macOS dependencies
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
run: |
set -x
brew install wget coreutils xz pybind11 git
- name: Build wheels
uses: pypa/[email protected]
env:
LLVM_DIR: ${{ runner.temp }}/llvm
Clang_DIR: ${{ runner.temp }}/llvm
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
- name: Upload wheels to release
if: github.event_name == 'release'
run: |
gh release upload ${{ github.ref_name }} ./wheelhouse/*.whl --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package to PyPI
if: github.event_name == 'release'
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: wheelhouse