forked from tinyhumansai/openhuman
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 3 KB
/
build.yml
File metadata and controls
80 lines (77 loc) · 3 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
---
name: Build
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
pull-requests: read
# Required for Sentry to associate commits with releases
actions: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Tauri App
runs-on: ubuntu-22.04
container:
image: ghcr.io/tinyhumansai/openhuman_ci:rust-1.93.0
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 1
submodules: recursive
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
with:
workspaces: |
. -> target
app/src-tauri -> target
cache-on-failure: true
# CEF (Chromium Embedded Framework) runtime is downloaded on-demand by
# cef-dll-sys + the vendored tauri-cli. Cache it across builds — the
# payload is ~400MB per platform and fetching every run is painful.
- name: Cache CEF binary distribution
uses: actions/cache@v5
with:
path: ~/.cache/tauri-cef
key: cef-ubuntu-22.04-${{ hashFiles('app/src-tauri/Cargo.toml') }}
restore-keys: |
cef-ubuntu-22.04-
# Note: the vendored CEF-aware tauri-cli, Node 24, and pnpm are all
# pre-installed in the ghcr.io/tinyhumansai/openhuman_ci image (see
# .github/Dockerfile), so `cargo tauri build` below resolves to the
# fork without any per-run compile step.
- name: Cache pnpm store
uses: actions/cache@v5
with:
path: ~/.local/share/pnpm/store
key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-${{ runner.os }}-
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Core is linked into the Tauri binary as a path dep — no separate
# sidecar build / stage step needed.
- name: Build Tauri app (CEF default)
working-directory: app
run: |
# Skip tsc in beforeBuildCommand — typechecking runs in the dedicated
# `typecheck` workflow, so doing it again here is duplicated CI time.
TAURI_CONFIG_OVERRIDE='{"build":{"beforeBuildCommand":"npx vite build"},"plugins":{"updater":{"active":false}}}'
cargo tauri build -c "$TAURI_CONFIG_OVERRIDE" --bundles deb
env:
NODE_ENV: production
# CI builds should point at staging, not production.
# Without these, APP_ENV is undefined in config.ts and
# DEFAULT_BACKEND_URL falls through to api.tinyhumans.ai.
VITE_OPENHUMAN_APP_ENV: staging
VITE_BACKEND_URL: https://staging-api.tinyhumans.ai
CARGO_PROFILE_RELEASE_OPT_LEVEL: "1"
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "16"
CARGO_PROFILE_RELEASE_LTO: "false"
CARGO_PROFILE_RELEASE_STRIP: "true"
CARGO_PROFILE_RELEASE_DEBUG: "false"