-
Notifications
You must be signed in to change notification settings - Fork 15
117 lines (96 loc) · 3.23 KB
/
nmodl-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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build wheels
concurrency:
group: ${{ github.workflow }}#${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "5 0 * * *"
workflow_dispatch:
jobs:
build_wheels_nonlinux:
name: Build wheels on ${{ matrix.os }}
timeout-minutes: 45
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-13, macOS-14]
steps:
- name: Setup Flex and Bison
if: runner.os == 'Windows'
run: |
choco install winflexbison3 -y
- name: Setup Flex and Bison
if: runner.os == 'macOS'
run: |
brew install flex bison
- name: Checkout code
uses: actions/checkout@v4
with:
fetch: 0
# Used to host cibuildwheel
- name: Set up Python
uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.5
- name: Build all wheels
run: |
export SETUPTOOLS_SCM_PRETEND_VERSION="$(git describe --tags | cut -d '-' -f 1,2 | tr - .)"
python -m cibuildwheel --output-dir wheelhouse
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_wheels_manylinux:
name: Build manylinux wheels
timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch: 0
# Used to host cibuildwheel
- name: Set up Python
uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.5
- name: Build wheels
run: |
export SETUPTOOLS_SCM_PRETEND_VERSION="$(git describe --tags | cut -d '-' -f 1,2 | tr - .)"
CIBW_ENVIRONMENT_PASS_LINUX='SETUPTOOLS_SCM_PRETEND_VERSION' python -m cibuildwheel --output-dir wheelhouse
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-manylinux
path: ./wheelhouse/*.whl
# testing of wheels cannot be done in a manylinux image due to the lack of
# the Python library; as a workaround, we test each wheel in a separate
# version
test_wheels_manylinux:
name: Test manylinux wheel on Python ${{ matrix.python_version }}
runs-on: ubuntu-latest
needs: build_wheels_manylinux
timeout-minutes: 45
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Make manylinux wheels available
uses: actions/download-artifact@v4
with:
name: cibw-wheels-manylinux
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python_version }}
- name: Test manylinux Wheel with Python ${{ matrix.python_version }}
run: |
dotless_version="$(echo "${{ matrix.python_version }}" | tr -d '.')"
find ${{ github.workspace }} -name "*cp${dotless_version}-manylinux*.whl" -exec bash packaging/test_wheel.bash python${{ matrix.python_version }} {} \;