Skip to content

Commit eeb1270

Browse files
committed
Finalise config
1 parent 54667cc commit eeb1270

File tree

14 files changed

+1869
-43
lines changed

14 files changed

+1869
-43
lines changed

.bumpversion.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,16 @@ replace = : str = "{new_version}"
1313
search = version = "{current_version}"
1414
replace = version = "{new_version}"
1515

16+
[bumpversion:file:Cargo.toml]
17+
search = version = "{current_version}"
18+
replace = version = "{new_version}"
19+
20+
[bumpversion:file:Cargo.lock]
21+
search =
22+
name = "formate-js"
23+
version = "{current_version}"
24+
replace =
25+
name = "formate-js"
26+
version = "{new_version}"
27+
1628
[bumpversion:file:repo_helper.yml]

.github/workflows/CI.yml

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# This file is autogenerated by maturin v1.10.2
2+
# To update, run
3+
#
4+
# maturin generate-ci github
5+
#
6+
name: CI
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
tags:
14+
- '*'
15+
pull_request:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
linux:
23+
runs-on: ${{ matrix.platform.runner }}
24+
strategy:
25+
matrix:
26+
platform:
27+
- runner: ubuntu-22.04
28+
target: x86_64
29+
- runner: ubuntu-22.04
30+
target: x86
31+
- runner: ubuntu-22.04
32+
target: aarch64
33+
- runner: ubuntu-22.04
34+
target: armv7
35+
- runner: ubuntu-22.04
36+
target: s390x
37+
- runner: ubuntu-22.04
38+
target: ppc64le
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: 3.x
44+
- name: Build wheels
45+
uses: PyO3/maturin-action@v1
46+
with:
47+
target: ${{ matrix.platform.target }}
48+
args: --release --out dist --find-interpreter
49+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
50+
manylinux: auto
51+
- name: Upload wheels
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: wheels-linux-${{ matrix.platform.target }}
55+
path: dist
56+
57+
musllinux:
58+
runs-on: ${{ matrix.platform.runner }}
59+
strategy:
60+
matrix:
61+
platform:
62+
- runner: ubuntu-22.04
63+
target: x86_64
64+
- runner: ubuntu-22.04
65+
target: x86
66+
- runner: ubuntu-22.04
67+
target: aarch64
68+
- runner: ubuntu-22.04
69+
target: armv7
70+
steps:
71+
- uses: actions/checkout@v4
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: 3.x
75+
- name: Build wheels
76+
uses: PyO3/maturin-action@v1
77+
with:
78+
target: ${{ matrix.platform.target }}
79+
args: --release --out dist --find-interpreter
80+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
81+
manylinux: musllinux_1_2
82+
- name: Upload wheels
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: wheels-musllinux-${{ matrix.platform.target }}
86+
path: dist
87+
88+
windows:
89+
runs-on: ${{ matrix.platform.runner }}
90+
strategy:
91+
matrix:
92+
platform:
93+
- runner: windows-latest
94+
target: x64
95+
- runner: windows-latest
96+
target: x86
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: actions/setup-python@v5
100+
with:
101+
python-version: 3.x
102+
architecture: ${{ matrix.platform.target }}
103+
- name: Build wheels
104+
uses: PyO3/maturin-action@v1
105+
with:
106+
target: ${{ matrix.platform.target }}
107+
args: --release --out dist --find-interpreter
108+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
109+
- name: Upload wheels
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: wheels-windows-${{ matrix.platform.target }}
113+
path: dist
114+
115+
macos:
116+
runs-on: ${{ matrix.platform.runner }}
117+
strategy:
118+
matrix:
119+
platform:
120+
- runner: macos-15-intel
121+
target: x86_64
122+
- runner: macos-14
123+
target: aarch64
124+
steps:
125+
- uses: actions/checkout@v4
126+
- uses: actions/setup-python@v5
127+
with:
128+
python-version: 3.x
129+
- name: Build wheels
130+
uses: PyO3/maturin-action@v1
131+
with:
132+
target: ${{ matrix.platform.target }}
133+
args: --release --out dist --find-interpreter
134+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
135+
- name: Upload wheels
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: wheels-macos-${{ matrix.platform.target }}
139+
path: dist
140+
141+
sdist:
142+
runs-on: ubuntu-latest
143+
steps:
144+
- uses: actions/checkout@v4
145+
- name: Build sdist
146+
uses: PyO3/maturin-action@v1
147+
with:
148+
command: sdist
149+
args: --out dist
150+
- name: Upload sdist
151+
uses: actions/upload-artifact@v4
152+
with:
153+
name: wheels-sdist
154+
path: dist
155+
156+
release:
157+
name: Release
158+
runs-on: ubuntu-latest
159+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
160+
needs: [linux, musllinux, windows, macos, sdist]
161+
permissions:
162+
# Use to sign the release artifacts
163+
id-token: write
164+
# Used to upload release artifacts
165+
contents: write
166+
# Used to generate artifact attestation
167+
attestations: write
168+
steps:
169+
- name: Checkout 🛎️
170+
uses: "actions/checkout@v4"
171+
if: startsWith(github.ref, 'refs/tags/')
172+
173+
- name: Setup Python 🐍
174+
uses: "actions/setup-python@v5"
175+
if: startsWith(github.ref, 'refs/tags/')
176+
with:
177+
python-version: 3.8
178+
179+
- name: Install dependencies 🔧
180+
if: startsWith(github.ref, 'refs/tags/')
181+
run: |
182+
python -m pip install --upgrade pip setuptools wheel
183+
python -m pip install --upgrade tox~=3.0
184+
185+
- uses: actions/download-artifact@v4
186+
- name: Generate artifact attestation
187+
uses: actions/attest-build-provenance@v2
188+
with:
189+
subject-path: 'wheels-*/*'
190+
191+
- name: Upload distribution to PyPI 🚀
192+
if: startsWith(github.ref, 'refs/tags/')
193+
uses: PyO3/maturin-action@v1
194+
env:
195+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
196+
with:
197+
command: upload
198+
args: --non-interactive --skip-existing wheels-*/*
199+
200+
- name: Close milestone 🚪
201+
if: startsWith(github.ref, 'refs/tags/')
202+
run: |
203+
python -m pip install --upgrade github3.py packaging
204+
python .github/milestones.py
205+
env:
206+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/python_ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Windows
4+
5+
on:
6+
push:
7+
branches-ignore:
8+
- 'repo-helper-update'
9+
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
11+
12+
pull_request:
13+
14+
permissions:
15+
actions: write
16+
issues: write
17+
contents: read
18+
19+
jobs:
20+
tests:
21+
name: "windows-2022 / Python ${{ matrix.config.python-version }}"
22+
runs-on: "windows-2022"
23+
continue-on-error: ${{ matrix.config.experimental }}
24+
env:
25+
USING_COVERAGE: '3.8,3.9,3.10,3.11,3.12,3.13'
26+
27+
strategy:
28+
fail-fast: False
29+
matrix:
30+
config:
31+
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
32+
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
33+
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
34+
- {python-version: "3.11", testenvs: "py311,build", experimental: False}
35+
- {python-version: "3.12", testenvs: "py312,build", experimental: False}
36+
- {python-version: "3.13", testenvs: "py313,build", experimental: False}
37+
38+
steps:
39+
- name: Checkout 🛎️
40+
uses: "actions/checkout@v4"
41+
42+
- name: Check for changed files
43+
if: startsWith(github.ref, 'refs/tags/') != true
44+
uses: dorny/paths-filter@v2
45+
id: changes
46+
with:
47+
list-files: "json"
48+
filters: |
49+
code:
50+
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
51+
52+
- name: Setup Python 🐍
53+
id: setup-python
54+
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
55+
uses: "actions/setup-python@v5"
56+
with:
57+
python-version: "${{ matrix.config.python-version }}"
58+
59+
- name: Install dependencies 🔧
60+
if: steps.setup-python.outcome == 'success'
61+
run: |
62+
python -VV
63+
python -m site
64+
python -m pip install --upgrade pip setuptools wheel
65+
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
66+
67+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
68+
if: steps.setup-python.outcome == 'success'
69+
run: python -m tox -e "${{ matrix.config.testenvs }}" -s false
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Linux
4+
5+
on:
6+
push:
7+
branches-ignore:
8+
- 'repo-helper-update'
9+
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
11+
tags:
12+
- '*'
13+
pull_request:
14+
15+
permissions:
16+
actions: write
17+
issues: write
18+
contents: read
19+
20+
jobs:
21+
tests:
22+
name: "ubuntu-22.04 / Python ${{ matrix.config.python-version }}"
23+
runs-on: "ubuntu-22.04"
24+
continue-on-error: ${{ matrix.config.experimental }}
25+
env:
26+
USING_COVERAGE: '3.8,3.9,3.10,3.11,3.12,3.13'
27+
28+
strategy:
29+
fail-fast: False
30+
matrix:
31+
config:
32+
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
33+
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
34+
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
35+
- {python-version: "3.11", testenvs: "py311,build", experimental: False}
36+
- {python-version: "3.12", testenvs: "py312,build", experimental: False}
37+
- {python-version: "3.13", testenvs: "py313,build", experimental: False}
38+
39+
steps:
40+
- name: Checkout 🛎️
41+
uses: "actions/checkout@v4"
42+
43+
- name: Check for changed files
44+
if: startsWith(github.ref, 'refs/tags/') != true
45+
uses: dorny/paths-filter@v2
46+
id: changes
47+
with:
48+
list-files: "json"
49+
filters: |
50+
code:
51+
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
52+
53+
- name: Setup Python 🐍
54+
id: setup-python
55+
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
56+
uses: "actions/setup-python@v5"
57+
with:
58+
python-version: "${{ matrix.config.python-version }}"
59+
60+
- name: Install dependencies 🔧
61+
if: steps.setup-python.outcome == 'success'
62+
run: |
63+
python -VV
64+
python -m site
65+
python -m pip install --upgrade pip setuptools wheel
66+
python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
67+
68+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
69+
if: steps.setup-python.outcome == 'success'
70+
run: python -m tox -e "${{ matrix.config.testenvs }}" -s false

0 commit comments

Comments
 (0)