Skip to content

Commit 3da53e3

Browse files
authored
Merge pull request #11 from breezy-team/rust
Port to rust
2 parents 2c9ca06 + cb0a858 commit 3da53e3

179 files changed

Lines changed: 7853 additions & 9410 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Publish
3+
4+
"on":
5+
push:
6+
tags:
7+
- "v*"
8+
workflow_dispatch:
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
environment: crates-io
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install Breezy
22+
run: |
23+
pip install 'breezy>=3.3.6'
24+
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
28+
- uses: Swatinem/rust-cache@v2
29+
30+
- name: Verify package builds
31+
run: cargo package --verbose
32+
33+
- name: Authenticate to crates.io
34+
uses: rust-lang/crates-io-auth-action@v1
35+
id: auth
36+
37+
- name: Publish to crates.io
38+
env:
39+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
40+
run: cargo publish

.github/workflows/test.yaml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,36 @@ name: Test
33

44
"on":
55
push:
6-
branches: [master]
6+
branches: [master, rust]
77
pull_request:
8-
branches: [master]
8+
branches: [master, rust]
99

1010
jobs:
1111
test:
1212
runs-on: ubuntu-latest
13-
strategy:
14-
matrix:
15-
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
1613

1714
steps:
1815
- uses: actions/checkout@v4
1916

20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v5
17+
- name: Install Breezy
18+
run: |
19+
pip install 'breezy>=3.3.6'
20+
21+
- name: Install Rust toolchain
22+
uses: dtolnay/rust-toolchain@stable
2223
with:
23-
python-version: ${{ matrix.python-version }}
24+
components: rustfmt, clippy
2425

25-
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install ".[dev]"
26+
- uses: Swatinem/rust-cache@v2
2927

30-
- name: Run unit tests
31-
run: |
32-
export BRZ_PLUGINS_AT=loggerhead@$(pwd)
33-
brz selftest -s bp.loggerhead
28+
- name: Check formatting
29+
run: cargo fmt --all -- --check
30+
31+
- name: Clippy
32+
run: cargo clippy --all-targets --all-features -- -D warnings
33+
34+
- name: Build
35+
run: cargo build --all-targets --verbose
36+
37+
- name: Run tests
38+
run: cargo test --all-features --verbose

.gitignore

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
./dist
2-
./loggerhead.egg-info
3-
./loggerhead.pid
1+
/target
42
./logs
5-
build
63
*.log
7-
_trial_temp
8-
loggerhead-memprofile
9-
./docs/_build/
4+
/docs/book/
105
tags
11-
.project
12-
.pydevproject
13-
.testrepository
14-
MANIFEST
15-
.tox
16-
__pycache__
17-
loggerhead.egg-info/
186
*~

0 commit comments

Comments
 (0)