-
Notifications
You must be signed in to change notification settings - Fork 63
103 lines (91 loc) · 2.87 KB
/
ci.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
static.rust-lang.org:443
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- name: Rust toolchain
uses: dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa
with:
toolchain: "stable"
components: rustfmt
- name: Check Formatting
run: cargo fmt --check
Test:
env:
UNSAFE_PYO3_SKIP_VERSION_CHECK: ${{ matrix.unsafe-pyo3-skip-version-check }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12"]
allow-prereleases: [false]
unsafe-pyo3-skip-version-check: [0]
include:
- os: ubuntu-latest
python-version: "3.13"
allow-prereleases: false
unsafe-pyo3-skip-version-check: 1
- os: ubuntu-latest
python-version: "3.12"
allow-prereleases: false
- os: ubuntu-latest
python-version: "3.11"
allow-prereleases: false
- os: ubuntu-latest
python-version: "3.10"
allow-prereleases: false
- os: ubuntu-latest
python-version: 3.9
allow-prereleases: false
runs-on: "${{ matrix.os }}"
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
crates.io:443
files.pythonhosted.org:443
github.com:443
pypi.org:443
static.crates.io:443
index.crates.io:443
static.rust-lang.org:443
objects.githubusercontent.com:443
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # 5.3.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: ${{ matrix.allow-prereleases }}
- uses: dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa
with:
toolchain: "stable"
#- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # 2.7.3
- run: python -m pip install nox
- run: nox -s test-${{ matrix.python-version }}