-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (131 loc) · 5.6 KB
/
Copy pathci.yml
File metadata and controls
142 lines (131 loc) · 5.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: CI # Continuous Integration
on:
push:
branches:
- main
pull_request:
# Lets the release workflow run the full suite as a gate before it builds.
workflow_call:
# Least privilege: CI only reads the repo. No job needs write scope on GITHUB_TOKEN.
permissions:
contents: read
# Third-party actions are pinned to commit SHAs (not mutable @v4 / @stable refs) so
# an upstream maintainer compromise cannot silently introduce a new payload into our
# CI runs. Version tag in the trailing comment is informational only — update via
# Dependabot (`.github/dependabot.yml`).
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.2 (Node 24)
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-05
with:
toolchain: stable
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
- name: Run tests
run: cargo test --all-features --workspace
- name: Build chela-bundle and produce chela.html (smoke)
run: |
cargo build --release --locked --bin chela-bundle
./target/release/chela-bundle /tmp/chela.html
test -s /tmp/chela.html
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.2 (Node 24)
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-05
with:
toolchain: stable
components: rustfmt
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
- name: Check formatting
run: cargo fmt --all --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.2 (Node 24)
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-05
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
- name: Clippy check
run: cargo clippy --all-targets --all-features --workspace -- -D warnings
wasm:
name: WASM build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.2 (Node 24)
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-05
with:
toolchain: stable
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
- name: Build core crates for wasm32-unknown-unknown
# Library crates making up the cryptographic core must stay WASM-buildable so the
# future browser webapp remains viable. Binary crates (chela-tui, chela-cli) are
# native-only by design and skipped here.
run: |
cargo build --target wasm32-unknown-unknown -p chela-primitives
cargo build --target wasm32-unknown-unknown -p chela-field
cargo build --target wasm32-unknown-unknown -p chela-sss
cargo build --target wasm32-unknown-unknown -p chela-bip39
cargo build --target wasm32-unknown-unknown -p chela-share
cargo build --target wasm32-unknown-unknown -p chela-engine
windows:
name: Windows build
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.2 (Node 24)
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-05
with:
toolchain: stable
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
- name: Build the workspace
run: cargo build --workspace --all-features
- name: Run the test suite
run: cargo test --workspace --all-features
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.2 (Node 24)
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-05
with:
toolchain: stable
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --document-private-items --all-features --workspace
msrv:
name: MSRV (1.89)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.2 (Node 24)
- name: Install Rust 1.89 (the declared rust-version)
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-05
with:
toolchain: "1.89"
# chela-bundle's build script compiles chela-wasm for this target.
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
- name: cargo check on the minimum supported Rust version
run: cargo check --workspace --all-targets