-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (105 loc) · 3.34 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
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
118
119
name: Build wheels and test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
release:
types:
- published
jobs:
build-wheels:
name: Test ${{ matrix.build }}
runs-on: ${{ matrix.os }}
if: (github.repository == 'myokit/beta') && !github.event.pull_request.draft
strategy:
#fail-fast: false # Continue even if other wheels fail
matrix:
include:
- os: ubuntu-latest
build: cp311-manylinux_x86_64
manylinux: manylinux2014
- os: ubuntu-latest
build: cp310-manylinux_x86_64
manylinux: manylinux2014
- os: ubuntu-latest
build: cp39-manylinux_x86_64
manylinux: manylinux2014
- os: ubuntu-latest
build: cp38-manylinux_x86_64
manylinux: manylinux2014
- os: macos-latest
build: cp311-macosx_x86_64
- os: macos-latest
build: cp310-macosx_x86_64
- os: macos-latest
build: cp39-macosx_x86_64
- os: macos-latest
build: cp38-macosx_x86_64
- os: windows-latest
build: cp311-win_amd64
- os: windows-latest
build: cp310-win_amd64
- os: windows-latest
build: cp39-win_amd64
- os: windows-2019 # 3.8 needs windows-2019
build: cp38-win_amd64
steps:
- name: Check out
uses: actions/checkout@v3
- name: Remove windows binaries
if: (!startsWith(matrix.os, 'windows'))
run: "rm -rf myokit_beta/_bin/sundials-win-vs"
- name: Set up Python for cibuildwheel
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build wheels and test
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_BUILD_VERBOSITY: 1
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux }}
#CIBW_TEST_COMMAND: python {package}/tests_in_the_package
CIBW_TEST_COMMAND: python {project}/test.py
#CIBW_BEFORE_ALL_WINDOWS
CIBW_BEFORE_ALL_MACOS: sh .github/workflows/install-macos-dependencies.sh
CIBW_BEFORE_ALL_LINUX: sh .github/workflows/install-centos-dependencies.sh
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Check out
uses: actions/checkout@v3
- name: Build sdist
run: pipx run build . --sdist
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload-pypi:
name: Upload to TEST PyPI
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release'
environment:
name: pypi
url: https://test.pypi.org/p/myokit-beta
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_token }}
repository-url: https://test.pypi.org/legacy/