@@ -9,13 +9,68 @@ permissions:
99 pull-requests : read
1010
1111concurrency :
12- group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
12+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
1313 cancel-in-progress : true
1414
1515jobs :
16- test-build :
17- name : Build Tauri App
16+ rust-quality :
17+ name : Rust Quality (fmt + clippy)
1818 runs-on : ubuntu-22.04
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 1
24+
25+ - name : Install Rust (rust-toolchain.toml)
26+ uses : dtolnay/rust-toolchain@1.93.0
27+ with :
28+ components : rustfmt, clippy
29+
30+ - name : Install Tauri build dependencies
31+ run : |
32+ sudo apt-get update
33+ sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
34+
35+ - name : Cargo.lock fingerprint (deps only)
36+ id : cargo-lock-fingerprint
37+ shell : bash
38+ run : |
39+ echo "hash=$(tail -n +8 Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT"
40+
41+ - name : Cache Cargo registry and git sources
42+ uses : actions/cache@v4
43+ with :
44+ path : |
45+ ~/.cargo/registry
46+ ~/.cargo/git
47+ key : ${{ runner.os }}-cargo-registry-${{ steps.cargo-lock-fingerprint.outputs.hash }}
48+ restore-keys : |
49+ ${{ runner.os }}-cargo-registry-
50+
51+ - name : Check formatting (cargo fmt)
52+ run : cargo fmt --all -- --check
53+
54+ - name : Run clippy (core crate)
55+ run : cargo clippy -p openhuman -- -D warnings
56+
57+ - name : Run clippy (Tauri shell)
58+ run : cargo clippy --manifest-path app/src-tauri/Cargo.toml -- -D warnings
59+
60+ build :
61+ name : Build Tauri App (${{ matrix.settings.label }})
62+ needs : rust-quality
63+ runs-on : ${{ matrix.settings.platform }}
64+ strategy :
65+ fail-fast : false
66+ matrix :
67+ settings :
68+ - platform : ubuntu-22.04
69+ target : x86_64-unknown-linux-gnu
70+ label : Linux x86_64
71+ - platform : macos-latest
72+ target : aarch64-apple-darwin
73+ label : macOS ARM64
1974 steps :
2075 - name : Checkout code
2176 uses : actions/checkout@v4
@@ -29,12 +84,13 @@ jobs:
2984 node-version : 24.x
3085 cache : " yarn"
3186
32- - name : Install Rust stable
87+ - name : Install Rust (rust-toolchain.toml)
3388 uses : dtolnay/rust-toolchain@1.93.0
3489 with :
35- targets : x86_64-unknown-linux-gnu
90+ targets : ${{ matrix.settings.target }}
3691
37- - name : Install Tauri dependencies
92+ - name : Install Tauri dependencies (Linux)
93+ if : matrix.settings.platform == 'ubuntu-22.04'
3894 run : |
3995 sudo apt-get update
4096 sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
@@ -70,19 +126,19 @@ jobs:
70126 run : yarn install --frozen-lockfile
71127
72128 - name : Build sidecar core binary
73- run : cargo build --manifest-path Cargo.toml --release --target x86_64-unknown-linux-gnu --bin openhuman
129+ run : cargo build --manifest-path Cargo.toml --release --target ${{ matrix.settings.target }} --bin openhuman
74130
75131 - name : Stage sidecar for Tauri bundler
132+ shell : bash
76133 run : |
77134 mkdir -p app/src-tauri/binaries
78- # Release artifacts for the root package land in repo root target/
79- cp target/x86_64-unknown-linux-gnu/release/openhuman app/src-tauri/binaries/openhuman-x86_64-unknown-linux-gnu
80- chmod +x app/src-tauri/binaries/openhuman-x86_64-unknown-linux-gnu
135+ cp target/${{ matrix.settings.target }}/release/openhuman app/src-tauri/binaries/openhuman-${{ matrix.settings.target }}
136+ chmod +x app/src-tauri/binaries/openhuman-${{ matrix.settings.target }}
81137
82138 - name : Build Tauri app
83139 working-directory : app
84140 run : |
85141 TAURI_CONFIG_OVERRIDE='{"bundle":{"createUpdaterArtifacts":false}}'
86- yarn tauri build -c "$TAURI_CONFIG_OVERRIDE" --bundles none -- -- target x86_64-unknown-linux-gnu
142+ yarn tauri build -c "$TAURI_CONFIG_OVERRIDE" --bundles none --target ${{ matrix.settings. target }} -- --bin OpenHuman
87143 env :
88144 NODE_ENV : production
0 commit comments