mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-27 00:05:26 +00:00
Use GitHub-hosted Windows for the temporary Tauri ARM64 test job because the Blacksmith Windows Build Tools image does not expose the ARM64 MSVC linker/libs we need. The hosted Windows images already include LLVM and VC.Tools.ARM64, so we can drop the custom installer and linker hacks.
123 lines
3.4 KiB
YAML
123 lines
3.4 KiB
YAML
name: test-windows-arm64
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- feat/windows-arm64-support
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
|
|
jobs:
|
|
build-cli:
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: ./.github/actions/setup-bun
|
|
|
|
- name: Build
|
|
run: ./packages/opencode/script/build.ts
|
|
env:
|
|
OPENCODE_VERSION: 0.0.0-windows-arm64-test
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: opencode-cli
|
|
path: packages/opencode/dist
|
|
|
|
build-tauri:
|
|
needs: build-cli
|
|
runs-on: windows-2025
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-tags: true
|
|
|
|
- uses: ./.github/actions/setup-bun
|
|
|
|
- name: install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: aarch64-pc-windows-msvc
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: packages/desktop/src-tauri
|
|
shared-key: aarch64-pc-windows-msvc
|
|
|
|
- name: Create test config
|
|
shell: pwsh
|
|
run: |
|
|
$cfg = Get-Content "packages/desktop/src-tauri/tauri.prod.conf.json" -Raw | ConvertFrom-Json -AsHashtable
|
|
$cfg.bundle.createUpdaterArtifacts = $false
|
|
if ($cfg.plugins) { $cfg.plugins.Remove("updater") }
|
|
$cfg | ConvertTo-Json -Depth 100 | Set-Content "packages/desktop/src-tauri/tauri.test.conf.json"
|
|
|
|
- name: Prepare
|
|
run: |
|
|
cd packages/desktop
|
|
bun ./scripts/prepare.ts
|
|
env:
|
|
OPENCODE_VERSION: 0.0.0-windows-arm64-test
|
|
RUST_TARGET: aarch64-pc-windows-msvc
|
|
GH_TOKEN: ${{ github.token }}
|
|
GITHUB_RUN_ID: ${{ github.run_id }}
|
|
|
|
- name: Build and upload artifacts
|
|
uses: tauri-apps/tauri-action@390cbe447412ced1303d35abe75287949e43437a
|
|
timeout-minutes: 60
|
|
with:
|
|
projectPath: packages/desktop
|
|
uploadWorkflowArtifacts: true
|
|
args: --target aarch64-pc-windows-msvc --config ./src-tauri/tauri.test.conf.json --verbose
|
|
updaterJsonPreferNsis: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
build-electron:
|
|
needs: build-cli
|
|
runs-on: blacksmith-4vcpu-windows-2025
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: ./.github/actions/setup-bun
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
|
|
- name: Prepare
|
|
run: bun ./scripts/prepare.ts
|
|
working-directory: packages/desktop-electron
|
|
env:
|
|
OPENCODE_VERSION: 0.0.0-windows-arm64-test
|
|
OPENCODE_CHANNEL: prod
|
|
RUST_TARGET: aarch64-pc-windows-msvc
|
|
GH_TOKEN: ${{ github.token }}
|
|
GITHUB_RUN_ID: ${{ github.run_id }}
|
|
|
|
- name: Build
|
|
run: bun run build
|
|
working-directory: packages/desktop-electron
|
|
env:
|
|
OPENCODE_CHANNEL: prod
|
|
|
|
- name: Package
|
|
run: npx electron-builder --win --arm64 --publish never --config electron-builder.config.ts
|
|
working-directory: packages/desktop-electron
|
|
timeout-minutes: 60
|
|
env:
|
|
OPENCODE_CHANNEL: prod
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: opencode-electron-aarch64-pc-windows-msvc
|
|
path: packages/desktop-electron/dist/*
|