Skip to content

Embed Atelier as FlashType's workspace shell #537

Embed Atelier as FlashType's workspace shell

Embed Atelier as FlashType's workspace shell #537

name: Continuous Integration
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:
branches:
- "**"
jobs:
next-release:
name: Next release
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Validate NEXT_RELEASE.md
run: node scripts/validate-next-release.mjs
ci:
strategy:
matrix:
os: [blacksmith-8vcpu-ubuntu-2404]
version: [22]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pnpm
uses: pnpm/action-setup@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
cache: "pnpm"
- name: Install native Lix build dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang libclang-dev llvm-dev
- name: Install Rust wasm target
run: |
rustup target add wasm32-unknown-unknown
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ github.job }}-${{ matrix.os }}
workspaces: |
submodule/lix -> ../../target
cache-on-failure: true
- name: Resolve Lix SDK cache key
id: lix-sdk-cache-key
run: echo "sha=$(git -C submodule/lix rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Restore Lix SDK build cache
uses: actions/cache@v4
with:
path: |
submodule/lix/packages/js-sdk/dist
submodule/lix/packages/js-sdk/lix_js_sdk.node
key: lix-js-sdk-${{ runner.os }}-${{ runner.arch }}-node-${{ matrix.version }}-${{ steps.lix-sdk-cache-key.outputs.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Rust wasm tools
run: |
cargo install wasm-bindgen-cli --version 0.2.108 --locked
- name: Install dependencies
run: pnpm install
- run: pnpm run ci
- name: Install Playwright system dependencies
run: |
pnpm exec playwright install-deps chromium
pnpm exec playwright install chromium
- name: Run Electron e2e tests
run: xvfb-run --auto-servernum pnpm run test:e2e:headed
- name: Upload Electron e2e diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: electron-e2e-diagnostics
if-no-files-found: ignore
path: |
test-results
playwright-report
- name: Validate submodule branches
run: |
git submodule foreach '
branch=$(git config -f "$toplevel/.gitmodules" "submodule.$name.branch" || :)
test -z "$branch" && exit 0
if test "$(git rev-parse --is-shallow-repository)" = "true"; then
git fetch --no-tags --unshallow origin "refs/heads/$branch"
else
git fetch --no-tags origin "refs/heads/$branch"
fi
git merge-base --is-ancestor "$sha1" FETCH_HEAD || {
echo "$sm_path: $sha1 is not reachable from origin/$branch"
exit 1
}
'
macos-release-build-check:
runs-on: blacksmith-12vcpu-macos-15
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pnpm
uses: pnpm/action-setup@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Configure native Lix build dependencies
run: |
brew list llvm >/dev/null 2>&1 || brew install llvm
LLVM_PREFIX="$(brew --prefix llvm)"
{
echo "LIBCLANG_PATH=$LLVM_PREFIX/lib"
echo "LLVM_CONFIG_PATH=$LLVM_PREFIX/bin/llvm-config"
echo "DYLD_LIBRARY_PATH=$LLVM_PREFIX/lib:${DYLD_LIBRARY_PATH:-}"
echo "DYLD_FALLBACK_LIBRARY_PATH=$LLVM_PREFIX/lib:${DYLD_FALLBACK_LIBRARY_PATH:-}"
} >> "$GITHUB_ENV"
- name: Install Rust wasm target
run: |
if ! command -v rustup >/dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.cargo/bin:$PATH"
fi
rustup target add wasm32-unknown-unknown
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ github.job }}
workspaces: |
submodule/lix -> ../../target
cache-on-failure: true
- name: Resolve Lix SDK cache key
id: lix-sdk-cache-key
run: echo "sha=$(git -C submodule/lix rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Restore Lix SDK build cache
uses: actions/cache@v4
with:
path: |
submodule/lix/packages/js-sdk/dist
submodule/lix/packages/js-sdk/lix_js_sdk.node
key: lix-js-sdk-${{ runner.os }}-${{ runner.arch }}-node-22-${{ steps.lix-sdk-cache-key.outputs.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Rust wasm tools
run: |
cargo install wasm-bindgen-cli@0.2.108 cargo-bash resvg@0.47.0 --locked
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Prepare optional macOS signing
env:
MACOS_CSC_LINK: ${{ secrets.CSC_LINK }}
MACOS_CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
run: |
if [ -n "${MACOS_CSC_LINK:-}" ]; then
{
echo "CSC_LINK=${MACOS_CSC_LINK}"
echo "CSC_KEY_PASSWORD=${MACOS_CSC_KEY_PASSWORD}"
echo "CSC_FOR_PULL_REQUEST=true"
} >> "$GITHUB_ENV"
else
echo "CSC_IDENTITY_AUTO_DISCOVERY=false" >> "$GITHUB_ENV"
echo "Skipping macOS code signing because CSC_LINK is unavailable."
fi
- name: Build macOS assets
run: pnpm run package:mac
- name: Verify macOS app signature (diagnostic)
run: |
if [ -n "${CSC_LINK:-}" ]; then
codesign --verify --deep --strict --verbose=2 release/mac-arm64/Flashtype.app
else
echo "Skipping signature verification because CSC_LINK is unavailable."
fi
- name: Test packaged macOS app
run: pnpm run test:e2e:packaged-macos
- name: Upload packaged macOS diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: macos-packaged-app-diagnostics
if-no-files-found: ignore
path: |
release/*.dmg
release/*.zip
test-results
playwright-report