-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (52 loc) · 1.9 KB
/
build-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
name: Build
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
inputs:
version:
description: 'The version of COFFE to release'
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup all external dependencies
if: runner.os == 'macOS'
run: |
brew install automake
# Used to host cibuildwheel
- uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.5 conan
# if we're not doing a release version (manual!), only build one python version
- name: Setup versions
if: ${{ ! (github.event_name == 'workflow_dispatch' && github.event.inputs.version) }}
run: |
echo "CIBW_BUILD=cp311-*" >> "$GITHUB_ENV"
# pretend version so setuptools doesn't fail
echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.1.0" >> "$GITHUB_ENV"
- name: SCM
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version
run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.input.version }}" >> "$GITHUB_ENV"
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
# we skip tests in CI to save time
CIBW_TEST_COMMAND: 'true'
CIBW_ENVIRONMENT_PASS_LINUX: 'SETUPTOOLS_SCM_PRETEND_VERSION'
CUBA_INSTALL_DIR: ${{ github.workspace }}/cuba_install
CLASS_INSTALL_DIR: ${{ github.workspace }}/class_install
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl