coren 0.1.1__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,4 @@
1
+ # Copy to .cargo-credentials and fill in your token.
2
+ # Get a token at: https://crates.io/settings/tokens
3
+ [registry]
4
+ token = "cio_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
@@ -0,0 +1,11 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+ container: rust:latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - run: cargo test
11
+ - run: cargo clippy -- -D warnings
@@ -0,0 +1,139 @@
1
+ name: Release
2
+ on:
3
+ push:
4
+ tags: ["v*"]
5
+
6
+ jobs:
7
+ wheels:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ target:
12
+ - x86_64-unknown-linux-gnu
13
+ - aarch64-unknown-linux-gnu
14
+ - x86_64-apple-darwin
15
+ - aarch64-apple-darwin
16
+ - x86_64-pc-windows-gnu
17
+ container: ghcr.io/pyo3/maturin:latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Install uv
21
+ run: curl -LsSf https://astral.sh/uv/install.sh | sh && echo "$HOME/.local/bin" >> $GITHUB_PATH
22
+ - name: Build wheel
23
+ run: |
24
+ if echo "${{ matrix.target }}" | grep -qE "apple|windows"; then
25
+ uv tool install maturin[zig]
26
+ uv run maturin build --release --strip --zig \
27
+ --target ${{ matrix.target }} -o dist/
28
+ else
29
+ uv run maturin build --release --strip \
30
+ --target ${{ matrix.target }} -o dist/
31
+ fi
32
+ - uses: actions/upload-artifact@v4
33
+ with:
34
+ name: wheel-${{ matrix.target }}
35
+ path: dist/*.whl
36
+
37
+ sdist:
38
+ runs-on: ubuntu-latest
39
+ container: ghcr.io/pyo3/maturin:latest
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - name: Install uv
43
+ run: curl -LsSf https://astral.sh/uv/install.sh | sh && echo "$HOME/.local/bin" >> $GITHUB_PATH
44
+ - run: uv run maturin sdist -o dist/
45
+ - uses: actions/upload-artifact@v4
46
+ with:
47
+ name: sdist
48
+ path: dist/*.tar.gz
49
+
50
+ binaries:
51
+ runs-on: ubuntu-latest
52
+ container: rust:latest
53
+ strategy:
54
+ matrix:
55
+ include:
56
+ - target: x86_64-unknown-linux-gnu
57
+ name: coren-linux-x86_64
58
+ - target: aarch64-unknown-linux-gnu
59
+ name: coren-linux-aarch64
60
+ - target: x86_64-apple-darwin
61
+ name: coren-macos-x86_64
62
+ - target: aarch64-apple-darwin
63
+ name: coren-macos-aarch64
64
+ - target: x86_64-pc-windows-gnu
65
+ name: coren-windows-x86_64.exe
66
+ steps:
67
+ - uses: actions/checkout@v4
68
+ - name: Install zigbuild
69
+ run: |
70
+ pip3 install cargo-zigbuild 2>/dev/null || pip install cargo-zigbuild
71
+ rustup target add ${{ matrix.target }}
72
+ - name: Build binary
73
+ run: |
74
+ cargo zigbuild --release --bin coren --target ${{ matrix.target }}
75
+ cp target/${{ matrix.target }}/release/coren* ${{ matrix.name }}
76
+ - uses: actions/upload-artifact@v4
77
+ with:
78
+ name: ${{ matrix.name }}
79
+ path: ${{ matrix.name }}
80
+
81
+ publish-pypi:
82
+ needs: [wheels, sdist]
83
+ runs-on: ubuntu-latest
84
+ container: python:3.13-slim
85
+ steps:
86
+ - name: Install uv
87
+ run: curl -LsSf https://astral.sh/uv/install.sh | sh && echo "$HOME/.local/bin" >> $GITHUB_PATH
88
+ - uses: actions/download-artifact@v4
89
+ with:
90
+ path: artifacts/
91
+ - name: Write .pypirc and upload
92
+ run: |
93
+ cat > ~/.pypirc <<EOF
94
+ [pypi]
95
+ username = __token__
96
+ password = ${{ secrets.PYPI_TOKEN }}
97
+ EOF
98
+ chmod 600 ~/.pypirc
99
+ uv tool install twine
100
+ uv run twine upload --non-interactive \
101
+ artifacts/wheel-*/*.whl \
102
+ artifacts/sdist/*.tar.gz
103
+
104
+ publish-crates:
105
+ needs: [wheels]
106
+ runs-on: ubuntu-latest
107
+ container: rust:latest
108
+ steps:
109
+ - uses: actions/checkout@v4
110
+ - run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
111
+
112
+ release:
113
+ needs: [binaries, publish-pypi]
114
+ runs-on: ubuntu-latest
115
+ container: alpine:latest
116
+ steps:
117
+ - run: apk add curl jq
118
+ - uses: actions/download-artifact@v4
119
+ with:
120
+ path: artifacts/
121
+ - name: Create Codeberg release with binaries
122
+ run: |
123
+ # Forgejo sets GITEA_REF_NAME; GITHUB_REF_NAME also available
124
+ # for compatibility but prefer the native var.
125
+ TAG="${GITEA_REF_NAME:-${GITHUB_REF_NAME}}"
126
+ RELEASE_ID=$(curl -s -X POST \
127
+ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
128
+ -H "Content-Type: application/json" \
129
+ -d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"body\":\"Release ${TAG}\"}" \
130
+ "https://codeberg.org/api/v1/repos/chaxor/coren/releases" | jq -r '.id')
131
+
132
+ for f in artifacts/coren-*/coren-*; do
133
+ [ -f "$f" ] || continue
134
+ NAME=$(basename "$f")
135
+ curl -s -X POST \
136
+ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
137
+ -F "attachment=@${f}" \
138
+ "https://codeberg.org/api/v1/repos/chaxor/coren/releases/${RELEASE_ID}/assets?name=${NAME}"
139
+ done
coren-0.1.1/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /target/
2
+ __pycache__/
3
+ *.pyc
4
+ *.so
5
+ *.pyd
6
+ *.egg-info/
7
+ .pytest_cache/
8
+
9
+ # Credentials (NEVER commit these)
10
+ .pypirc
11
+ .cargo-credentials
12
+ .release-token
@@ -0,0 +1,7 @@
1
+ # Copy to .pypirc and fill in your token.
2
+ # Get a token at: https://pypi.org/manage/account/token/
3
+ # After first upload, create a project-scoped token at:
4
+ # https://pypi.org/manage/project/coren/settings/
5
+ [pypi]
6
+ username = __token__
7
+ password = pypi-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,4 @@
1
+ # Copy to .release-token and fill in your token.
2
+ # Create at: Codeberg > Settings > Applications > Generate New Token
3
+ # Required scope: write:repository
4
+ RELEASE_TOKEN=codeberg_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX