68 lines
1.5 KiB
YAML
68 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
TYPST_COMMIT: 9dfd3a08500b7896045f907433cf7b4b02434fad
|
|
|
|
jobs:
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install
|
|
|
|
- name: Type check
|
|
run: bun run check
|
|
|
|
- name: Build
|
|
run: bun run build
|
|
|
|
backend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: typst-desktop
|
|
|
|
- name: Clone Typst compiler
|
|
run: |
|
|
git clone https://github.com/typst/typst.git typst-desktop/typst
|
|
git -C typst-desktop/typst checkout "$TYPST_COMMIT"
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libssl-dev pkg-config
|
|
|
|
- name: Set up Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
typst-desktop/src-tauri/target
|
|
key: cargo-${{ hashFiles('typst-desktop/src-tauri/Cargo.lock') }}
|
|
restore-keys: cargo-
|
|
|
|
- name: Check
|
|
working-directory: typst-desktop/src-tauri
|
|
run: cargo check
|