Skip to content

Commit 12a2763

Browse files
authored
refactor: crate names, paths, other nits (#553)
* chore: update README * refactor: rename crates/paths * Update lint.yaml * fix: build * refactor: error naming * Update main.rs * fix: reference to `errors` module * feat: `udeps` in CI * Update lint.yaml * fix: clippy throws on warns * fix: lint in client * fix: lint in notary * feat: test workflows * add test to `web-prover.yaml` * Update lint.yaml * remove binstall * fix: workflows * Update check.yaml * fix: release profile
1 parent 7fd26ba commit 12a2763

32 files changed

+325
-282
lines changed

.github/workflows/build_client_native.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ jobs:
2727
rust-cache-key: client_native
2828

2929
- run: |
30-
cargo build -p client --release
30+
cargo build -p web-prover-client --release
3131
3232
- uses: actions/upload-artifact@v4
3333
if: matrix.os == 'ubuntu-latest'
3434
with:
35-
name: "client.linux.amd64"
36-
path: "target/release/client"
35+
name: "web-prover-client.linux.amd64"
36+
path: "target/release/web-prover-client"
3737
retention-days: 7
3838
if-no-files-found: "error"
3939

4040
- uses: actions/upload-artifact@v4
4141
if: matrix.os == 'macos-latest'
4242
with:
43-
name: "client.macos.arm64"
44-
path: "target/release/client"
43+
name: "web-prover-client.macos.arm64"
44+
path: "target/release/web-prover-client"
4545
retention-days: 7
4646
if-no-files-found: "error"

.github/workflows/build_notary.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
with:
2727
rust-cache-key: client_notary
2828

29-
- run: cargo build -p notary --release
29+
- run: cargo build -p web-prover-notary --release
3030

3131
- uses: actions/upload-artifact@v4
3232
if: matrix.os == 'ubuntu-latest'
3333
with:
3434
name: "notary.linux.amd64"
35-
path: "target/release/notary"
35+
path: "target/release/web-prover-notary"
3636
retention-days: 7
3737
if-no-files-found: "error"

.github/workflows/check.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Check
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
check:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
check: [clippy, test, udeps]
13+
crate: [web-prover-notary, web-prover-client, web-prover-core]
14+
include:
15+
- check: fmt
16+
crate: all
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
# Setup Rust with cache key based on check type
21+
- uses: ./.github/actions/setup-rust-ubuntu
22+
with:
23+
rust-cache-key: ${{ matrix.check }}
24+
25+
# Install necessary tools based on check type
26+
- name: Install cargo-binstall
27+
if: matrix.check == 'udeps'
28+
uses: cargo-bins/cargo-binstall@main
29+
30+
- name: Install cargo-udeps
31+
if: matrix.check == 'udeps'
32+
run: cargo binstall --no-confirm cargo-udeps
33+
34+
- name: Install rustfmt
35+
if: matrix.check == 'fmt'
36+
run: rustup component add rustfmt
37+
38+
# Run the appropriate check
39+
- name: Run clippy
40+
if: matrix.check == 'clippy'
41+
continue-on-error: true
42+
run: cargo clippy -p ${{ matrix.crate }} -- -D warnings
43+
44+
- name: Run tests
45+
if: matrix.check == 'test'
46+
run: cargo test -p ${{ matrix.crate }}
47+
48+
- name: Check fmt
49+
if: matrix.check == 'fmt'
50+
continue-on-error: true
51+
run: cargo fmt --all -- --check
52+
53+
- name: Check unused dependencies
54+
if: matrix.check == 'udeps'
55+
continue-on-error: true
56+
run: cargo udeps -p ${{ matrix.crate }}

.github/workflows/lint.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
shell: bash
2828
run: |
2929
mkdir -p releases/clients
30-
cp target/release/client.linux.amd64/client releases/clients/client.linux.amd64
31-
cp target/release/client.macos.arm64/client releases/clients/client.macos.arm64
30+
cp target/release/web-prover-client.linux.amd64/web-prover-client releases/clients/client.linux.amd64
31+
cp target/release/web-prover-client.macos.arm64/web-prover-client releases/clients/client.macos.arm64
3232
cd releases/clients
3333
tar -czf client.linux.amd64.tar.gz client.linux.amd64
3434
rm client.linux.amd64
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
listen ="0.0.0.0:443"
2-
acme_email ="eng@pluto.xyz"
1+
acme_email="eng@pluto.xyz"
2+
listen ="0.0.0.0:443"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
acme_email ="eng@pluto.xyz"
12
listen ="0.0.0.0:443"
23
notary_signing_key="/opt/notary/etc/fixture/certs/notary.key"
3-
acme_email ="eng@pluto.xyz"

.github/workflows/web-prover.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ concurrency:
1212

1313
jobs:
1414

15-
lint:
16-
uses: ./.github/workflows/lint.yaml
15+
check:
16+
uses: ./.github/workflows/check.yaml
1717

1818
build_notary:
1919
uses: ./.github/workflows/build_notary.yaml

Cargo.lock

Lines changed: 73 additions & 73 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)