Skip to content

Add live Claude lifecycle conformance tests #1193

Add live Claude lifecycle conformance tests

Add live Claude lifecycle conformance tests #1193

Workflow file for this run

name: Build Executable
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-exe:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Read package version
run: |
VERSION="$(bun -e 'console.log(require("./package.json").version)')"
echo "PACKAGE_VERSION=${VERSION}" >> "$GITHUB_ENV"
- name: Install server dependencies
working-directory: server
run: bun install --frozen-lockfile
- name: Install web dependencies
working-directory: web
run: bun install --frozen-lockfile
- name: Install integration-test dependencies
working-directory: integration-tests
run: bun install --frozen-lockfile
- name: Compile Paraglide messages
working-directory: web
run: bun run i18n:compile
- name: Run checks
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
run: bun run check
- name: Run server tests
run: bun run test:server
- name: Run web tests for release validation
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
run: bun run --cwd web test
- name: Build web app
run: bun run build
- name: Compile executables
run: bun run build-exe:compile --target=linux-x64,windows-x64
- name: Smoke test Linux x64 executable
run: bun run build-exe:smoke:linux-x64
- name: Verify executables exist
run: |
# Leaves Darwin arm64 disabled until the produced binary stops failing Gatekeeper with "damaged and can't be opened".
for executable in dist/garcon-linux-x64 dist/garcon-windows-x64.exe; do
if [ ! -f "$executable" ]; then
echo "Expected executable at $executable"
ls -la dist || true
exit 1
fi
ls -la "$executable"
file "$executable" || true
done
- name: Prepare executable artifacts
run: |
mkdir -p artifacts
cp dist/garcon-linux-x64 "artifacts/garcon-v${PACKAGE_VERSION}-linux-x64"
cp dist/garcon-windows-x64.exe "artifacts/garcon-v${PACKAGE_VERSION}-windows-x64.exe"
ls -la artifacts
- name: Upload Linux x64 executable artifact
uses: actions/upload-artifact@v4
with:
name: garcon-v${{ env.PACKAGE_VERSION }}-linux-x64
path: artifacts/garcon-v${{ env.PACKAGE_VERSION }}-linux-x64
if-no-files-found: error
- name: Upload Windows x64 executable artifact
uses: actions/upload-artifact@v4
with:
name: garcon-v${{ env.PACKAGE_VERSION }}-windows-x64.exe
path: artifacts/garcon-v${{ env.PACKAGE_VERSION }}-windows-x64.exe
if-no-files-found: error
release:
name: Create Release
needs: build-exe
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Read package version
run: |
VERSION="$(bun -e 'console.log(require("./package.json").version)')"
echo "PACKAGE_VERSION=${VERSION}" >> "$GITHUB_ENV"
- name: Download Linux x64 executable artifact
uses: actions/download-artifact@v4
with:
name: garcon-v${{ env.PACKAGE_VERSION }}-linux-x64
path: artifacts
- name: Download Windows x64 executable artifact
uses: actions/download-artifact@v4
with:
name: garcon-v${{ env.PACKAGE_VERSION }}-windows-x64.exe
path: artifacts
- name: Package release assets
run: |
for artifact in "garcon-v${PACKAGE_VERSION}-linux-x64" "garcon-v${PACKAGE_VERSION}-windows-x64.exe"; do
if [ ! -f "artifacts/${artifact}" ]; then
echo "Missing downloaded executable artifact: ${artifact}"
ls -la artifacts || true
exit 1
fi
(
cd artifacts
zip -q "${artifact}.zip" "${artifact}"
)
done
- name: List release artifacts
run: |
echo "Downloaded artifacts:"
find artifacts -type f -name '*.zip' | sort
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*.zip
draft: true
generate_release_notes: true