-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (69 loc) · 1.96 KB
/
Copy pathci.yml
File metadata and controls
94 lines (69 loc) · 1.96 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
name: Rust CI
on:
push:
branches: [ "main", "dev" ]
tags: [ "v*" ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint with clippy
run: cargo clippy -- -D warnings
- name: Run cargo check
run: cargo check --workspace
- name: Run tests
run: cargo test --workspace
- name: Run tests (with parallel feature)
run: cargo test --workspace --features parallel
- name: Run tests (with simd feature)
run: cargo test --workspace --features simd
- name: Run tests (with ndarray feature)
run: cargo test --workspace --features ndarray
wasm-build:
name: WASM Dual Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build WASM module (Dual Mode)
run: npm run build:wasm
- name: Upload WASM Package
uses: actions/upload-artifact@v7
with:
name: wasm-package
path: crates/wasm/pkg
benchmarks:
name: Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run benchmarks
run: cargo bench
- name: Upload benchmark reports
uses: actions/upload-artifact@v7
with:
name: benchmark-reports
path: target/criterion