|
3 | 3 | #
|
4 | 4 | # maturin generate-ci github --pytest
|
5 | 5 | #
|
6 |
| -# Modified by hand to use PyPI's Trusted Publishing: |
7 |
| -# https://www.maturin.rs/distribution#using-pypis-trusted-publishing |
8 |
| -# Also to change when the workflow is triggered (should be on new release) |
9 |
| -# and remove unused target platforms. |
| 6 | +# Modified by hand to: |
| 7 | +# - use PyPI's Trusted Publishing https://www.maturin.rs/distribution#using-pypis-trusted-publishing |
| 8 | +# - trigger the workflow on new release |
| 9 | +# - add "packages: write" permission for uraimo/run-on-arch-action caching |
| 10 | +# - remove unnecessary target platforms |
| 11 | +# - make run-on-arch-action use deadsnakes Python 3.12 |
10 | 12 | name: CI
|
11 | 13 |
|
12 | 14 | on:
|
|
16 | 18 |
|
17 | 19 | permissions:
|
18 | 20 | contents: read
|
| 21 | + packages: write |
19 | 22 |
|
20 | 23 | jobs:
|
21 | 24 | linux:
|
@@ -65,11 +68,18 @@ jobs:
|
65 | 68 | githubToken: ${{ github.token }}
|
66 | 69 | install: |
|
67 | 70 | apt-get update
|
68 |
| - apt-get install -y --no-install-recommends python3 python3-pip |
69 |
| - pip3 install -U pip pytest |
| 71 | + apt-get install -y gnupg ca-certificates |
| 72 | + echo "deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list.d/deadsnakes.list |
| 73 | + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 |
| 74 | + apt-get update |
| 75 | + apt-get install -y --no-install-recommends python3.12 python3.12-venv python3-pip |
| 76 | + python3.12 -m venv /venv |
| 77 | + source /venv/bin/activate |
| 78 | + pip install -U pip pytest |
70 | 79 | run: |
|
71 | 80 | set -e
|
72 |
| - pip3 install codecov_rs --find-links dist --force-reinstall |
| 81 | + source /venv/bin/activate |
| 82 | + pip install codecov_rs --find-links dist --force-reinstall |
73 | 83 | pytest
|
74 | 84 |
|
75 | 85 | musllinux:
|
|
0 commit comments