Skip to content

Commit 148b1eb

Browse files
committed
🚧 Initialize the basic compilation flow
1 parent fd50bc0 commit 148b1eb

File tree

200 files changed

+16960
-88
lines changed

Some content is hidden

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

200 files changed

+16960
-88
lines changed

.github/workflows/ci.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, dev ]
6+
pull_request:
7+
branches: [ master, dev ]
8+
9+
jobs:
10+
# 1. 检查阶段:Lint, Format, Typecheck
11+
check:
12+
name: Check (Rust & TS)
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
# Setup Rust
18+
- name: Install Rust
19+
uses: dtolnay/rust-toolchain@stable
20+
with:
21+
components: rustfmt, clippy
22+
23+
# Setup Node/pnpm
24+
- uses: pnpm/action-setup@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: 'pnpm'
29+
30+
# Install Dependencies
31+
- name: Install TS Dependencies
32+
run: pnpm install
33+
34+
# Rust Checks
35+
- name: Rust Format Check
36+
run: cargo fmt --all -- --check
37+
- name: Rust Clippy
38+
run: cargo clippy --all-targets --all-features -- -D warnings
39+
40+
# TS Checks
41+
- name: TS Biome Check
42+
run: pnpm biome check .
43+
- name: TS Typecheck
44+
run: pnpm typecheck
45+
46+
# 2. 构建与测试阶段:Build & Test (Matrix OS)
47+
build-test:
48+
name: Build & Test
49+
needs: check
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
matrix:
53+
os: [ubuntu-latest, macos-latest, windows-latest]
54+
steps:
55+
- uses: actions/checkout@v4
56+
57+
# Setup Rust
58+
- name: Install Rust
59+
uses: dtolnay/rust-toolchain@stable
60+
with:
61+
targets: wasm32-wasip2
62+
63+
# Setup Node/pnpm
64+
- uses: pnpm/action-setup@v4
65+
- uses: actions/setup-node@v4
66+
with:
67+
node-version: 20
68+
cache: 'pnpm'
69+
70+
# Install Dependencies
71+
- name: Install TS Dependencies
72+
run: pnpm install
73+
74+
# Rust Build & Test (包括 WASM)
75+
- name: Rust Build
76+
run: cargo build --verbose
77+
- name: Rust Test
78+
run: cargo test --verbose
79+
- name: Build WASM Target
80+
run: cargo build -p hxo-target-wasm --target wasm32-wasip2 --release
81+
82+
# TS Build & Test (直接使用同环境构建出的 WASM)
83+
- name: TS Build
84+
run: pnpm build
85+
- name: TS Test
86+
run: pnpm test

.github/workflows/rust.yml

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

.gitignore

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# OS
2-
.DS_Store/**/*
32

4-
# IDE
5-
.vscode/**/*
6-
.vs/**/*
7-
.idea/**/*
8-
*.iml
3+
# Editor
4+
.idea/
5+
96

107
# Rust
11-
target/**/*
12-
Cargo.lock
8+
/target
9+
10+
11+
# Node
12+
node_modules/

0 commit comments

Comments
 (0)