sshline 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,64 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ rust:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: dtolnay/rust-toolchain@stable
14
+ with:
15
+ components: rustfmt, clippy
16
+ - uses: Swatinem/rust-cache@v2
17
+ - name: Check Rust formatting
18
+ run: cargo fmt --all -- --check
19
+ - name: Run Clippy
20
+ run: cargo clippy --all-targets -- -D warnings
21
+
22
+ python-lint:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - name: Check Python lints
27
+ uses: astral-sh/ruff-action@v3
28
+ - name: Check Python formatting
29
+ uses: astral-sh/ruff-action@v3
30
+ with:
31
+ args: "format --check"
32
+
33
+ wheels:
34
+ needs: [rust, python-lint]
35
+ strategy:
36
+ fail-fast: false
37
+ matrix:
38
+ os: [ubuntu-latest, macos-latest, windows-latest]
39
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
40
+ runs-on: ${{ matrix.os }}
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+ - uses: actions/setup-python@v5
44
+ with:
45
+ python-version: ${{ matrix.python-version }}
46
+ - uses: dtolnay/rust-toolchain@stable
47
+ - uses: Swatinem/rust-cache@v2
48
+ - name: Install build tools
49
+ run: python -m pip install --upgrade pip maturin==1.16.0
50
+ - name: Build, install, and verify wheel
51
+ shell: bash
52
+ run: |
53
+ set -euo pipefail
54
+ maturin build --release --out dist
55
+ python -m venv .venv-test
56
+ if [ -f .venv-test/Scripts/python.exe ]; then
57
+ PY=.venv-test/Scripts/python.exe
58
+ else
59
+ PY=.venv-test/bin/python
60
+ fi
61
+ "$PY" -m pip install --upgrade pip
62
+ "$PY" -m pip install --force-reinstall dist/*.whl pytest mypy
63
+ "$PY" -m mypy tests python/sshline
64
+ "$PY" -m pytest tests -v
@@ -0,0 +1,111 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ sdist:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - name: Build source distribution
14
+ uses: PyO3/maturin-action@v1
15
+ with:
16
+ command: sdist
17
+ args: --out dist
18
+ - name: Upload sdist artifact
19
+ uses: actions/upload-artifact@v4
20
+ with:
21
+ name: dist-sdist
22
+ path: dist/*.tar.gz
23
+
24
+ linux:
25
+ runs-on: ubuntu-latest
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ target: [x86_64, aarch64]
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - uses: Swatinem/rust-cache@v2
33
+ - name: Build manylinux_2_28 abi3 wheel
34
+ uses: PyO3/maturin-action@v1
35
+ with:
36
+ target: ${{ matrix.target }}
37
+ manylinux: "2_28"
38
+ args: --release -i python3.12 --out dist
39
+ - name: Upload Linux wheel
40
+ uses: actions/upload-artifact@v4
41
+ with:
42
+ name: dist-linux-${{ matrix.target }}
43
+ path: dist/*.whl
44
+
45
+ macos:
46
+ runs-on: macos-latest
47
+ strategy:
48
+ fail-fast: false
49
+ matrix:
50
+ target: [aarch64, x86_64]
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: actions/setup-python@v5
54
+ with:
55
+ python-version: "3.12"
56
+ - uses: dtolnay/rust-toolchain@stable
57
+ - uses: Swatinem/rust-cache@v2
58
+ - name: Build macOS abi3 wheel
59
+ uses: PyO3/maturin-action@v1
60
+ with:
61
+ target: ${{ matrix.target }}
62
+ args: --release --out dist
63
+ - name: Upload macOS wheel
64
+ uses: actions/upload-artifact@v4
65
+ with:
66
+ name: dist-macos-${{ matrix.target }}
67
+ path: dist/*.whl
68
+
69
+ windows:
70
+ runs-on: windows-latest
71
+ strategy:
72
+ fail-fast: false
73
+ matrix:
74
+ target: [x64]
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+ - uses: actions/setup-python@v5
78
+ with:
79
+ python-version: "3.12"
80
+ - uses: dtolnay/rust-toolchain@stable
81
+ - uses: Swatinem/rust-cache@v2
82
+ - name: Build Windows abi3 wheel
83
+ uses: PyO3/maturin-action@v1
84
+ with:
85
+ target: ${{ matrix.target }}
86
+ args: --release --out dist
87
+ - name: Upload Windows wheel
88
+ uses: actions/upload-artifact@v4
89
+ with:
90
+ name: dist-windows-${{ matrix.target }}
91
+ path: dist/*.whl
92
+
93
+ publish:
94
+ name: Publish to PyPI
95
+ needs: [sdist, linux, macos, windows]
96
+ runs-on: ubuntu-latest
97
+ environment:
98
+ name: pypi
99
+ url: https://pypi.org/p/sshline
100
+ permissions:
101
+ id-token: write
102
+ steps:
103
+ - name: Download all release distributions
104
+ uses: actions/download-artifact@v4
105
+ with:
106
+ path: dist
107
+ merge-multiple: true
108
+ - name: Publish via Trusted Publishing
109
+ uses: pypa/gh-action-pypi-publish@release/v1
110
+ with:
111
+ packages-dir: dist/
@@ -0,0 +1,22 @@
1
+ # Rust
2
+ /target/
3
+ **/*.rs.bk
4
+
5
+ # Python
6
+ __pycache__/
7
+ *.py[cod]
8
+ *.so
9
+ *.pyd
10
+ *.whl
11
+ .pytest_cache/
12
+ .ruff_cache/
13
+ .mypy_cache/
14
+ .venv/
15
+ venv/
16
+ dist/
17
+ build/
18
+ *.egg-info/
19
+
20
+ # OS / Editor
21
+ .DS_Store
22
+ Thumbs.db