15
15
runs-on : ${{ matrix.os }}
16
16
strategy :
17
17
matrix :
18
- os : ["macos-latest ", "ubuntu-latest", "windows-latest", "macos-latest-xlarge"]
18
+ os : ["macos-13 ", "ubuntu-latest", "windows-latest", "macos-latest-xlarge"]
19
19
cibw_arch : ["native"]
20
20
# Build one wheel (ABI = none) using first build spec, then test on all python versions.
21
21
cibw_build : ["cp39-* cp310-* cp311-*"]
@@ -38,34 +38,28 @@ jobs:
38
38
- name : " Checkout repo"
39
39
uses : actions/checkout@v4
40
40
41
- # Temporary, until pipx is added to the macOS large runner image
42
- - name : " Install pipx"
43
- if : matrix.os == 'macos-latest-xlarge'
44
- run : |
45
- brew install pipx
46
- pipx ensurepath
47
-
48
41
- name : " Restore RTools40"
49
42
if : startsWith(runner.os, 'Windows')
50
43
id : cache-rtools
51
- uses : actions/cache@v3
44
+ uses : actions/cache@v4
52
45
with :
53
46
path : C:/rtools40
54
47
key : ${{ runner.os }}-${{ env.OS_VERSION }}-rtools-v1
55
48
56
49
- name : Set up QEMU
57
50
if : matrix.cibw_arch == 'aarch64'
58
- uses : docker/setup-qemu-action@v2
51
+ uses : docker/setup-qemu-action@v3
59
52
with :
60
53
platforms : arm64
61
54
62
55
- name : " Build wheels"
63
- uses : pypa/cibuildwheel@v2.16.2
56
+ uses : pypa/cibuildwheel@v2.21.1
64
57
with :
65
58
package-dir : python
66
59
env :
67
60
CIBW_ENVIRONMENT : >
68
61
STAN_BACKEND="${{ env.STAN_BACKEND }}"
62
+ MACOSX_DEPLOYMENT_TARGET="${{ matrix.os == 'macos-13' && 10.11 || 11.0 }}"
69
63
CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
70
64
CIBW_BUILD : ${{ matrix.cibw_build }}
71
65
CIBW_SKIP : " *musllinux*"
75
69
CIBW_TEST_COMMAND : pytest --pyargs prophet
76
70
77
71
- name : " Upload wheel as artifact"
78
- uses : actions/upload-artifact@v3
72
+ uses : actions/upload-artifact@v4
79
73
with :
80
74
name : artifact-${{ matrix.os }}-${{ matrix.cibw_arch }}-wheel
81
75
path : " ./**/*.whl"
@@ -84,12 +78,12 @@ jobs:
84
78
name : Make source distribution
85
79
runs-on : ubuntu-latest
86
80
steps :
87
- - uses : actions/checkout@v3
81
+ - uses : actions/checkout@v4
88
82
89
83
- run : pipx run build --sdist
90
84
working-directory : python
91
85
92
- - uses : actions/upload-artifact@v3
86
+ - uses : actions/upload-artifact@v4
93
87
with :
94
88
name : artifact-source-dist
95
89
path : " ./**/dist/*.tar.gz"
99
93
needs : [make-wheels, make-sdist]
100
94
runs-on : ubuntu-latest
101
95
if : github.event_name == 'release' && github.event.action == 'published'
96
+ environment : release
97
+ permissions :
98
+ id-token : write
102
99
steps :
103
100
- name : Download all artifacts
104
- uses : actions/download-artifact@v3
101
+ uses : actions/download-artifact@v4
105
102
106
103
- name : Copy artifacts to dist/ folder
107
104
run : |
@@ -111,7 +108,4 @@ jobs:
111
108
find . -name '*.whl' -exec mv '{}' dist/ \;
112
109
113
110
- name : Upload
114
-
115
- with :
116
- user : ${{ secrets.PYPI_USERNAME }}
117
- password : ${{ secrets.PYPI_PASSWORD }}
111
+
0 commit comments