-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.3 KB
/
selftest.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
name: selftest
on:
pull_request:
push:
branches:
- release/*
jobs:
build-and-test:
name: Build and test
uses: ./.github/workflows/build-and-test.yaml
with:
targets: |
defaults = dict(python='cp38', test=True)
targets = []
targets.extend(defaults | dict(os='linux', arch=arch, test=arch != 'armv7') for arch in ('x86_64', 'aarch64', 'armv7'))
targets.extend(defaults | dict(os='musllinux', arch=arch) for arch in ('x86_64', 'aarch64'))
targets.append(defaults | dict(os='macos', arch='universal2'))
targets.extend(defaults | dict(os='windows', arch=arch) for arch in ('x86_64', 'i686'))
check:
name: Test distribution
needs: build-and-test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Install example
run: python -m pip install --no-index --find-links dist example
- name: Test example
shell: python
run: |
import example
assert example.double(2) == 4