Skip to content

Commit 959c9cf

Browse files
committed
init
0 parents  commit 959c9cf

36 files changed

Lines changed: 11961 additions & 0 deletions

.github/workflows/wheels.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Wheels
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-wheels:
14+
name: ${{ matrix.os_name }}
15+
runs-on: ${{ matrix.runner }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- os_name: linux
21+
runner: ubuntu-latest
22+
- os_name: macos
23+
runner: macos-15-intel
24+
25+
steps:
26+
- name: Check out repository
27+
uses: actions/checkout@v6
28+
with:
29+
persist-credentials: false
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v6
33+
with:
34+
python-version: "3.13"
35+
36+
- name: Set up uv
37+
uses: astral-sh/setup-uv@v6
38+
39+
- name: Set up Rust
40+
uses: dtolnay/rust-toolchain@stable
41+
with:
42+
toolchain: 1.94.0
43+
44+
- name: Cache Cargo registry and target
45+
uses: Swatinem/rust-cache@v2
46+
47+
- name: Build wheels
48+
run: scripts/build-wheels.sh --out dist
49+
50+
- name: Upload wheel artifacts
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: wheels-${{ matrix.os_name }}
54+
path: dist/*.whl
55+
if-no-files-found: error
56+
57+
build-sdist:
58+
name: sdist
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Check out repository
62+
uses: actions/checkout@v6
63+
with:
64+
persist-credentials: false
65+
66+
- name: Set up Python
67+
uses: actions/setup-python@v6
68+
with:
69+
python-version: "3.13"
70+
71+
- name: Set up uv
72+
uses: astral-sh/setup-uv@v6
73+
74+
- name: Set up Rust
75+
uses: dtolnay/rust-toolchain@stable
76+
with:
77+
toolchain: 1.94.0
78+
79+
- name: Cache Cargo registry and target
80+
uses: Swatinem/rust-cache@v2
81+
82+
- name: Build source distribution
83+
run: uv run --no-project --with maturin maturin sdist --out dist
84+
85+
- name: Upload source distribution
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: sdist
89+
path: dist/*.tar.gz
90+
if-no-files-found: error
91+
92+
publish-pypi:
93+
name: publish
94+
if: startsWith(github.ref, 'refs/tags/v')
95+
needs:
96+
- build-wheels
97+
- build-sdist
98+
runs-on: ubuntu-latest
99+
permissions:
100+
contents: read
101+
id-token: write
102+
environment:
103+
name: pypi
104+
url: https://pypi.org/project/rsloop/
105+
steps:
106+
- name: Download release artifacts
107+
uses: actions/download-artifact@v4
108+
with:
109+
path: dist
110+
merge-multiple: true
111+
112+
- name: Publish to PyPI
113+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
target/
2+
.venv/
3+
__pycache__/
4+
dist/
5+
tmp/
6+
7+
*.so
8+
9+
python/uvloop_rust_impl/_loop
10+
11+
benchmarks/profiles*
12+
benchmarks/compare_event_loops.results.json

0 commit comments

Comments
 (0)