Skip to content

Commit f756754

Browse files
committed
Merge branch 'master' into test_windows_wheels
2 parents 98d2245 + 969c4df commit f756754

27 files changed

+28055
-884
lines changed
File renamed without changes.

.github/release-drafter.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
categories:
2-
- title: '⚠ Breaking Changes'
2+
- title: "⚠ Breaking Changes"
33
labels:
4-
- 'breaking'
5-
- title: '🚀 Features'
4+
- "breaking"
5+
- title: "🚀 Features"
66
labels:
7-
- 'feature'
8-
- 'enhancement'
9-
- title: '🐛 Bug Fixes'
7+
- "feature"
8+
- "enhancement"
9+
- title: "🐛 Bug Fixes"
1010
labels:
11-
- 'fix'
12-
- 'bugfix'
13-
- 'bug'
14-
- title: '📄 Documentation'
11+
- "fix"
12+
- "bugfix"
13+
- "bug"
14+
- title: "📄 Documentation"
1515
labels:
16-
- 'documentation'
17-
- title: '🧰 Maintenance'
18-
label:
19-
- 'chore'
20-
- 'ci'
21-
- 'dependencies'
16+
- "documentation"
17+
- title: "🧰 Maintenance"
18+
label:
19+
- "chore"
20+
- "ci"
21+
- "dependencies"
2222

2323
exclude-labels:
24-
- 'skip-changelog'
24+
- "skip-changelog"
2525

26-
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
26+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
2727
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
2828
version-resolver:
2929
major:
3030
labels:
31-
- 'major'
31+
- "major"
3232
minor:
3333
labels:
34-
- 'minor'
34+
- "minor"
3535
patch:
3636
labels:
37-
- 'patch'
37+
- "patch"
3838
default: patch
3939
template: |
4040
## Changes

.github/workflows/build.yml

Lines changed: 119 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Build
33
on:
44
workflow_dispatch:
55
push:
6-
branches: [ master ]
6+
branches: [master]
77
tags:
88
- v*
99
pull_request:
10-
branches: [ master ]
10+
branches: [master]
1111

1212
env:
1313
CARGO_TERM_COLOR: always
@@ -30,81 +30,100 @@ jobs:
3030
matrix:
3131
os: [ubuntu-latest, windows-latest, macos-latest]
3232
steps:
33-
- uses: actions/checkout@v3
34-
- name: Install Dependencies
35-
run: sudo apt install libunwind-dev
36-
if: runner.os == 'Linux'
37-
- name: Build
38-
run: cargo build --release --verbose --examples
39-
- uses: actions/setup-python@v4
40-
with:
41-
python-version: 3.9
42-
- name: Test
43-
id: test
44-
continue-on-error: true
45-
run: cargo test --release
46-
- name: Test (retry#1)
47-
id: test1
48-
run: cargo test --release
49-
if: steps.test.outcome=='failure'
50-
continue-on-error: true
51-
- name: Test (retry#2)
52-
run: cargo test --release
53-
if: steps.test1.outcome=='failure'
54-
- name: Build Wheel
55-
run: |
56-
pip install --upgrade maturin
57-
maturin build --release -o dist
58-
if: runner.os != 'Linux'
59-
- name: Build Wheel - universal2
60-
env:
61-
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
62-
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
63-
MACOSX_DEPLOYMENT_TARGET: 10.9
64-
run: |
65-
rustup target add aarch64-apple-darwin
66-
rustup target add x86_64-apple-darwin
67-
pip install --upgrade maturin
68-
maturin build --release -o dist --target universal2-apple-darwin
69-
if: matrix.os == 'macos-latest'
70-
- name: Rename Wheels
71-
run: |
72-
python3 -c "import shutil; import glob; wheels = glob.glob('dist/*.whl'); [shutil.move(wheel, wheel.replace('py3', 'py2.py3')) for wheel in wheels if 'py2' not in wheel]"
73-
if: runner.os != 'Linux'
74-
- name: Upload wheels
75-
uses: actions/upload-artifact@v3
76-
with:
77-
name: wheels
78-
path: dist
79-
if: runner.os != 'Linux'
33+
- uses: actions/checkout@v3
34+
- uses: Swatinem/rust-cache@v2
35+
- name: Install Dependencies
36+
run: sudo apt install libunwind-dev
37+
if: runner.os == 'Linux'
38+
- uses: actions/setup-python@v4
39+
with:
40+
python-version: 3.9
41+
- name: Build
42+
run: cargo build --release --verbose --examples
43+
- uses: actions/setup-python@v4
44+
with:
45+
python-version: 3.9
46+
- name: Test
47+
id: test
48+
continue-on-error: true
49+
run: cargo test --release
50+
- name: Test (retry#1)
51+
id: test1
52+
run: cargo test --release
53+
if: steps.test.outcome=='failure'
54+
continue-on-error: true
55+
- name: Test (retry#2)
56+
run: cargo test --release
57+
if: steps.test1.outcome=='failure'
58+
- name: Build Wheel
59+
run: |
60+
pip install --upgrade maturin
61+
maturin build --release -o dist --all-features
62+
if: runner.os == 'Windows'
63+
- name: Build Wheel - universal2
64+
env:
65+
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
66+
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
67+
MACOSX_DEPLOYMENT_TARGET: 10.9
68+
run: |
69+
rustup target add aarch64-apple-darwin
70+
rustup target add x86_64-apple-darwin
71+
pip install --upgrade maturin
72+
maturin build --release -o dist
73+
maturin build --release -o dist --target universal2-apple-darwin
74+
if: matrix.os == 'macos-latest'
75+
- name: Rename Wheels
76+
run: |
77+
python3 -c "import shutil; import glob; wheels = glob.glob('dist/*.whl'); [shutil.move(wheel, wheel.replace('py3', 'py2.py3')) for wheel in wheels if 'py2' not in wheel]"
78+
if: runner.os != 'Linux'
79+
- name: Upload wheels
80+
uses: actions/upload-artifact@v3
81+
with:
82+
name: wheels
83+
path: dist
84+
if: runner.os != 'Linux'
8085

8186
build-linux-cross:
8287
runs-on: ubuntu-latest
8388
needs: [lint]
8489
strategy:
8590
fail-fast: false
8691
matrix:
87-
target: [i686-musl, armv7-musleabihf, aarch64-musl, x86_64-musl]
92+
target:
93+
[
94+
i686-unknown-linux-musl,
95+
armv7-unknown-linux-musleabihf,
96+
aarch64-unknown-linux-musl,
97+
x86_64-unknown-linux-musl,
98+
]
8899
container:
89-
image: docker://benfred/rust-musl-cross:${{ matrix.target }}
100+
image: ghcr.io/benfred/rust-musl-cross:${{ matrix.target }}
90101
env:
91102
RUSTUP_HOME: /root/.rustup
92103
CARGO_HOME: /root/.cargo
93104
steps:
94-
- uses: actions/checkout@v3
95-
- name: Build
96-
run: |
97-
python3 -m pip install --upgrade maturin
98-
maturin build --release -o dist --target $RUST_MUSL_CROSS_TARGET
99-
maturin sdist -o dist
100-
- name: Rename Wheels
101-
run: |
102-
python3 -c "import shutil; import glob; wheels = glob.glob('dist/*.whl'); [shutil.move(wheel, wheel.replace('py3', 'py2.py3')) for wheel in wheels if 'py2' not in wheel]"
103-
- name: Upload wheels
104-
uses: actions/upload-artifact@v3
105-
with:
106-
name: wheels
107-
path: dist
105+
- uses: actions/checkout@v3
106+
- uses: Swatinem/rust-cache@v2
107+
- name: Build
108+
run: |
109+
python3 -m pip install --upgrade maturin
110+
maturin build --release -o dist --target ${{ matrix.target }} --features unwind
111+
maturin sdist -o dist
112+
if: matrix.target == 'x86_64-unknown-linux-musl'
113+
- name: Build
114+
run: |
115+
python3 -m pip install --upgrade maturin
116+
maturin build --release -o dist --target ${{ matrix.target }}
117+
maturin sdist -o dist
118+
if: matrix.target != 'x86_64-unknown-linux-musl'
119+
- name: Rename Wheels
120+
run: |
121+
python3 -c "import shutil; import glob; wheels = glob.glob('dist/*.whl'); [shutil.move(wheel, wheel.replace('py3', 'py2.py3')) for wheel in wheels if 'py2' not in wheel]"
122+
- name: Upload wheels
123+
uses: actions/upload-artifact@v3
124+
with:
125+
name: wheels
126+
path: dist
108127

109128
build-freebsd:
110129
runs-on: ubuntu-22.04
@@ -169,33 +188,54 @@ jobs:
169188
runs-on: ${{ matrix.os }}
170189
strategy:
171190
fail-fast: false
191+
# automatically generated by ci/update_python_test_versions.py
172192
matrix:
173-
python-version: [3.6.7, 3.6.15, 3.7.1, 3.7.17, 3.8.0, 3.8.18, 3.9.0, 3.9.20, 3.10.0, 3.10.1, 3.10.2, 3.10.3, 3.10.4, 3.10.5, 3.10.6, 3.10.7, 3.10.8, 3.10.9, 3.10.10, 3.10.11, 3.10.12, 3.10.13, 3.10.14, 3.10.15, 3.11.0, 3.11.1, 3.11.2, 3.11.3, 3.11.4, 3.11.5, 3.11.6, 3.11.7, 3.11.8, 3.11.9, 3.11.10]
193+
python-version:
194+
[
195+
3.6.7,
196+
3.6.15,
197+
3.7.1,
198+
3.7.17,
199+
3.8.0,
200+
3.8.18,
201+
3.9.0,
202+
3.9.20,
203+
3.10.0,
204+
3.10.15,
205+
3.11.0,
206+
3.11.10,
207+
3.12.0,
208+
3.12.1,
209+
3.12.2,
210+
3.12.3,
211+
3.12.4,
212+
3.12.5,
213+
3.12.6,
214+
3.12.7,
215+
3.13.0,
216+
]
217+
# TODO: also test windows
174218
os: [ubuntu-20.04, macos-13, windows-latest]
175219
# some versions of python can't be tested on GHA with osx because of SIP:
176220
exclude:
177221
- os: macos-13
178-
python-version: 3.11.0
179-
- os: macos-13
180-
python-version: 3.11.1
181-
- os: macos-13
182-
python-version: 3.11.2
222+
python-version: 3.11.10
183223
- os: macos-13
184-
python-version: 3.11.3
224+
python-version: 3.12.0
185225
- os: macos-13
186-
python-version: 3.11.4
226+
python-version: 3.12.1
187227
- os: macos-13
188-
python-version: 3.11.5
228+
python-version: 3.12.2
189229
- os: macos-13
190-
python-version: 3.11.6
230+
python-version: 3.12.3
191231
- os: macos-13
192-
python-version: 3.11.7
232+
python-version: 3.12.4
193233
- os: macos-13
194-
python-version: 3.11.8
234+
python-version: 3.12.5
195235
- os: macos-13
196-
python-version: 3.11.9
236+
python-version: 3.12.6
197237
- os: macos-13
198-
python-version: 3.11.10
238+
python-version: 3.12.7
199239

200240
steps:
201241
- uses: actions/checkout@v2

.github/workflows/update_python_test.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Update Python Test Versions
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: "0 1 * * *"
5+
- cron: "0 1 * * *"
66
jobs:
77
update-dep:
88
runs-on: ubuntu-latest
@@ -14,15 +14,17 @@ jobs:
1414
with:
1515
python-version: 3.9
1616
- name: Install
17-
run: pip install --upgrade requests
17+
run: pip install --upgrade requests pyyaml
1818
- name: Scan for new python versions
1919
run: python ci/update_python_test_versions.py
20+
- name: Format results
21+
run: npx prettier --write ".github/workflows/update_python_test.yml"
2022
- name: Create Pull Request
2123
uses: peter-evans/create-pull-request@v4
2224
with:
23-
commit-message: Update tested python versions
24-
title: Update tested python versions
25-
branch: update-python-versions
26-
labels: |
27-
skip-changelog
28-
dependencies
25+
commit-message: Update tested python versions
26+
title: Update tested python versions
27+
branch: update-python-versions
28+
labels: |
29+
skip-changelog
30+
dependencies

.pre-commit-config.yaml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
repos:
2-
- repo: https://github.com/codespell-project/codespell
3-
rev: v2.2.4
4-
hooks:
5-
- id: codespell
6-
additional_dependencies: [tomli]
7-
args: ["--toml", "pyproject.toml"]
8-
exclude: (?x)^(ci/testdata.*|images.*)$
9-
- repo: https://github.com/doublify/pre-commit-rust
10-
rev: v1.0
11-
hooks:
12-
- id: fmt
13-
- id: cargo-check
14-
- repo: local
15-
hooks:
16-
- id: cargo-clippy
17-
name: cargo clippy
18-
entry: cargo clippy -- -D warnings
19-
language: system
20-
files: \.rs$
21-
pass_filenames: false
2+
- repo: https://github.com/codespell-project/codespell
3+
rev: v2.2.4
4+
hooks:
5+
- id: codespell
6+
additional_dependencies: [tomli]
7+
args: ["--toml", "pyproject.toml"]
8+
exclude: (?x)^(ci/testdata.*|images.*)$
9+
- repo: https://github.com/doublify/pre-commit-rust
10+
rev: v1.0
11+
hooks:
12+
- id: fmt
13+
- id: cargo-check
14+
- repo: local
15+
hooks:
16+
- id: cargo-clippy
17+
name: cargo clippy
18+
entry: cargo clippy -- -D warnings
19+
language: system
20+
files: \.rs$
21+
pass_filenames: false
22+
- repo: https://github.com/rbubley/mirrors-prettier
23+
rev: v3.3.3
24+
hooks:
25+
- id: prettier
26+
types: [yaml]

0 commit comments

Comments
 (0)