-
Notifications
You must be signed in to change notification settings - Fork 2
174 lines (151 loc) · 4.7 KB
/
ci.yaml
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: Build, Test, and deploy
on: [push]
jobs:
prepare-arm-performance-libraries:
runs-on: ${{ matrix.os }}
name: Download and prepare ARM Performance Libraries
strategy:
matrix:
armpl:
- "23.10"
os:
- macos-14
steps:
- uses: actions/checkout@v4
name: Checkout repository
- name: Restore cached ARM sources and libraries
id: cache-armpl
uses: actions/cache@v3
with:
lookup-only: true
path: sources/arm-performance-libraries/${{ matrix.armpl }}/${{ runner.os }}
key: armpl-${{ matrix.armpl }}-${{ matrix.os }}-${{ hashFiles('bin/fetch-ArmPL.sh') }}
- name: Download ARM Performance Libraries and extract relevant headers and libraries
if: steps.cache-armpl.outputs.cache-hit != 'true'
run: |
./bin/fetch-ArmPL.sh ${{ matrix.armpl }}
- name: Store headers and libraries
if: steps.cache-armpl.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v4
with:
name: armpl-${{ matrix.armpl }}-${{ matrix.os }}
path: sources/arm-performance-libraries/*
if-no-files-found: error
build:
needs:
- prepare-arm-performance-libraries
runs-on: ${{ matrix.os }}
name: Build & Test
strategy:
matrix:
os:
- ubuntu-20.04
# Intel based
- macos-13
# ARM based
- macos-14
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
fetch-depth: 0
filter: tree:0
- name: Download ARM Performance Libraries
uses: actions/download-artifact@v4
if: ${{ matrix.os == 'macos-14' }}
with:
pattern: armpl-*
path: sources/arm-performance-libraries
merge-multiple: true
- name: Build wheels
uses: pypa/[email protected]
env:
# Intel MKL only support glibc x86 64bit Intel CPUs
# If you need to compile gaussianfft for other architectures,
# a different fftw3 implementation must be used
CIBW_ARCHS_LINUX: "x86_64"
CIBW_SKIP_LINUX: "*-musllinux"
CIBW_ENABLE: "pypy"
with:
output-dir: 'dist'
- name: Store wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: dist/*.whl
if-no-files-found: error
source-distribution:
runs-on: ubuntu-20.04
name: Create source distribution (sdist)
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
fetch-depth: 0
filter: tree:0
- uses: actions/setup-python@v4
with:
python-version: "3.7" # Minimum supported version
- name: Create source distribution
run: |
make build-sdist
- name: Store source distribution
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
if-no-files-found: error
check-created-artifacts:
runs-on: ubuntu-20.04
name: Check that all the created artifacts have a consistent version
needs:
- build
- source-distribution
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
fetch-depth: 0
filter: tree:0
- name: Download compiled wheels
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: .
merge-multiple: true
- name: Download source distribution
uses: actions/download-artifact@v4
with:
name: sdist
- name: Gather wheels and source distribution
run: |
mkdir -p dist/
mv *.whl dist/
mv *.tar.gz dist/
- name: Ensure artifacts have consistent version
run: ./bin/ensure-consistent-version.sh
- name: Package all artifacts
uses: actions/upload-artifact@v4
with:
name: distribution
path: dist/
if-no-files-found: error
publish:
runs-on: ubuntu-20.04
name: Publish wheels, and source to PyPi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
- check-created-artifacts
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download distribution
uses: actions/download-artifact@v4
with:
name: distribution
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1