chore: migrate from yarn to pnpm (#886)

This commit is contained in:
VectorJet
2026-04-24 10:52:16 -07:00
committed by GitHub
parent 3862b1bb1c
commit a96d9da3a4
35 changed files with 26436 additions and 501 deletions
+4 -23
View File
@@ -1,20 +1,17 @@
---
name: Build Windows
on:
workflow_dispatch:
push:
branches: [fix/windows]
permissions:
contents: read
concurrency:
group: build-windows-${{ github.ref }}
cancel-in-progress: true
jobs:
build-windows:
name: "Desktop: Windows x64"
name: 'Desktop: Windows x64'
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -24,13 +21,11 @@ jobs:
with:
fetch-depth: 1
submodules: recursive
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: yarn
- name: Install Rust (1.93.0)
uses: dtolnay/rust-toolchain@1.93.0
with:
@@ -42,7 +37,6 @@ jobs:
shell: bash
run: |
echo "hash=$(tail -n +8 Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT"
- name: Cache Cargo registry and git sources
uses: actions/cache@v4
with:
@@ -62,25 +56,21 @@ jobs:
key: cef-windows-${{ hashFiles('app/src-tauri/Cargo.toml') }}
restore-keys: |
cef-windows-
- name: Cache vendored tauri-cli binary
id: tauri-cli-cache
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-tauri.exe
key: vendored-tauri-cli-windows-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml') }}
- name: Install vendored tauri-cli (cef-aware bundler)
if: steps.tauri-cli-cache.outputs.cache-hit != 'true'
shell: bash
run: cargo install --locked --path app/src-tauri/vendor/tauri-cef/crates/tauri-cli
- name: Install dependencies
run: yarn install --frozen-lockfile
# vite build runs via tauri.conf.json's beforeBuildCommand during the
# "Build Tauri app" step below — no separate frontend build needed.
- name: Resolve core manifest and binary names
id: core-paths
shell: bash
@@ -95,16 +85,13 @@ jobs:
echo "No core Cargo manifest found"
exit 1
fi
SIDE_CAR_BASE="$(node -e "const fs=require('fs');const c=JSON.parse(fs.readFileSync('app/src-tauri/tauri.conf.json','utf8'));const b=(c.bundle&&Array.isArray(c.bundle.externalBin)&&c.bundle.externalBin[0])||'binaries/openhuman-core';process.stdout.write(String(b).split('/').pop());")"
CORE_BIN_NAME="${SIDE_CAR_BASE}"
echo "core_dir=$CORE_DIR" >> "$GITHUB_OUTPUT"
echo "core_manifest=$CORE_DIR/Cargo.toml" >> "$GITHUB_OUTPUT"
echo "core_target_dir=target/x86_64-pc-windows-msvc/release" >> "$GITHUB_OUTPUT"
echo "core_bin_name=$CORE_BIN_NAME" >> "$GITHUB_OUTPUT"
echo "sidecar_base=$SIDE_CAR_BASE" >> "$GITHUB_OUTPUT"
- name: Build sidecar core binary
shell: bash
run: |
@@ -116,7 +103,6 @@ jobs:
env:
CORE_MANIFEST: ${{ steps.core-paths.outputs.core_manifest }}
CORE_BIN_NAME: ${{ steps.core-paths.outputs.core_bin_name }}
- name: Stage sidecar for Tauri bundler
shell: bash
run: |
@@ -125,13 +111,12 @@ jobs:
"${{ steps.core-paths.outputs.core_target_dir }}" \
"${{ steps.core-paths.outputs.core_bin_name }}" \
"${{ steps.core-paths.outputs.sidecar_base }}"
- name: Define Tauri configuration overrides
id: config-overrides
uses: actions/github-script@v7
env:
BASE_URL: ${{ vars.BASE_URL }}
WITH_UPDATER: "false"
WITH_UPDATER: 'false'
with:
script: |
const workspacePath = process.env.GITHUB_WORKSPACE.replace(/\\/g, '/');
@@ -140,7 +125,6 @@ jobs:
const { default: prepareTauriConfig } = await import(moduleUrl);
const config = prepareTauriConfig();
core.setOutput('json', JSON.stringify(config));
- name: Build Tauri app (CEF default, vendored CLI)
id: tauri-build
shell: bash
@@ -155,7 +139,6 @@ jobs:
TAURI_CONFIG_OVERRIDE: ${{ steps.config-overrides.outputs.json }}
run: |
NODE_OPTIONS="--max-old-space-size=8192" cargo tauri build -c "$TAURI_CONFIG_OVERRIDE" --target x86_64-pc-windows-msvc
- name: Upload MSI artifact
uses: actions/upload-artifact@v4
with:
@@ -163,7 +146,6 @@ jobs:
path: |
app/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi
target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi
- name: Upload NSIS artifact
uses: actions/upload-artifact@v4
with:
@@ -171,10 +153,9 @@ jobs:
path: |
app/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe
target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe
- name: Upload standalone CLI binary
uses: actions/upload-artifact@v4
with:
name: windows-cli
path: |
path: |-
${{ steps.core-paths.outputs.core_target_dir }}/${{ steps.core-paths.outputs.core_bin_name }}.exe
+17 -26
View File
@@ -1,10 +1,9 @@
---
name: Build
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
pull-requests: read
@@ -14,7 +13,6 @@ permissions:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Tauri App
@@ -27,7 +25,6 @@ jobs:
with:
fetch-depth: 1
submodules: recursive
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
with:
@@ -51,32 +48,26 @@ jobs:
# 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 node modules
id: yarn-cache
uses: actions/cache@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
path: node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
cache: true
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Install cmake (for whisper-rs)
run: apt-get update && apt-get install -y --no-install-recommends cmake && rm -rf /var/lib/apt/lists/*
run: apt-get update && apt-get install -y --no-install-recommends cmake &&
rm -rf /var/lib/apt/lists/*
- name: Build sidecar core binary
run: cargo build --profile ci --target x86_64-unknown-linux-gnu --bin openhuman-core
- name: Stage sidecar for Tauri bundler
run: |
mkdir -p app/src-tauri/binaries
cp target/x86_64-unknown-linux-gnu/ci/openhuman-core app/src-tauri/binaries/openhuman-core-x86_64-unknown-linux-gnu
chmod +x app/src-tauri/binaries/openhuman-core-x86_64-unknown-linux-gnu
- name: Build Tauri app (CEF default)
working-directory: app
run: |
@@ -84,11 +75,11 @@ jobs:
cargo tauri build -c "$TAURI_CONFIG_OVERRIDE" --bundles deb
env:
NODE_ENV: production
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"
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'
- name: Upload Rust debug symbols to Sentry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
@@ -122,4 +113,4 @@ jobs:
app/src-tauri/target/release/deps/
sentry-cli releases finalize "${RELEASE}"
echo "Sentry symbol upload complete for ${RELEASE}"
echo "Sentry symbol upload complete for ${RELEASE}"
+6 -10
View File
@@ -1,19 +1,17 @@
---
name: Build CI Docker Image
on:
push:
branches: [main]
paths:
- ".github/Dockerfile"
- ".github/workflows/docker-ci-image.yml"
- "e2e/docker-entrypoint.sh"
- ".gitmodules"
- .github/Dockerfile
- .github/workflows/docker-ci-image.yml
- e2e/docker-entrypoint.sh
- .gitmodules
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-image:
name: Build and push CI image
@@ -25,14 +23,12 @@ jobs:
with:
# vendored tauri-cef fork is compiled into the image
submodules: recursive
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
@@ -40,6 +36,6 @@ jobs:
file: .github/Dockerfile
push: true
provenance: false
tags: |
tags: |-
ghcr.io/tinyhumansai/openhuman_ci:latest
ghcr.io/tinyhumansai/openhuman_ci:rust-1.93.0
+18 -30
View File
@@ -1,22 +1,18 @@
name: E2E (Linux) — agent-review
---
name: E2E (Linux) - agent-review
# DISABLED: Linux E2E via tauri-driver requires WebKitWebDriver (webkit2gtk),
# but this app uses the CEF runtime (tauri-runtime-cef) which has no WebDriver
# automation support. tauri-driver sessions time out because WebKitWebDriver
# cannot drive a CEF-backed webview. Re-enable once the CEF fork adds a
# ChromeDriver-based automation path or an alternative E2E harness is wired.
# See also: test.yml where the e2e-linux job is commented out for the same reason.
on:
pull_request:
paths:
- "app/test/e2e/specs/agent-review.spec.ts"
- "app/test/e2e/helpers/**"
- "app/test/wdio.conf.ts"
- "app/scripts/e2e-*.sh"
- ".github/workflows/e2e-agent-review.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: e2e-agent-review-${{ github.event.pull_request.number || github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
e2e-agent-review:
name: E2E agent-review (Linux / tauri-driver)
@@ -28,7 +24,6 @@ jobs:
with:
fetch-depth: 1
submodules: recursive
- name: Gate on spec presence
id: gate
run: |
@@ -36,20 +31,21 @@ jobs:
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
echo "agent-review.spec.ts not present skipping remaining steps."
echo "agent-review.spec.ts not present - skipping remaining steps."
fi
- name: Setup pnpm
if: steps.gate.outputs.present == 'true'
uses: pnpm/action-setup@v4
with:
cache: true
- name: Setup Node.js 24.x
if: steps.gate.outputs.present == 'true'
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: "yarn"
- name: Install Rust (rust-toolchain.toml)
if: steps.gate.outputs.present == 'true'
uses: dtolnay/rust-toolchain@1.93.0
- name: Install system dependencies
if: steps.gate.outputs.present == 'true'
run: |
@@ -60,14 +56,12 @@ jobs:
xvfb at-spi2-core dbus-x11 \
webkit2gtk-driver \
libasound2-dev libxdo-dev libxtst-dev libx11-dev libevdev-dev
- name: Cargo.lock fingerprint (deps only)
if: steps.gate.outputs.present == 'true'
id: cargo-lock-fingerprint
shell: bash
run: |
echo "hash=$(tail -n +8 Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT"
- name: Cache Cargo registry and build
if: steps.gate.outputs.present == 'true'
uses: actions/cache@v4
@@ -76,36 +70,31 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-e2e-agentreview-cargo-${{ steps.cargo-lock-fingerprint.outputs.hash }}
key: ${{ runner.os }}-e2e-agentreview-cargo-${{ steps.cargo-lock-fingerprint.outputs.hash
}}
restore-keys: |
${{ runner.os }}-e2e-agentreview-cargo-
${{ runner.os }}-e2e-cargo-
- name: Install tauri-driver
if: steps.gate.outputs.present == 'true'
run: cargo install tauri-driver --version 2.0.5
- name: Install JS dependencies
if: steps.gate.outputs.present == 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Ensure .env exists for E2E build
if: steps.gate.outputs.present == 'true'
run: |
touch .env
touch app/.env
- name: Build E2E app
if: steps.gate.outputs.present == 'true'
run: yarn workspace openhuman-app test:e2e:build
run: pnpm --filter openhuman-app test:e2e:build
- name: Stage sidecar next to app binary
if: steps.gate.outputs.present == 'true'
run: |
cp app/src-tauri/binaries/openhuman-core-x86_64-unknown-linux-gnu \
app/src-tauri/target/debug/openhuman-core-x86_64-unknown-linux-gnu
chmod +x app/src-tauri/target/debug/openhuman-core-x86_64-unknown-linux-gnu
- name: Run agent-review E2E spec under Xvfb
if: steps.gate.outputs.present == 'true'
run: |
@@ -118,7 +107,6 @@ jobs:
cd app
mkdir -p test/e2e/artifacts
bash scripts/e2e-run-spec.sh test/e2e/specs/agent-review.spec.ts agent-review
- name: Upload E2E artifacts
if: always() && steps.gate.outputs.present == 'true'
uses: actions/upload-artifact@v4
+1 -4
View File
@@ -1,14 +1,12 @@
---
name: Installer Smoke
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
smoke-unix:
name: Smoke install.sh (${{ matrix.os }})
@@ -22,7 +20,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run installer dry-run
run: bash scripts/install.sh --dry-run --verbose
+3 -28
View File
@@ -1,5 +1,5 @@
---
name: Release Packages
# Triggered after the main release.yml publishes a release.
# By the time this fires, macOS (aarch64 + x86_64) and Linux x86_64
# CLI tarballs are already attached to the release by release.yml.
@@ -11,21 +11,17 @@ name: Release Packages
# 4. npm package publish
# 5. Smoke tests for each channel
# 6. One-time backlog issue for future package managers
on:
release:
types: [published]
permissions:
contents: write
pages: write
id-token: write
issues: write
concurrency:
group: release-packages-${{ github.event.release.tag_name }}
cancel-in-progress: false
jobs:
# ────────────────────────────────────────────────────────────────────────────
@@ -45,21 +41,17 @@ jobs:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 1
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@1.93.0
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
key: linux-arm64-release
- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
pkg-config libssl-dev build-essential cmake
- name: Verify Sentry DSN is present
shell: bash
env:
@@ -74,7 +66,6 @@ jobs:
exit 1
fi
echo "OPENHUMAN_SENTRY_DSN is set (length=${#OPENHUMAN_SENTRY_DSN})"
- name: Build CLI binary and package tarball
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -106,14 +97,12 @@ jobs:
with:
ref: ${{ github.event.release.tag_name }}
path: src
- name: Checkout Homebrew tap
uses: actions/checkout@v4
with:
repository: tinyhumansai/homebrew-openhuman
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
path: tap
- name: Update Homebrew formula
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -139,27 +128,23 @@ jobs:
with:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 1
- name: Install apt-repo build tools
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
dpkg-dev apt-utils gnupg2
- name: Import GPG signing key
env:
APT_SIGNING_KEY: ${{ secrets.APT_SIGNING_KEY }}
run: |
echo "$APT_SIGNING_KEY" | gpg --batch --import
gpg --list-secret-keys
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
fetch-depth: 0
- name: Build .deb packages, apt repo, and deploy to gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -182,13 +167,11 @@ jobs:
with:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24.x
registry-url: 'https://registry.npmjs.org'
registry-url: https://registry.npmjs.org
- name: Set version and publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -212,12 +195,10 @@ jobs:
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH"
- name: Tap and install
run: |
brew tap tinyhumansai/openhuman
brew install openhuman
- name: Smoke test
run: openhuman --version
@@ -238,7 +219,6 @@ jobs:
echo "deb [signed-by=/etc/apt/keyrings/openhuman.gpg arch=amd64] \
https://tinyhumansai.github.io/openhuman/apt stable main" \
| sudo tee /etc/apt/sources.list.d/openhuman.list
- name: Install and smoke test
run: |
sudo apt-get update
@@ -262,7 +242,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 24.x
- name: Wait for npm propagation, then install
run: |
VERSION="${{ github.event.release.tag_name }}"
@@ -271,7 +250,6 @@ jobs:
for i in 1 2 3 4 5; do
npm install -g "openhuman@${VERSION}" && break || sleep 30
done
- name: Smoke test
run: openhuman --version
@@ -285,11 +263,10 @@ jobs:
- name: Create issue if it doesn't exist
uses: actions/github-script@v7
with:
script: |
script: |-
const { owner, repo } = context.repo;
const label = 'distribution-backlog';
const title = '[Backlog] Package manager distribution — next tiers';
// Check for existing open or closed issue with this exact title
const { data: existing } = await github.rest.issues.listForRepo({
owner, repo,
@@ -301,7 +278,6 @@ jobs:
core.info('Backlog issue already exists — skipping.');
return;
}
// Ensure the label exists
try {
await github.rest.issues.createLabel({
@@ -311,7 +287,6 @@ jobs:
description: 'Package distribution backlog',
});
} catch (_) { /* label may already exist */ }
const body = [
'## Summary',
'',
+65 -124
View File
@@ -1,5 +1,5 @@
---
name: Release
on:
workflow_dispatch:
inputs:
@@ -8,27 +8,19 @@ on:
required: true
type: choice
default: production
options:
- production
- staging
options: [production, staging]
release_type:
description: Version increment type
required: false
default: patch
type: choice
options:
- patch
- minor
- major
options: [patch, minor, major]
permissions:
contents: write
packages: write
concurrency:
group: release-${{ github.event.inputs.build_target || 'production' }}-main
cancel-in-progress: false
# ---------------------------------------------------------------------------
# Job dependency graph
#
@@ -50,7 +42,6 @@ concurrency:
# │
# └─── cleanup-failed-release (on failure)
# ---------------------------------------------------------------------------
jobs:
# =========================================================================
# Phase 1: Version bump, commit, tag
@@ -72,7 +63,6 @@ jobs:
run: |
echo "This workflow can only run from main. Current ref: $GITHUB_REF"
exit 1
- name: Generate GitHub App token
if: inputs.build_target == 'production'
id: app-token
@@ -80,7 +70,6 @@ jobs:
with:
app_id: ${{ secrets.XGITHUB_APP_ID }}
private_key: ${{ secrets.XGITHUB_APP_PRIVATE_KEY }}
- name: Checkout main for production release
if: inputs.build_target == 'production'
uses: actions/checkout@v4
@@ -88,19 +77,16 @@ jobs:
ref: main
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Checkout main for staging build
if: inputs.build_target == 'staging'
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24.x
- name: Configure Git
if: inputs.build_target == 'production'
env:
@@ -112,16 +98,13 @@ jobs:
git fetch origin --tags
git checkout main
git pull origin main --ff-only
- name: Compute next version and sync release files
if: inputs.build_target == 'production'
id: bump
run: node scripts/release/bump-version.js "${{ inputs.release_type }}"
- name: Verify release version sync
if: inputs.build_target == 'production'
run: node scripts/release/verify-version-sync.js "${{ steps.bump.outputs.version }}"
- name: Ensure tag does not already exist
if: inputs.build_target == 'production'
env:
@@ -131,12 +114,10 @@ jobs:
echo "Tag already exists locally: $TAG"
exit 1
fi
if git ls-remote --tags origin "refs/tags/$TAG" | grep -q .; then
echo "Tag already exists on origin: $TAG"
exit 1
fi
- name: Commit, push and tag
if: inputs.build_target == 'production'
id: push
@@ -147,12 +128,9 @@ jobs:
git add app/package.json app/src-tauri/tauri.conf.json app/src-tauri/Cargo.toml Cargo.toml
git commit -m "chore(release): v${VERSION}"
git push origin main
git tag -a "$TAG" -m "Release $TAG"
git push origin "$TAG"
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Resolve build outputs
id: resolve
shell: bash
@@ -172,7 +150,6 @@ jobs:
RELEASE_ENABLED="false"
BASE_URL="https://staging-api.tinyhumans.ai/"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
@@ -201,9 +178,7 @@ jobs:
const tag = '${{ needs.prepare-build.outputs.tag }}';
const version = '${{ needs.prepare-build.outputs.version }}';
const target = '${{ needs.prepare-build.outputs.sha }}';
const { owner, repo } = context.repo;
try {
await github.rest.repos.getReleaseByTag({ owner, repo, tag });
core.setFailed(`Release already exists for ${tag}`);
@@ -213,7 +188,6 @@ jobs:
throw error;
}
}
const release = await github.rest.repos.createRelease({
owner,
repo,
@@ -224,7 +198,6 @@ jobs:
prerelease: false,
generate_release_notes: true,
});
core.setOutput('release_id', String(release.data.id));
core.setOutput('upload_url', release.data.upload_url);
@@ -232,7 +205,7 @@ jobs:
# Phase 3a: Build desktop artifacts (parallel matrix)
# =========================================================================
build-desktop:
name: "Desktop: ${{ matrix.settings.artifact_suffix }}"
name: 'Desktop: ${{ matrix.settings.artifact_suffix }}'
needs: [prepare-build, create-release]
if: >-
always()
@@ -273,7 +246,6 @@ jobs:
ref: ${{ needs.prepare-build.outputs.build_ref }}
fetch-depth: 1
submodules: recursive
- name: Configure staging app environment
if: inputs.build_target == 'staging'
shell: bash
@@ -282,24 +254,23 @@ jobs:
echo "VITE_OPENHUMAN_APP_ENV=staging" >> "$GITHUB_ENV"
echo "OPENHUMAN_TELEGRAM_BOT_USERNAME=alphahumantest_bot" >> "$GITHUB_ENV"
echo "VITE_TELEGRAM_BOT_USERNAME=alphahumantest_bot" >> "$GITHUB_ENV"
- name: Set Xcode version
if: matrix.settings.platform == 'macos-latest'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
cache: true
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: yarn
- name: Install Rust (rust-toolchain.toml)
uses: dtolnay/rust-toolchain@1.93.0
with:
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Install Tauri dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-22.04'
run: |
@@ -311,7 +282,6 @@ jobs:
libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
libgbm1 libpango-1.0-0 libcairo2 libatspi2.0-0 libxshmfence1 libu2f-udev
- name: Dump missing shared libs (debug)
if: matrix.settings.platform == 'ubuntu-22.04'
shell: bash
@@ -332,14 +302,14 @@ jobs:
shell: bash
run: |
echo "hash=$(tail -n +8 Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT"
- name: Cache Cargo registry and git sources
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ steps.cargo-lock-fingerprint.outputs.hash }}
key: ${{ runner.os }}-cargo-registry-${{ steps.cargo-lock-fingerprint.outputs.hash
}}
restore-keys: |
${{ runner.os }}-cargo-registry-
@@ -354,16 +324,17 @@ jobs:
path: |
~/Library/Caches/tauri-cef
~/.cache/tauri-cef
key: cef-${{ matrix.settings.target }}-${{ hashFiles('app/src-tauri/Cargo.toml') }}
key: cef-${{ matrix.settings.target }}-${{ hashFiles('app/src-tauri/Cargo.toml')
}}
restore-keys: |
cef-${{ matrix.settings.target }}-
- name: Cache CEF binary distribution (windows)
if: matrix.settings.platform == 'windows-latest'
uses: actions/cache@v4
with:
path: ~/AppData/Local/tauri-cef
key: cef-${{ matrix.settings.target }}-${{ hashFiles('app/src-tauri/Cargo.toml') }}
key: cef-${{ matrix.settings.target }}-${{ hashFiles('app/src-tauri/Cargo.toml')
}}
restore-keys: |
cef-${{ matrix.settings.target }}-
@@ -377,24 +348,24 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-tauri
key: vendored-tauri-cli-${{ runner.os }}-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml') }}
key: vendored-tauri-cli-${{ runner.os }}-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml')
}}
- name: Cache vendored tauri-cli binary (windows)
if: matrix.settings.platform == 'windows-latest'
id: tauri-cli-cache-windows
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-tauri.exe
key: vendored-tauri-cli-${{ runner.os }}-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml') }}
key: vendored-tauri-cli-${{ runner.os }}-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml')
}}
- name: Install vendored tauri-cli (cef-aware bundler)
if: (matrix.settings.platform == 'windows-latest' && steps.tauri-cli-cache-windows.outputs.cache-hit != 'true') || (matrix.settings.platform != 'windows-latest' && steps.tauri-cli-cache-unix.outputs.cache-hit != 'true')
if: (matrix.settings.platform == 'windows-latest' && steps.tauri-cli-cache-windows.outputs.cache-hit
!= 'true') || (matrix.settings.platform != 'windows-latest' && steps.tauri-cli-cache-unix.outputs.cache-hit
!= 'true')
shell: bash
run: cargo install --locked --path app/src-tauri/vendor/tauri-cef/crates/tauri-cli
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Validate signing prerequisites
shell: bash
env:
@@ -412,12 +383,10 @@ jobs:
echo "Missing UPDATER_PUBLIC_KEY (set as secret or repo/environment variable)."
exit 1
fi
if [ -z "$TAURI_SIGNING_PRIVATE_KEY" ]; then
echo "Missing TAURI_SIGNING_PRIVATE_KEY (or fallback UPDATER_PRIVATE_KEY)."
exit 1
fi
if [ "$MATRIX_PLATFORM" = "macos-latest" ]; then
for var in APPLE_CERTIFICATE_BASE64 APPLE_CERTIFICATE_PASSWORD APPLE_SIGNING_IDENTITY APPLE_ID APPLE_PASSWORD APPLE_TEAM_ID; do
if [ -z "${!var}" ]; then
@@ -426,7 +395,6 @@ jobs:
fi
done
fi
- name: Define Tauri configuration overrides
id: config-overrides
uses: actions/github-script@v7
@@ -435,7 +403,7 @@ jobs:
UPDATER_PUBLIC_KEY: ${{ secrets.UPDATER_PUBLIC_KEY || vars.UPDATER_PUBLIC_KEY }}
UPDATER_ENDPOINT: ${{ vars.UPDATER_ENDPOINT }}
UPDATER_REPO: tinyhumansai/openhuman
WITH_UPDATER: "true"
WITH_UPDATER: 'true'
with:
script: |
const workspacePath = process.env.GITHUB_WORKSPACE.replace(/\\/g, '/');
@@ -448,7 +416,6 @@ jobs:
# Note: vite build runs via tauri.conf.json's beforeBuildCommand during
# the "Build and package Tauri app" step below. A separate frontend build
# here would just double memory pressure (sentry-vite-plugin peaks hard).
- name: Resolve core manifest and binary names
id: core-paths
shell: bash
@@ -463,10 +430,8 @@ jobs:
echo "No core Cargo manifest found (expected root Cargo.toml with openhuman, openhuman_core/Cargo.toml, or rust-core/Cargo.toml)"
exit 1
fi
SIDE_CAR_BASE="$(node -e "const fs=require('fs');const c=JSON.parse(fs.readFileSync('app/src-tauri/tauri.conf.json','utf8'));const b=(c.bundle&&Array.isArray(c.bundle.externalBin)&&c.bundle.externalBin[0])||'binaries/openhuman-core';process.stdout.write(String(b).split('/').pop());")"
CORE_BIN_NAME="${SIDE_CAR_BASE}"
echo "core_dir=$CORE_DIR" >> "$GITHUB_OUTPUT"
echo "core_manifest=$CORE_DIR/Cargo.toml" >> "$GITHUB_OUTPUT"
# Cargo workspace: release artifacts are under repo root target/, not <member>/target/
@@ -475,7 +440,6 @@ jobs:
echo "sidecar_base=$SIDE_CAR_BASE" >> "$GITHUB_OUTPUT"
env:
MATRIX_TARGET: ${{ matrix.settings.target }}
- name: Build sidecar core binary
shell: bash
run: |
@@ -494,7 +458,6 @@ jobs:
# in src/main.rs bakes the short SHA into the release tag
# (`openhuman@<version>+<sha>`) so core events match the frontend.
OPENHUMAN_BUILD_SHA: ${{ needs.prepare-build.outputs.sha }}
- name: Stage sidecar for Tauri bundler
shell: bash
run: |
@@ -503,7 +466,6 @@ jobs:
"${{ steps.core-paths.outputs.core_target_dir }}" \
"${{ steps.core-paths.outputs.core_bin_name }}" \
"${{ steps.core-paths.outputs.sidecar_base }}"
- name: Resolve standalone core CLI artifact path
id: cli-paths
shell: bash
@@ -536,22 +498,23 @@ jobs:
VITE_BACKEND_URL: ${{ needs.prepare-build.outputs.base_url }}
# Re-declare Vite env so tauri.conf.json's `beforeBuildCommand`
# (`vite build`) bakes Sentry + debug flags into the final bundle.
# The earlier explicit `yarn build` step ran with these, but the
# rebuild triggered here would strip them and ship a DSN-less UI.
# Vite is invoked via tauri.conf.json's beforeBuildCommand during
# `cargo tauri build`, so these env vars must be present here.
VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }}
VITE_DEBUG: ${{ vars.VITE_DEBUG }}
# Sentry release tracking (#405) — must match the first `yarn build`
# so source maps uploaded there still resolve against the final bundle
# produced by the tauri-driven rebuild.
# Sentry release tracking (#405) — must match the Vite build triggered
# by Tauri so source maps uploaded there resolve correctly against the
# final bundle produced by the tauri-driven build.
VITE_BUILD_SHA: ${{ needs.prepare-build.outputs.sha }}
SENTRY_RELEASE: openhuman@${{ needs.prepare-build.outputs.version }}+${{ needs.prepare-build.outputs.sha }}
SENTRY_RELEASE: openhuman@${{ needs.prepare-build.outputs.version }}+${{
needs.prepare-build.outputs.sha }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT_FRONTEND }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.settings.platform == 'macos-latest' && '10.15' || '' }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD || secrets.UPDATER_PRIVATE_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY || secrets.UPDATER_PRIVATE_KEY }}
WITH_UPDATER: "true"
WITH_UPDATER: 'true'
VITE_MINIMUM_SUPPORTED_APP_VERSION: ${{ vars.VITE_MINIMUM_SUPPORTED_APP_VERSION }}
VITE_LATEST_APP_DOWNLOAD_URL: ${{ vars.VITE_LATEST_APP_DOWNLOAD_URL }}
TAURI_CONFIG_OVERRIDE: ${{ steps.config-overrides.outputs.json }}
@@ -562,11 +525,12 @@ jobs:
# on macos-arm64 runners, causing OOM at node's ~2GB auto default.
NODE_OPTIONS="--max-old-space-size=8192" cargo tauri build -c "$TAURI_CONFIG_OVERRIDE" $MATRIX_ARGS
# tauri-action previously uploaded non-macOS installer assets directly
# to the release. Replicate that for Linux + Windows here (macOS goes
# through the re-sign + notarize path below and uploads separately).
# tauri-action previously uploaded non-macOS installer assets directly
# to the release. Replicate that for Linux + Windows here (macOS goes
# through the re-sign + notarize path below and uploads separately).
- name: Upload non-macOS installers to release
if: needs.prepare-build.outputs.release_enabled == 'true' && matrix.settings.platform != 'macos-latest'
if: needs.prepare-build.outputs.release_enabled == 'true' && matrix.settings.platform
!= 'macos-latest'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -600,7 +564,6 @@ jobs:
echo "Uploading:"
printf ' %s\n' "${UPLOAD[@]}"
gh release upload "$TAG" "${UPLOAD[@]}" --repo tinyhumansai/openhuman --clobber
- name: Locate macOS .app bundle
if: matrix.settings.platform == 'macos-latest'
id: locate-app
@@ -623,19 +586,16 @@ jobs:
if [ -z "$APP_PATH" ]; then
APP_PATH="$(find . -path '*/release/bundle/macos/OpenHuman.app' -type d 2>/dev/null | head -1)"
fi
if [ -z "$APP_PATH" ]; then
echo "ERROR: Could not find OpenHuman.app bundle anywhere"
find . -name 'OpenHuman.app' -type d 2>/dev/null || true
exit 1
fi
BUNDLE_DIR="$(dirname "$(dirname "$APP_PATH")")"
echo "app_path=$APP_PATH" >> "$GITHUB_OUTPUT"
echo "bundle_dir=$BUNDLE_DIR" >> "$GITHUB_OUTPUT"
echo "Found .app at: $APP_PATH"
echo "Bundle dir: $BUNDLE_DIR"
- name: Re-sign sidecar with hardened runtime and notarize
if: matrix.settings.platform == 'macos-latest'
shell: bash
@@ -650,7 +610,6 @@ jobs:
bash scripts/release/sign-and-notarize-macos.sh \
"${{ steps.locate-app.outputs.app_path }}" \
"app/src-tauri/entitlements.sidecar.plist"
- name: Re-package DMG after notarization
if: matrix.settings.platform == 'macos-latest'
shell: bash
@@ -662,9 +621,9 @@ jobs:
bash scripts/release/repackage-dmg.sh \
"${{ steps.locate-app.outputs.app_path }}" \
"${{ steps.locate-app.outputs.bundle_dir }}"
- name: Re-upload notarized macOS artifacts to release
if: matrix.settings.platform == 'macos-latest' && needs.prepare-build.outputs.release_enabled == 'true'
if: matrix.settings.platform == 'macos-latest' && needs.prepare-build.outputs.release_enabled
== 'true'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -677,7 +636,6 @@ jobs:
"${{ steps.locate-app.outputs.bundle_dir }}" \
"${{ needs.prepare-build.outputs.version }}" \
"${{ matrix.settings.target }}"
- name: Verify macOS app bundle sidecar layout
if: matrix.settings.platform == 'macos-latest'
shell: bash
@@ -704,9 +662,9 @@ jobs:
# Verify notarization staple
echo "Checking staple..."
xcrun stapler validate "$APP_PATH" || echo "WARNING: Staple validation failed"
- name: Package CLI tarball and upload to release (unix)
if: matrix.settings.platform != 'windows-latest' && needs.prepare-build.outputs.release_enabled == 'true'
if: matrix.settings.platform != 'windows-latest' && needs.prepare-build.outputs.release_enabled
== 'true'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -725,14 +683,13 @@ jobs:
else
BIN="${{ steps.cli-paths.outputs.cli_path }}"
fi
bash scripts/release/package-cli-tarball.sh \
"$BIN" \
"${{ needs.prepare-build.outputs.version }}" \
"${{ matrix.settings.target }}"
- name: Package CLI zip and upload to release (windows)
if: matrix.settings.platform == 'windows-latest' && needs.prepare-build.outputs.release_enabled == 'true'
if: matrix.settings.platform == 'windows-latest' && needs.prepare-build.outputs.release_enabled
== 'true'
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -741,32 +698,28 @@ jobs:
$Target = "${{ matrix.settings.target }}"
$BinPath = "${{ steps.cli-paths.outputs.cli_path }}"
$ZipName = "openhuman-core-${Version}-${Target}.zip"
$Work = New-Item -ItemType Directory -Path (Join-Path $env:TEMP "cli-pkg-$(Get-Random)")
Copy-Item $BinPath (Join-Path $Work.FullName "openhuman-core.exe")
Compress-Archive -Path (Join-Path $Work.FullName "openhuman-core.exe") -DestinationPath $ZipName
$Hash = (Get-FileHash -Path $ZipName -Algorithm SHA256).Hash.ToLowerInvariant()
Set-Content -Path "${ZipName}.sha256" -Value $Hash -NoNewline
Write-Host "[package-cli] Created $ZipName (sha256: $Hash)"
gh release upload "v${Version}" $ZipName "${ZipName}.sha256" --repo tinyhumansai/openhuman --clobber
Write-Host "[package-cli] Uploaded $ZipName to v${Version}"
- name: Upload staging desktop bundles
if: needs.prepare-build.outputs.release_enabled != 'true'
uses: actions/upload-artifact@v4
with:
name: desktop-bundles-${{ matrix.settings.platform }}-${{ matrix.settings.artifact_suffix }}
name: desktop-bundles-${{ matrix.settings.platform }}-${{ matrix.settings.artifact_suffix
}}
path: |
app/src-tauri/target/${{ matrix.settings.target }}/release/bundle/**
target/${{ matrix.settings.target }}/release/bundle/**
- name: Upload standalone CLI artifacts
uses: actions/upload-artifact@v4
with:
name: standalone-bins-${{ matrix.settings.platform }}-${{ matrix.settings.artifact_suffix }}
name: standalone-bins-${{ matrix.settings.platform }}-${{ matrix.settings.artifact_suffix
}}
path: |
${{ steps.cli-paths.outputs.cli_path }}
@@ -774,7 +727,7 @@ jobs:
# Phase 3b: Build & push Docker image (runs parallel with build-desktop)
# =========================================================================
build-docker:
name: "Docker: build and push"
name: 'Docker: build and push'
needs: [prepare-build, create-release]
if: >-
always()
@@ -792,10 +745,8 @@ jobs:
with:
ref: ${{ needs.prepare-build.outputs.build_ref }}
fetch-depth: 1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
@@ -842,7 +793,6 @@ jobs:
with:
ref: ${{ needs.prepare-build.outputs.build_ref }}
fetch-depth: 1
- name: Generate and upload latest.json
shell: bash
env:
@@ -860,13 +810,11 @@ jobs:
runs-on: ubuntu-latest
environment: Production
needs:
[
prepare-build,
create-release,
build-desktop,
build-docker,
publish-updater-manifest,
]
- prepare-build
- create-release
- build-desktop
- build-docker
- publish-updater-manifest
if: >-
needs.prepare-build.outputs.release_enabled == 'true'
&& needs.build-desktop.result == 'success'
@@ -885,7 +833,6 @@ jobs:
release_id: releaseId,
per_page: 100,
});
const names = assets.map((a) => a.name);
const requiredPatterns = [
/OpenHuman_.*_aarch64\.dmg$/,
@@ -895,7 +842,6 @@ jobs:
// discover new releases via plugins.updater.endpoints.
/^latest\.json$/,
];
const missing = requiredPatterns.filter((pattern) => !names.some((name) => pattern.test(name)));
if (missing.length > 0) {
core.setFailed(`Missing required installer assets. Got: ${names.join(', ')}`);
@@ -909,7 +855,7 @@ jobs:
# IMAGE_NAME: tinyhumansai/openhuman-core
# TAG: ${{ needs.prepare-release.outputs.tag }}
# run: |
# # Log in to GHCR
# # Log in to GHCR
# echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
# STAGING="${REGISTRY}/${IMAGE_NAME}:staging-${TAG}"
@@ -929,7 +875,6 @@ jobs:
# printf '\n---\n\n### Docker\n\n```\ndocker pull ghcr.io/%s:%s\ndocker run -p 7788:7788 --env-file .env ghcr.io/%s:%s\n```\n' \
# "${IMAGE_NAME}" "${TAG}" "${IMAGE_NAME}" "${TAG}" >> /tmp/body.md
# gh release edit "${TAG}" --repo tinyhumansai/openhuman --notes-file /tmp/body.md
- name: Publish release
uses: actions/github-script@v7
with:
@@ -951,20 +896,21 @@ jobs:
runs-on: ubuntu-latest
environment: Production
needs:
[
prepare-build,
create-release,
build-desktop,
build-docker,
publish-updater-manifest,
]
- prepare-build
- create-release
- build-desktop
- build-docker
- publish-updater-manifest
if: >-
always()
&& needs.prepare-build.outputs.release_enabled == 'true'
&& needs.create-release.result == 'success'
&& (needs.build-desktop.result == 'failure' || needs.build-desktop.result == 'cancelled'
|| needs.build-docker.result == 'failure' || needs.build-docker.result == 'cancelled'
|| needs.publish-updater-manifest.result == 'failure' || needs.publish-updater-manifest.result == 'cancelled')
&& (needs.build-desktop.result == 'failure' || needs.build-desktop.result ==
'cancelled'
|| needs.build-docker.result == 'failure' || needs.build-docker.result ==
'cancelled'
|| needs.publish-updater-manifest.result == 'failure' || needs.publish-updater-manifest.result
== 'cancelled')
steps:
- name: Delete GitHub release
uses: actions/github-script@v7
@@ -973,19 +919,16 @@ jobs:
const owner = context.repo.owner;
const repo = context.repo.repo;
const releaseId = Number('${{ needs.create-release.outputs.release_id }}');
if (!Number.isFinite(releaseId) || releaseId <= 0) {
core.setFailed('Invalid or missing release_id; cannot delete release.');
return;
}
try {
await github.rest.repos.deleteRelease({ owner, repo, release_id: releaseId });
core.info(`Deleted release ${releaseId}`);
} catch (e) {
core.warning(`deleteRelease failed: ${e.message}`);
}
- name: Delete remote tag
uses: actions/github-script@v7
with:
@@ -993,7 +936,6 @@ jobs:
const owner = context.repo.owner;
const repo = context.repo.repo;
const tag = '${{ needs.prepare-build.outputs.tag }}';
try {
await github.rest.git.deleteRef({ owner, repo, ref: `tags/${tag}` });
core.info(`Deleted remote tag ${tag}`);
@@ -1004,12 +946,11 @@ jobs:
throw e;
}
}
- name: Delete staging Docker image
continue-on-error: true
env:
TAG: ${{ needs.prepare-build.outputs.tag }}
run: |
run: |-
PACKAGE="openhuman-core"
STAGING_TAG="staging-${TAG}"
echo "Attempting to delete staging Docker tag: ${STAGING_TAG}"
+19 -38
View File
@@ -1,5 +1,5 @@
---
name: Test
on:
push:
branches: [main]
@@ -7,22 +7,18 @@ on:
workflow_dispatch:
inputs:
run_macos_e2e:
description: "Run macOS E2E tests (Appium Mac2)"
description: Run macOS E2E tests (Appium Mac2)
required: false
default: "false"
default: 'false'
type: choice
options:
- "false"
- "true"
options: ['false', 'true']
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref
|| github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
name: Frontend Unit Tests
@@ -32,13 +28,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: "yarn"
cache: yarn
- name: Cache node modules
id: yarn-cache
uses: actions/cache@v4
@@ -48,16 +42,13 @@ jobs:
restore-keys: |
${{ runner.os }}-test-
${{ runner.os }}-build-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Run tests with coverage
run: yarn test:coverage
env:
NODE_ENV: test
- name: Upload coverage reports
if: always()
uses: actions/upload-artifact@v4
@@ -65,7 +56,6 @@ jobs:
name: coverage-report
path: coverage
retention-days: 7
rust-tests:
name: Rust Tests + Quality
runs-on: ubuntu-22.04
@@ -74,12 +64,12 @@ jobs:
env:
# Incremental compilation is pointless on fresh CI runners and just wastes
# disk and IO. Swatinem/rust-cache already handles cross-run warmup.
CARGO_INCREMENTAL: "0"
CARGO_INCREMENTAL: '0'
# Route rustc through sccache, backed by the GitHub Actions cache. This
# layers on top of Swatinem/rust-cache (which caches target/) by caching
# individual compilation units across branches.
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
SCCACHE_GHA_ENABLED: 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -89,7 +79,6 @@ jobs:
# tauri-runtime-cef (compiled into the default build) and the
# cef-aware tauri-cli + tauri-bundler used by release workflows.
submodules: recursive
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
with:
@@ -108,31 +97,24 @@ jobs:
key: cef-ubuntu-22.04-${{ hashFiles('app/src-tauri/Cargo.toml') }}
restore-keys: |
cef-ubuntu-22.04-
- name: Install system dependencies (cmake, ALSA, X11)
run: apt-get update && apt-get install -y --no-install-recommends cmake libasound2-dev libxdo-dev libxtst-dev libx11-dev libevdev-dev && rm -rf /var/lib/apt/lists/*
run: apt-get update && apt-get install -y --no-install-recommends cmake libasound2-dev
libxdo-dev libxtst-dev libx11-dev libevdev-dev && rm -rf /var/lib/apt/lists/*
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Check formatting (cargo fmt)
run: cargo fmt --all -- --check
- name: Run clippy (core crate)
run: cargo clippy -p openhuman
- name: Test core crate (openhuman)
run: cargo test -p openhuman
- name: Build sidecar core binary
run: cargo build --profile ci --target x86_64-unknown-linux-gnu --bin openhuman-core
- name: Stage sidecar for Tauri shell tests
run: |
mkdir -p app/src-tauri/binaries
cp target/x86_64-unknown-linux-gnu/ci/openhuman-core app/src-tauri/binaries/openhuman-core-x86_64-unknown-linux-gnu
chmod +x app/src-tauri/binaries/openhuman-core-x86_64-unknown-linux-gnu
- name: Test Tauri shell (OpenHuman)
run: cargo test --manifest-path app/src-tauri/Cargo.toml
@@ -199,8 +181,8 @@ jobs:
# - name: Stage sidecar next to app binary
# run: |
# # Tauri resolves externalBin relative to the running binary's directory.
# # Copy the sidecar from binaries/ to target/debug/ so the app can find it.
# # Tauri resolves externalBin relative to the running binary's directory.
# # Copy the sidecar from binaries/ to target/debug/ so the app can find it.
# cp app/src-tauri/binaries/openhuman-core-x86_64-unknown-linux-gnu \
# app/src-tauri/target/debug/openhuman-core-x86_64-unknown-linux-gnu
# chmod +x app/src-tauri/target/debug/openhuman-core-x86_64-unknown-linux-gnu
@@ -212,13 +194,13 @@ jobs:
# export DISPLAY=:99
# Xvfb :99 -screen 0 1280x1024x24 &
# sleep 2
# # dbus session is required by webkit2gtk
# # dbus session is required by webkit2gtk
# eval "$(dbus-launch --sh-syntax)"
# # Ensure XDG dirs exist for deep-link URL scheme registration on Linux
# # Ensure XDG dirs exist for deep-link URL scheme registration on Linux
# mkdir -p ~/.local/share/applications
# export RUST_BACKTRACE=1
# cd app
# # Core specs — must pass on Linux CI
# # Core specs — must pass on Linux CI
# FAILED=0
# for spec in \
# test/e2e/specs/login-flow.spec.ts \
@@ -233,15 +215,14 @@ jobs:
# FAILED=1
# }
# done
# # Extended specs (auth, billing, gmail, notion, payments) are skipped
# # on Linux CI — webkit2gtk text matching differences cause Settings
# # page navigation timeouts. Full suite runs on macOS locally.
# # Extended specs (auth, billing, gmail, notion, payments) are skipped
# # on Linux CI — webkit2gtk text matching differences cause Settings
# # page navigation timeouts. Full suite runs on macOS locally.
# if [ "$FAILED" -eq 1 ]; then
# echo "Core E2E specs failed"
# exit 1
# fi
# echo "Core E2E specs passed"
# e2e-macos:
# name: E2E (macOS / Appium)
# if: github.event_name == 'workflow_dispatch' && github.event.inputs.run_macos_e2e == 'true'
+6 -18
View File
@@ -1,18 +1,16 @@
---
name: Type Check
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref
|| github.ref }}
cancel-in-progress: true
jobs:
typecheck:
name: Type Check TypeScript
@@ -22,13 +20,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: "yarn"
cache: yarn
- name: Cache node modules
id: yarn-cache
uses: actions/cache@v4
@@ -39,26 +35,21 @@ jobs:
${{ runner.os }}-typecheck-
${{ runner.os }}-test-
${{ runner.os }}-build-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Type check TypeScript files
run: yarn workspace openhuman-app compile
env:
NODE_ENV: test
- name: Check Prettier formatting
run: yarn workspace openhuman-app format:check
env:
NODE_ENV: test
- name: Run ESLint
run: yarn workspace openhuman-app lint
env:
NODE_ENV: test
rust-quality:
name: Rust Quality (fmt + clippy)
runs-on: ubuntu-22.04
@@ -69,19 +60,16 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
with:
workspaces: |
. -> target
cache-on-failure: true
- name: Install cmake (for whisper-rs)
run: apt-get update && apt-get install -y --no-install-recommends cmake && rm -rf /var/lib/apt/lists/*
run: apt-get update && apt-get install -y --no-install-recommends cmake &&
rm -rf /var/lib/apt/lists/*
- name: Check formatting (cargo fmt)
run: cargo fmt --all -- --check
- name: Run clippy (core crate)
run: cargo clippy -p openhuman