1
1
name : " Continuous Integration"
2
- on : [push]
2
+ on : [ push ]
3
3
4
4
jobs :
5
5
test :
6
6
name : " Test"
7
7
strategy :
8
8
matrix :
9
- os : [ubuntu-latest, macos-latest, windows-latest]
10
- python-version : ["3.6 ", "3.7 ", "3.8 ", "3.9 ", "3.10" ]
9
+ os : [ ubuntu-latest, macos-latest, windows-latest ]
10
+ python-version : [ "3.7 ", "3.8 ", "3.9 ", "3.10 ", "3.11" ]
11
11
runs-on : " ${{ matrix.os }}"
12
12
steps :
13
13
# Check out the code
14
- - uses : " actions/checkout@v2 "
14
+ - uses : " actions/checkout@v3 "
15
15
16
16
# We need node for some integration tests
17
- - uses : " actions/setup-node@v1 "
17
+ - uses : " actions/setup-node@v3 "
18
18
19
19
# Install python
20
20
- name : " Set up python"
21
- uses : " actions/setup-python@v2 "
21
+ uses : " actions/setup-python@v4 "
22
22
with :
23
23
python-version : " ${{ matrix.python-version }}"
24
24
45
45
# Cache build dependencies
46
46
- name : " Cache Build Fragments"
47
47
id : " cache-build-fragments"
48
- uses : " actions/cache@v2 "
48
+ uses : " actions/cache@v3 "
49
49
with :
50
50
path : |
51
51
~/.cargo/registry
@@ -62,16 +62,16 @@ jobs:
62
62
# Cache `cargo install` built binaries
63
63
- name : " Cache Built Binaries"
64
64
id : " cache-binaries"
65
- uses : " actions/cache@v2 "
65
+ uses : " actions/cache@v3 "
66
66
with :
67
67
path : " ~/.cargo/bin"
68
68
# In theory, this should rebuild binaries once a month
69
69
key : " ${{ runner.os }}-cargo-binaries-${{steps.get-date.outputs.date}}"
70
70
71
71
- name : Install wasm-pack
72
- uses : jetli/wasm-pack-action@v0.3 .0
72
+ uses : jetli/wasm-pack-action@v0.4 .0
73
73
with :
74
- version : " v0.10 .1"
74
+ version : " v0.12 .1"
75
75
76
76
- name : " Run Tests"
77
77
if : " ${{ !contains(runner.os, 'windows') }}"
@@ -104,13 +104,13 @@ jobs:
104
104
runs-on : ubuntu-latest
105
105
steps :
106
106
# Check out the code
107
- - uses : " actions/checkout@v2 "
107
+ - uses : " actions/checkout@v3 "
108
108
109
109
# Install python
110
110
- name : " Set up python"
111
- uses : " actions/setup-python@v2 "
111
+ uses : " actions/setup-python@v4 "
112
112
with :
113
- python-version : " 3.10 "
113
+ python-version : " 3.11 "
114
114
115
115
- name : " Get Python Path"
116
116
id : get-py-path
@@ -135,7 +135,7 @@ jobs:
135
135
# Cache build dependencies
136
136
- name : " Cache Build Fragments"
137
137
id : " cache-build-fragments"
138
- uses : " actions/cache@v2 "
138
+ uses : " actions/cache@v3 "
139
139
with :
140
140
path : |
141
141
~/.cargo/registry
@@ -148,24 +148,24 @@ jobs:
148
148
# Cache `cargo install` built binaries
149
149
- name : " Cache Built Binaries"
150
150
id : " cache-binaries"
151
- uses : " actions/cache@v2 "
151
+ uses : " actions/cache@v3 "
152
152
with :
153
153
path : " ~/.cargo/bin"
154
154
# In theory, this should rebuild binaries once a month
155
155
key : " ${{ runner.os }}-cargo-binaries-${{steps.get-date.outputs.date}}"
156
156
157
157
- name : Install wasm-pack
158
- uses : jetli/wasm-pack-action@v0.3 .0
158
+ uses : jetli/wasm-pack-action@v0.4 .0
159
159
with :
160
- version : " v0.10 .1"
160
+ version : " v0.12 .1"
161
161
162
162
- name : " Build Rust/C Libraries"
163
163
run : " make build"
164
164
165
165
- name : " Check Rust target content"
166
166
run : ls target/release
167
167
168
- - uses : " actions/upload-artifact@v2 "
168
+ - uses : " actions/upload-artifact@v3 "
169
169
name : " Upload Rust/C Libraries"
170
170
with :
171
171
path : target/release/libjsonlogic_rs.*
@@ -177,7 +177,7 @@ jobs:
177
177
WINDOWS : " ${{ contains(runner.os, 'windows') }}"
178
178
PYTHON : ${{ steps.get-py-path.outputs.path }}
179
179
180
- - uses : " actions/upload-artifact@v2 "
180
+ - uses : " actions/upload-artifact@v3 "
181
181
name : " Upload Python sdist"
182
182
with :
183
183
path : dist/*.tar.gz
@@ -186,7 +186,7 @@ jobs:
186
186
- name : " Build WASM Node Package"
187
187
run : " make build-wasm"
188
188
189
- - uses : " actions/upload-artifact@v2 "
189
+ - uses : " actions/upload-artifact@v3 "
190
190
name : " Upload node package"
191
191
with :
192
192
path : js/
@@ -196,46 +196,41 @@ jobs:
196
196
name : >
197
197
Build Wheel
198
198
(${{ matrix.platform.os }}, ${{ matrix.platform.name }}, ${{ matrix.py }})
199
- # needs: test
199
+ # needs: test
200
200
runs-on : ${{ matrix.platform.os }}
201
201
strategy :
202
202
fail-fast : false
203
203
matrix :
204
204
platform :
205
- - {os: ubuntu-latest, name: manylinux}
206
- - {os: ubuntu-latest, name: musllinux}
207
- - {os: macos-latest, name: macosx}
208
- - {os: windows-latest, name: win}
205
+ - { os: ubuntu-latest, name: manylinux }
206
+ - { os: ubuntu-latest, name: musllinux }
207
+ - { os: macos-latest, name: macosx }
208
+ - { os: windows-latest, name: win }
209
209
py :
210
- - cp36
211
- - cp37
212
- - cp38
213
- - cp39
214
- - cp310
210
+ - cp37
211
+ - cp38
212
+ - cp39
213
+ - cp310
214
+ - cp311
215
215
216
216
steps :
217
- - uses : actions/checkout@v2
218
-
219
- - uses : actions/setup-python@v2
220
- name : Install Python
221
- with :
222
- python-version : ' 3.10'
217
+ - uses : actions/checkout@v3
223
218
224
219
- name : Set up QEMU
225
220
if : runner.os == 'Linux'
226
- uses : docker/setup-qemu-action@v1
221
+ uses : docker/setup-qemu-action@v2
227
222
with :
228
223
platforms : all
229
224
230
225
- name : Build wheels
231
- uses : pypa/cibuildwheel@v2.3 .1
226
+ uses : pypa/cibuildwheel@v2.14 .1
232
227
env :
233
228
# configure cibuildwheel to build native archs ('auto'), and some
234
229
# emulated ones
235
230
CIBW_ARCHS_LINUX : x86_64 aarch64
236
231
# cross-compiling wheels for discrete architectures not working OOTB
237
232
# see: https://github.com/PyO3/setuptools-rust/issues/206
238
- CIBW_ARCHS_MACOS : x86_64 universal2
233
+ CIBW_ARCHS_MACOS : x86_64 universal2 arm64
239
234
CIBW_ARCHS_WINDOWS : AMD64
240
235
CIBW_BEFORE_ALL_LINUX : >
241
236
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
@@ -245,26 +240,25 @@ jobs:
245
240
CIBW_BUILD : ${{ matrix.py }}-${{ matrix.platform.name }}_*
246
241
CIBW_TEST_COMMAND : python {project}/tests/test_py.py
247
242
248
- - uses : actions/upload-artifact@v2
243
+ - uses : actions/upload-artifact@v3
249
244
with :
250
245
name : py-wheels
251
246
path : ./wheelhouse/*.whl
252
247
253
248
distribute :
254
249
name : " Distribute Cargo, WASM, and Python Sdist Packages"
255
- needs :
256
- ["build", "build-wheels"]
250
+ needs : [ "build", "build-wheels" ]
257
251
runs-on : ubuntu-latest
258
252
if : " ${{ github.ref == 'refs/heads/master' }}"
259
253
steps :
260
254
# Check out the code
261
- - uses : " actions/checkout@v2 "
255
+ - uses : " actions/checkout@v3 "
262
256
263
257
# Install python
264
258
- name : " Set up python"
265
- uses : " actions/setup-python@v2 "
259
+ uses : " actions/setup-python@v4 "
266
260
with :
267
- python-version : " 3.8 "
261
+ python-version : " 3.11 "
268
262
269
263
# Generate the lockfile
270
264
- name : " Generate Cargo Lockfile"
@@ -309,7 +303,7 @@ jobs:
309
303
run : |
310
304
echo "${{ steps.cargo-version.outputs.new }}" > tmp-new-cargo-ver
311
305
312
- - uses : " actions/upload-artifact@v2 "
306
+ - uses : " actions/upload-artifact@v3 "
313
307
with :
314
308
path : " tmp-new-cargo-ver"
315
309
name : " new-cargo"
@@ -377,7 +371,7 @@ jobs:
377
371
owner: "${{ github.repository_owner }}",
378
372
repo: "json-logic-rs",
379
373
tag: "v${{ steps.get-version.outputs.version }}",
380
- message: "Vesrion ${{ steps.get-version.outputs.version }}",
374
+ message: "Version ${{ steps.get-version.outputs.version }}",
381
375
object: "${{ github.sha }}",
382
376
type: "commit",
383
377
tagger: {
@@ -388,21 +382,21 @@ jobs:
388
382
389
383
distribute-py-wheels :
390
384
name : " Distribute Python Wheels"
391
- needs : ["distribute"]
385
+ needs : [ "distribute" ]
392
386
if : " ${{ github.ref == 'refs/heads/master' }}"
393
- # needs: [build_wheels, build_sdist]
387
+ # needs: [build_wheels, build_sdist]
394
388
runs-on : ubuntu-latest
395
389
# upload to PyPI on every tag starting with 'v'
396
- # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
390
+ # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
397
391
# alternatively, to publish when a GitHub Release is created, use the following rule:
398
392
# if: github.event_name == 'release' && github.event.action == 'published'
399
393
steps :
400
- - uses : actions/download-artifact@v2
394
+ - uses : actions/download-artifact@v3
401
395
with :
402
396
name : py-wheels
403
397
path : dist
404
398
405
- - uses : pypa/gh-action-pypi-publish@v1.4.2
399
+ - uses : pypa/gh-action-pypi-publish@v1
406
400
with :
407
401
user : __token__
408
402
password : ${{ secrets.PYPI_TOKEN }}
0 commit comments