-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 2.55 KB
/
publish.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
# This file is autogenerated by maturin v1.7.1
# To update, run
#
# maturin generate-ci github --pytest
#
# Modified by hand to use PyPI's Trusted Publishing:
# https://www.maturin.rs/distribution#using-pypis-trusted-publishing
# Also to change when the workflow is triggered (should be on new release)
# and remove unused target platforms.
name: CI
on:
pull_request:
release:
types:
- created
permissions:
contents: read
jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist
- name: pytest
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install codecov_rs --find-links dist --force-reinstall
pip install pytest
pytest
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.platform.target }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y gnupg ca-certificates
echo "deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list.d/deadsnakes.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776
apt-get update
apt-get install -y --no-install-recommends python3.12 python3.12-venv python3-pip
python3.12 -m venv /venv
source /venv/bin/activate
pip install -U pip pytest
run: |
set -e
which pip
source /venv/bin/activate
which pip
pip install codecov_rs --find-links dist --force-reinstall
# python3.12 -m pip install codecov_rs --find-links dist --force-reinstall
pytest