Skip to content

Commit f6af92c

Browse files
gijzelaerrclaude
andcommitted
Modernize CI/CD and fix configuration issues
- Add UV caching to all workflows for faster dependency installs - Add concurrency control to cancel in-progress runs on new pushes - Fix artifact name conflicts by using unique names per platform - Delete redundant mypy.yml (already runs in pre-commit) - Add Python 3.14 to ARM64 test matrix - Fix pyproject.toml: [lint] -> [tool.ruff.lint] - Fix Makefile: correct .venv path in clean, remove dead code - Update pre-commit hooks to latest versions - Fix S7DataItem deprecation warning for Python 3.19 compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a23605d commit f6af92c

17 files changed

Lines changed: 117 additions & 80 deletions

.github/workflows/doc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
710
jobs:
811
build:
912
runs-on: ubuntu-24.04
@@ -16,6 +19,8 @@ jobs:
1619
python-version: "3.10"
1720
- name: Install uv
1821
uses: astral-sh/setup-uv@v5
22+
with:
23+
enable-cache: true
1924
- name: Install dependencies
2025
run: |
2126
uv venv

.github/workflows/linux-build-test-amd64.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
710
jobs:
811
linux-build-amd64:
912
name: Build wheel for linux AMD64
@@ -27,7 +30,7 @@ jobs:
2730
- name: Upload artifacts
2831
uses: actions/upload-artifact@v4
2932
with:
30-
name: dist
33+
name: dist-linux-amd64
3134
path: dist/*.whl
3235

3336

@@ -51,11 +54,13 @@ jobs:
5154

5255
- name: Install uv
5356
uses: astral-sh/setup-uv@v5
57+
with:
58+
enable-cache: true
5459

5560
- name: Download artifacts
5661
uses: actions/download-artifact@v4
5762
with:
58-
name: dist
63+
name: dist-linux-amd64
5964
path: dist
6065

6166
- name: Install python-snap7

.github/workflows/linux-build-test-arm64.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
710
jobs:
811
linux-build-arm64:
912
name: Build wheel for linux arm64
@@ -32,7 +35,7 @@ jobs:
3235
- name: Upload artifacts
3336
uses: actions/upload-artifact@v4
3437
with:
35-
name: dist
38+
name: dist-linux-arm64
3639
path: dist/*.whl
3740

3841
linux-test-arm64:
@@ -41,15 +44,15 @@ jobs:
4144
runs-on: ubuntu-22.04
4245
strategy:
4346
matrix:
44-
python-version: ["3.10", "3.11", "3.12", "3.13"]
47+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
4548
steps:
4649
- name: Checkout
4750
uses: actions/checkout@v4
4851

4952
- name: Download artifacts
5053
uses: actions/download-artifact@v4
5154
with:
52-
name: dist
55+
name: dist-linux-arm64
5356
path: dist
5457

5558
- name: Set up QEMU

.github/workflows/linux-test-with-deb.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
710
jobs:
811
build:
912
strategy:
@@ -27,6 +30,8 @@ jobs:
2730
python-version: ${{ matrix.python-version }}
2831
- name: Install uv
2932
uses: astral-sh/setup-uv@v5
33+
with:
34+
enable-cache: true
3035
- name: Install dependencies
3136
run: |
3237
uv venv

.github/workflows/mypy.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/osx-build-test-amd64.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
710
jobs:
811

912

@@ -38,7 +41,7 @@ jobs:
3841
- name: Upload artifacts
3942
uses: actions/upload-artifact@v4
4043
with:
41-
name: dist
44+
name: dist-osx-universal
4245
path: dist/*.whl
4346

4447

@@ -62,11 +65,13 @@ jobs:
6265

6366
- name: Install uv
6467
uses: astral-sh/setup-uv@v5
68+
with:
69+
enable-cache: true
6570

6671
- name: Download artifacts
6772
uses: actions/download-artifact@v4
6873
with:
69-
name: dist
74+
name: dist-osx-universal
7075
path: dist
7176

7277
- name: Install python-snap7

.github/workflows/osx-test-with-brew.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
710
jobs:
811
osx_wheel:
912
strategy:
@@ -19,6 +22,8 @@ jobs:
1922
run: brew install --overwrite snap7 python@${{ matrix.python-version }}
2023
- name: Install uv
2124
uses: astral-sh/setup-uv@v5
25+
with:
26+
enable-cache: true
2227
- name: Install python-snap7
2328
run: |
2429
uv venv --python python${{ matrix.python-version }}

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
710
jobs:
811
pre-commit:
912
runs-on: ubuntu-latest

.github/workflows/publish-pypi.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,36 @@ jobs:
1919
uses: dawidd6/action-download-artifact@v6
2020
with:
2121
workflow: osx-build-test-amd64.yml
22-
path: .
22+
name: dist-osx-universal
23+
path: dist
2324
- name: "Download Linux/amd64 artifacts"
2425
uses: dawidd6/action-download-artifact@v6
2526
with:
2627
workflow: linux-build-test-amd64.yml
27-
path: .
28+
name: dist-linux-amd64
29+
path: dist
2830
- name: "Download Linux/arm64 artifacts"
2931
uses: dawidd6/action-download-artifact@v6
3032
with:
3133
workflow: linux-build-test-arm64.yml
32-
path: .
34+
name: dist-linux-arm64
35+
path: dist
3336
- name: "Download Windows artifacts"
3437
uses: dawidd6/action-download-artifact@v6
3538
with:
3639
workflow: windows-build-test-amd64.yml
37-
path: .
40+
name: dist-windows-amd64
41+
path: dist
3842
- name: "Download source artifacts"
3943
uses: dawidd6/action-download-artifact@v6
4044
with:
4145
workflow: source-build.yml
42-
path: .
46+
name: dist-source
47+
path: dist
4348
- name: Combine artifacts
4449
uses: actions/upload-artifact@v4
4550
with:
51+
name: dist-combined
4652
path: dist
4753
- name: show dist layout
4854
run: find dist
@@ -66,6 +72,8 @@ jobs:
6672

6773
- name: Install uv
6874
uses: astral-sh/setup-uv@v5
75+
with:
76+
enable-cache: true
6977

7078
- name: install python-snap7
7179
run: |
@@ -90,6 +98,8 @@ jobs:
9098

9199
- name: Install uv
92100
uses: astral-sh/setup-uv@v5
101+
with:
102+
enable-cache: true
93103

94104
- name: install python-snap7
95105
run: |

.github/workflows/publish-test-pypi.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,36 @@ jobs:
1919
uses: dawidd6/action-download-artifact@v6
2020
with:
2121
workflow: osx-build-test-amd64.yml
22-
path: .
22+
name: dist-osx-universal
23+
path: dist
2324
- name: "Download Linux/amd64 artifacts"
2425
uses: dawidd6/action-download-artifact@v6
2526
with:
2627
workflow: linux-build-test-amd64.yml
27-
path: .
28+
name: dist-linux-amd64
29+
path: dist
2830
- name: "Download Linux/arm64 artifacts"
2931
uses: dawidd6/action-download-artifact@v6
3032
with:
3133
workflow: linux-build-test-arm64.yml
32-
path: .
34+
name: dist-linux-arm64
35+
path: dist
3336
- name: "Download Windows artifacts"
3437
uses: dawidd6/action-download-artifact@v6
3538
with:
3639
workflow: windows-build-test-amd64.yml
37-
path: .
40+
name: dist-windows-amd64
41+
path: dist
3842
- name: "Download source artifacts"
3943
uses: dawidd6/action-download-artifact@v6
4044
with:
4145
workflow: source-build.yml
42-
path: .
46+
name: dist-source
47+
path: dist
4348
- name: Combine artifacts
4449
uses: actions/upload-artifact@v4
4550
with:
51+
name: dist-combined
4652
path: dist
4753
- name: show dist layout
4854
run: find dist
@@ -69,6 +75,8 @@ jobs:
6975

7076
- name: Install uv
7177
uses: astral-sh/setup-uv@v5
78+
with:
79+
enable-cache: true
7280

7381
- name: install python-snap7
7482
run: |
@@ -93,6 +101,8 @@ jobs:
93101

94102
- name: Install uv
95103
uses: astral-sh/setup-uv@v5
104+
with:
105+
enable-cache: true
96106

97107
- name: install python-snap7
98108
run: |

0 commit comments

Comments
 (0)