This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (104 loc) · 2.76 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
name: ci
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
tags-ignore:
- "*"
concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
jobs:
build-test:
strategy:
max-parallel: 5
matrix:
os: ["macos-12", "macos-13", "macos-14", "windows-latest", "ubuntu-latest"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
exclude:
- {os: macos-14, python-version: '3.8'}
- {os: macos-14, python-version: '3.9'}
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- run: python -m pip install -U pip
- run: pip install -e .
- run: pip install -r requirements.txt
- run: pytest -sv
build:
uses: ./.github/workflows/_wheels.yaml
test:
needs: [build]
strategy:
max-parallel: 5
fail-fast: false
matrix:
os: ["macos-12", "macos-13", "macos-14", "windows-latest", "ubuntu-latest"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
exclude:
- {os: macos-14, python-version: '3.8'}
- {os: macos-14, python-version: '3.9'}
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4.1.7
with:
name: wheel
path: dist
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- run: python -m pip install -U pip
- run: pip install bencode-c --no-index --find-link ./dist/
- run: pip install -r requirements.txt
- run: pytest -sv
check_dist:
name: Check dist
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: wheel
path: dist
- run: pipx run twine check --strict dist/*
audit:
name: Audit
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
cache-dependency-path: 'requirements.txt'
- run: pip install -r requirements.txt
- uses: actions/download-artifact@v4
with:
name: wheel
path: dist
- run: abi3audit --verbose dist/*.whl