Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:
branches: ["**"]
pull_request:

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0

jobs:
test:
name: Test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: rust
- name: Format
working-directory: rust
run: cargo fmt --check
- name: Clippy
working-directory: rust
run: cargo clippy --all-targets -- -D warnings
- name: Test
working-directory: rust
run: cargo test --all-targets

# Catch desktop build breakage on every push, not just at release time.
desktop-check:
name: Desktop check (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Linux build dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev \
patchelf libgtk-3-dev pkg-config build-essential
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: desktop
- name: Check
working-directory: desktop
run: cargo check --all-targets
250 changes: 250 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
name: Release

# Publishes the server binaries and the desktop bundles for every platform.
# Trigger with a tag (`git tag v0.1.0 && git push --tags`) or run manually.
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to publish (e.g. v0.1.0)"
required: true

permissions:
contents: write

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0

jobs:
# ---------------------------------------------------------------------------
# Gate the release on a green test suite before anything is built.
# ---------------------------------------------------------------------------
test:
name: Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: rust
- name: Run tests
working-directory: rust
run: cargo test --all-targets

create-release:
name: Create draft release
needs: test
runs-on: ubuntu-22.04
outputs:
release_id: ${{ steps.draft.outputs.result }}
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: version
run: echo "version=${{ github.event.inputs.tag || github.ref_name }}" >> "$GITHUB_OUTPUT"
- id: draft
uses: actions/github-script@v7
with:
script: |
const version = '${{ steps.version.outputs.version }}';
const { data } = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: version,
name: `SplatLab ${version}`,
body: [
'## SplatLab ' + version,
'',
'Self-hosted control plane for video-to-3D Gaussian reconstruction.',
'',
'### Desktop app',
'| Platform | Download |',
'| --- | --- |',
'| Windows x86_64 | `.msi` / `.exe` (NSIS) |',
'| macOS Apple Silicon | `_aarch64.dmg` |',
'| macOS Intel | `_x64.dmg` |',
'| Linux x86_64 | `.deb` / `.rpm` / `.AppImage` |',
'| Linux arm64 | `.deb` / `.rpm` |',
'',
'### Server',
'Standalone `splatlab` binaries are attached for each platform.',
'The SPA is embedded, so the binary is entirely self-contained.',
].join('\n'),
draft: true,
prerelease: false,
});
return data.id;
result-encoding: string

# ---------------------------------------------------------------------------
# Desktop bundles. Tauri emits deb + rpm + AppImage on Linux, msi + nsis on
# Windows, and a dmg per architecture on macOS.
# ---------------------------------------------------------------------------
desktop:
name: Desktop (${{ matrix.label }})
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- label: linux-x86_64
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
args: ""
- label: linux-aarch64
os: ubuntu-22.04-arm
target: aarch64-unknown-linux-gnu
args: ""
- label: macos-aarch64
os: macos-14
target: aarch64-apple-darwin
args: "--target aarch64-apple-darwin"
- label: macos-x86_64
os: macos-13
target: x86_64-apple-darwin
args: "--target x86_64-apple-darwin"
- label: windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
args: ""
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Install Linux build dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
build-essential \
curl wget file \
libgtk-3-dev \
pkg-config \
rpm

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2
with:
workspaces: desktop
key: ${{ matrix.target }}

- name: Build and upload desktop bundle
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Signing is optional; the workflow still succeeds without secrets set.
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}
projectPath: desktop
args: ${{ matrix.args }}

# ---------------------------------------------------------------------------
# Standalone server binaries (no GUI toolkit needed).
# ---------------------------------------------------------------------------
server:
name: Server (${{ matrix.label }})
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- label: linux-x86_64
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- label: linux-aarch64
os: ubuntu-22.04-arm
target: aarch64-unknown-linux-gnu
- label: macos-aarch64
os: macos-14
target: aarch64-apple-darwin
- label: macos-x86_64
os: macos-13
target: x86_64-apple-darwin
- label: windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2
with:
workspaces: rust
key: server-${{ matrix.target }}

- name: Build
working-directory: rust
run: cargo build --release --bin splatlab --target ${{ matrix.target }}

- name: Package (unix)
if: matrix.os != 'windows-latest'
working-directory: rust
run: |
NAME="splatlab-${{ needs.create-release.outputs.version }}-${{ matrix.label }}"
mkdir -p "dist/$NAME"
cp "target/${{ matrix.target }}/release/splatlab" "dist/$NAME/"
cp ../LICENSE README.md "dist/$NAME/"
tar -C dist -czf "dist/$NAME.tar.gz" "$NAME"
shasum -a 256 "dist/$NAME.tar.gz" > "dist/$NAME.tar.gz.sha256"

- name: Package (windows)
if: matrix.os == 'windows-latest'
working-directory: rust
shell: pwsh
run: |
$name = "splatlab-${{ needs.create-release.outputs.version }}-${{ matrix.label }}"
New-Item -ItemType Directory -Force -Path "dist/$name" | Out-Null
Copy-Item "target/${{ matrix.target }}/release/splatlab.exe" "dist/$name/"
Copy-Item "../LICENSE","README.md" "dist/$name/"
Compress-Archive -Path "dist/$name" -DestinationPath "dist/$name.zip"
(Get-FileHash "dist/$name.zip" -Algorithm SHA256).Hash | Out-File "dist/$name.zip.sha256"

- name: Upload to release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.create-release.outputs.version }}
files: |
rust/dist/*.tar.gz
rust/dist/*.zip
rust/dist/*.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# ---------------------------------------------------------------------------
publish:
name: Publish release
needs: [create-release, desktop, server]
runs-on: ubuntu-22.04
steps:
- uses: actions/github-script@v7
with:
script: |
await github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ needs.create-release.outputs.release_id }},
draft: false,
});
2 changes: 2 additions & 0 deletions desktop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/gen/schemas
Loading
Loading