zenyard-relay 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,161 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ pull_request:
8
+ branches: [main]
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ env:
15
+ CARGO_TERM_COLOR: always
16
+ RUST_BACKTRACE: 1
17
+ CARGO_INCREMENTAL: 0
18
+
19
+ jobs:
20
+ test:
21
+ name: test
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
25
+
26
+ - name: Install Rust toolchain
27
+ # pinned to the 1.95.0 branch head, matching Cargo.toml rust-version
28
+ uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0
29
+ with:
30
+ components: clippy, rustfmt
31
+
32
+ - name: Cache cargo registry + target
33
+ uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
34
+ with:
35
+ cache-on-failure: true
36
+
37
+ - name: Format check
38
+ run: cargo fmt --all -- --check
39
+
40
+ - name: Clippy
41
+ run: cargo clippy --workspace --all-targets -- -D warnings
42
+
43
+ - name: Test
44
+ run: cargo test --workspace --release
45
+
46
+ version-check:
47
+ name: version check
48
+ runs-on: ubuntu-latest
49
+ steps:
50
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
51
+ - name: Verify tag matches Cargo.toml version
52
+ if: startsWith(github.ref, 'refs/tags/v')
53
+ run: |
54
+ tag_version="${GITHUB_REF_NAME#v}"
55
+ cargo_version="$(grep -m1 '^version = ' Cargo.toml | sed -E 's/^version = "(.+)"/\1/')"
56
+ if [ "$tag_version" != "$cargo_version" ]; then
57
+ echo "::error::Tag ${GITHUB_REF_NAME} (version ${tag_version}) does not match Cargo.toml version ${cargo_version}"
58
+ exit 1
59
+ fi
60
+ echo "Tag ${GITHUB_REF_NAME} matches Cargo.toml version ${cargo_version}"
61
+
62
+ wheels:
63
+ name: wheel ${{ matrix.target }}
64
+ needs: [test, version-check]
65
+ if: github.event_name != 'pull_request'
66
+ runs-on: ${{ matrix.runner }}
67
+ strategy:
68
+ fail-fast: false
69
+ matrix:
70
+ include:
71
+ - target: x86_64-unknown-linux-gnu
72
+ runner: ubuntu-latest
73
+ manylinux: auto
74
+ - target: aarch64-unknown-linux-gnu
75
+ runner: ubuntu-latest
76
+ manylinux: "2_28"
77
+ - target: x86_64-unknown-linux-musl
78
+ runner: ubuntu-latest
79
+ manylinux: musllinux_1_2
80
+ - target: aarch64-unknown-linux-musl
81
+ runner: ubuntu-latest
82
+ manylinux: musllinux_1_2
83
+ - target: x86_64-apple-darwin
84
+ runner: macos-latest
85
+ manylinux: "off"
86
+ - target: aarch64-apple-darwin
87
+ runner: macos-latest
88
+ manylinux: "off"
89
+ - target: x86_64-pc-windows-msvc
90
+ runner: windows-latest
91
+ manylinux: "off"
92
+
93
+ steps:
94
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
95
+
96
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
97
+ with:
98
+ python-version: "3.12"
99
+
100
+ - name: Exclude cargo/target from Defender (Windows)
101
+ if: runner.os == 'Windows'
102
+ shell: pwsh
103
+ run: |
104
+ Add-MpPreference -ExclusionPath "$env:USERPROFILE\.cargo"
105
+ Add-MpPreference -ExclusionPath "$env:GITHUB_WORKSPACE\target"
106
+ Add-MpPreference -ExclusionProcess "cargo.exe"
107
+ Add-MpPreference -ExclusionProcess "rustc.exe"
108
+ Add-MpPreference -ExclusionProcess "link.exe"
109
+
110
+ - name: Build wheel
111
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
112
+ with:
113
+ target: ${{ matrix.target }}
114
+ manylinux: ${{ matrix.manylinux }}
115
+ args: --release --out dist
116
+ sccache: true
117
+
118
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
119
+ with:
120
+ name: wheels-${{ matrix.target }}
121
+ path: dist/*.whl
122
+
123
+ sdist:
124
+ name: sdist
125
+ needs: [test, version-check]
126
+ if: github.event_name != 'pull_request'
127
+ runs-on: ubuntu-latest
128
+ steps:
129
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
130
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
131
+ with:
132
+ python-version: "3.12"
133
+ - name: Build sdist
134
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
135
+ with:
136
+ command: sdist
137
+ args: --out dist
138
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
139
+ with:
140
+ name: sdist
141
+ path: dist/*.tar.gz
142
+
143
+ publish:
144
+ name: publish
145
+ needs: [wheels, sdist]
146
+ if: startsWith(github.ref, 'refs/tags/v')
147
+ runs-on: ubuntu-latest
148
+ environment: pypi
149
+ permissions:
150
+ id-token: write
151
+ steps:
152
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
153
+ with:
154
+ path: dist
155
+ merge-multiple: true
156
+ - name: List artifacts
157
+ run: ls -la dist
158
+ - name: Publish to PyPI
159
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
160
+ with:
161
+ packages-dir: dist
@@ -0,0 +1,19 @@
1
+ /target/
2
+ Cargo.lock.bak
3
+ **/*.rs.bk
4
+
5
+ __pycache__/
6
+ *.py[cod]
7
+ *.egg-info/
8
+ .venv/
9
+ venv/
10
+ .pytest_cache/
11
+ .ruff_cache/
12
+ .mypy_cache/
13
+ build/
14
+ dist/
15
+ *.log
16
+ .coverage
17
+ htmlcov/
18
+ .claude/settings.local.json
19
+ .claude/worktrees