Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

ci: macOS and Windows compile on every push, the parity suite must run, the perf table is checked, a release waits for CI; the docs stop saying what is not so

Jareer9750239a32d3
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6ef33b3c..f265f977 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,6 +7,9 @@ on:
branches: [main]
pull_request:
workflow_dispatch:
+ # release.yml runs this before it builds anything: a tag on a red tree
+ # is not a release.
+ workflow_call:
concurrency:
group: ci-${{ github.ref }}
@@ -31,13 +34,16 @@ jobs:
# Slint's Skia renderer links fontconfig and freetype; cpal links
# ALSA; bindgen needs libclang; whisper.cpp is built by cmake; the
- # file dialogs link GTK on Linux.
+ # file dialogs link GTK on Linux. Mesa's Vulkan drivers bring
+ # lavapipe, a software GPU, so the compositor's parity suite runs
+ # here rather than skipping for want of an adapter.
- name: System libraries
run: |
sudo apt-get update
sudo apt-get install -y \
libfontconfig1-dev libfreetype6-dev libxkbcommon-dev libgl1-mesa-dev \
- libgtk-3-dev libasound2-dev libclang-dev cmake
+ libgtk-3-dev libasound2-dev libclang-dev cmake \
+ libvulkan1 mesa-vulkan-drivers
# Ubuntu's packaged FFmpeg is older than the 7 the engine needs, so the
# libraries come from BtbN, and FFMPEG_DIR tells the bindings where.
@@ -84,10 +90,18 @@ jobs:
# most.
- run: cargo clippy --workspace --all-targets -- -D warnings
working-directory: src
+ # CONCAT_REQUIRE_GPU: the GPU tests fail rather than skip when no
+ # adapter is usable, so the parity suite is known to have run.
- run: cargo test --workspace -j 1
working-directory: src
env:
CARGO_PROFILE_DEV_DEBUG: "0"
+ CONCAT_REQUIRE_GPU: "1"
+ # The performance table's quick scenarios against their budgets, in
+ # the `quick` profile: planning, undo, the document, publishing.
+ # The media scenarios need a machine that is not a shared runner.
+ - run: cargo run -p concat-perf --profile quick -- --check --quick
+ working-directory: src
# The gRPC transport is a feature nothing else in the workspace turns
# on, so it is linted and tested here on its own. See concat-server.
- run: cargo clippy -p concat-server -p concat-cli --features grpc --all-targets -- -D warnings
@@ -118,3 +132,74 @@ jobs:
--features concat-render/gpu --target wasm32-unknown-unknown
-- -D warnings
working-directory: src
+
+ # The window and the engine compiled where they ship. Linux is the job
+ # above; macOS and Windows used to be compiled only by a release tag,
+ # which is where a broken platform path was found. A check, not the
+ # tests: the dependencies are the same as build-app.yml's, and what this
+ # catches is code that does not build on the platform.
+ desktop:
+ name: Compiles on ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - os: macos-15
+ sherpa: osx-arm64
+ - os: windows-2022
+ sherpa: win-x64
+ runs-on: ${{ matrix.os }}
+ env:
+ FFMPEG_WINDOWS: https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n8.1-latest-win64-gpl-shared-8.1.zip
+ steps:
+ - uses: actions/checkout@v7
+ - uses: dtolnay/rust-toolchain@stable
+ - name: FFmpeg (macOS)
+ if: runner.os == 'macOS'
+ run: |
+ set -euo pipefail
+ brew install ffmpeg cmake
+ echo "FFMPEG_DIR=$(brew --prefix ffmpeg)" >> "$GITHUB_ENV"
+ - name: FFmpeg and LLVM (Windows)
+ if: runner.os == 'Windows'
+ shell: pwsh
+ run: |
+ $ErrorActionPreference = "Stop"
+ choco install llvm -y --no-progress
+ "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
+ "LIBCLANG_PATH=C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_ENV -Append
+ curl.exe -fsSL --retry 5 --retry-all-errors -o ffmpeg-win.zip "$env:FFMPEG_WINDOWS"
+ Expand-Archive ffmpeg-win.zip -DestinationPath ffdl
+ $dir = (Get-ChildItem ffdl -Directory | Select-Object -First 1).FullName
+ "FFMPEG_DIR=$dir" | Out-File -FilePath $env:GITHUB_ENV -Append
+ "$dir\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
+ # The prebuilt sherpa-onnx library, as build-app.yml fetches it:
+ # static on macOS, the import libraries alone on Windows.
+ - name: sherpa-onnx libraries
+ shell: bash
+ run: |
+ set -euo pipefail
+ version=$(grep -A1 'name = "sherpa-onnx-sys"' src/Cargo.lock | sed -n 's/^version = "\(.*\)"/\1/p')
+ if [ "$RUNNER_OS" = "Windows" ]; then
+ stem="sherpa-onnx-v$version-${{ matrix.sherpa }}-shared-MT-Release-lib"
+ else
+ stem="sherpa-onnx-v$version-${{ matrix.sherpa }}-static-lib"
+ fi
+ echo "Downloading $stem"
+ curl -fsSL --retry 5 --retry-all-errors -o sherpa.tar.bz2 "https://github.com/k2-fsa/sherpa-onnx/releases/download/v$version/$stem.tar.bz2"
+ mkdir -p sherpa
+ python3 -c "import tarfile; t = tarfile.open('sherpa.tar.bz2'); t.extractall('sherpa', **({'filter': 'data'} if hasattr(tarfile, 'data_filter') else {}))"
+ test -d "sherpa/$stem/lib"
+ if [ "$RUNNER_OS" = "Windows" ]; then
+ mkdir -p sherpa-libs
+ cp "sherpa/$stem/lib/"*.lib sherpa-libs/
+ echo "SHERPA_ONNX_LIB_DIR=$(pwd -W)\\sherpa-libs" >> "$GITHUB_ENV"
+ else
+ echo "SHERPA_ONNX_LIB_DIR=$PWD/sherpa/$stem/lib" >> "$GITHUB_ENV"
+ fi
+ - uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: src
+ key: check-${{ matrix.os }}
+ - run: cargo check --workspace --all-targets
+ working-directory: src
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index cab49b48..c245ee10 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,10 +10,11 @@ name: Release
# about.
#
# The bundles are self-contained: the macOS .dmg carries its FFmpeg dylibs
-# and is notarised when the signing secrets are set; the Linux tarball and
-# the Windows zip carry the FFmpeg runtime libraries beside the binary; the
-# Android .apk is signed with the repository's key, and the iOS .ipa is
-# signed by the tester on the way onto the phone.
+# and is notarised when the signing secrets are set; the Linux packages
+# (.deb, .rpm, .AppImage, Arch) and the Windows installers carry the
+# FFmpeg runtime libraries beside the binary; the Android .apk is signed
+# with the repository's key, and the iOS .ipa is signed by the tester on
+# the way onto the phone. Nothing is built until CI has passed on the tag.
on:
push:
tags: ["v*"]
@@ -56,13 +57,19 @@ jobs:
# v0.2.1-alpha.22 both produce Concat-0.2.1-* files.
echo "version=$version" >> "$GITHUB_OUTPUT"
+ # The engine's tests and lints, on the tagged commit: a tag on a red
+ # tree is not a release.
+ engine:
+ name: CI
+ uses: ./.github/workflows/ci.yml
+
build:
- needs: [check]
+ needs: [check, engine]
uses: ./.github/workflows/build-app.yml
secrets: inherit
phones:
- needs: [check]
+ needs: [check, engine]
uses: ./.github/workflows/mobile.yml
secrets: inherit
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 4f5b7ada..51cccb6d 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -49,6 +49,7 @@ graph BT
host --> export
host --> text
speech --> host
+ speech --> media
api --> host
server --> api
cli --> server
@@ -288,7 +289,7 @@ time to present a token.
| Suite | Where | What it holds |
|---|---|---|
-| Unit tests, 429 across 75 files | every crate | the arithmetic, the commands, the reader, the plan |
+| Unit tests (`cargo test --workspace` prints the count) | every crate | the arithmetic, the commands, the reader, the plan |
| Export end to end | `concat-host/tests/export.rs` | every edit a person can make exports, through real `Session` commands over synthetic media, read back; crashes hard on purpose |
| Parity | `concat-render/src/gpu/tests.rs` | the GPU against the CPU reference by SSIM, one plan per feature |
| Hostile packages | `concat-effects/src/shader.rs` tests | the unbounded loop, the extra binding, the oversized table are refused |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7969965d..042f1451 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -40,7 +40,7 @@ Slint UI - is one Cargo workspace under `src/`.
| Path | What lives there |
|---|---|
| `src/crates/` | The engine (core, media, render, export, project), the host layer (`concat-host`, `concat-speech`), the CLI, and `concat`, the Slint editor window |
-| `test/` | Media and analysis fixtures |
+| `test/` | Python prototypes of analyses, kept for reference (see `test/README.md`); no fixtures and no automated tests |
[`src/README.md`](src/README.md) explains how the crates fit together and
where the sharp edges are. Read it before touching the engine.
diff --git a/README.md b/README.md
index 29afb3ea..f2f5988f 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ It runs entirely on your machine, powered by a native Rust engine. Install it an
- 📝 **Titles and styled text.**
- 📦 **Templates.** Build an edit once, reuse it.
- 🖥️ **macOS, Windows and Linux.** Same app everywhere.
-- 🌍 **Twelve languages.** Add one with a single JSON file, see [TRANSLATING.md](TRANSLATING.md).
+- 🌍 **Fourteen languages.** Add one with a single JSON file, see [TRANSLATING.md](TRANSLATING.md).
## Get started
diff --git a/TRANSLATING.md b/TRANSLATING.md
index 5ec3da14..becdd1b9 100644
--- a/TRANSLATING.md
+++ b/TRANSLATING.md
@@ -55,8 +55,8 @@ change.
4. Open a pull request. Corrections to the languages Concat already ships
are just as welcome as new ones.
-Concat ships English, Deutsch, Español, Français, Italiano, 日本語, 한국어,
-Português (Brasil), Русский, Türkçe, 简体中文 and 正體中文.
+Concat ships English, Deutsch, Español, فارسی, Français, Hrvatski, Italiano,
+日本語, 한국어, Português (Brasil), Русский, Türkçe, 简体中文 and 正體中文.
## For developers
diff --git a/src/README.md b/src/README.md
index 8a891606..aa6dde71 100644
--- a/src/README.md
+++ b/src/README.md
@@ -112,8 +112,8 @@ cargo build --release -p concat --target aarch64-apple-ios
scripts/ios-app.sh aarch64-apple-ios release # Concat.app
```
-`.github/workflows/mobile.yml` runs exactly this on every push and keeps
-the FFmpeg builds cached. The window is one library: `concat` on the
+`.github/workflows/mobile.yml` runs exactly this on every pull request
+and on a release tag, and keeps the FFmpeg builds cached. The window is one library: `concat` on the
desktop and on iOS runs it from `main.rs`, `concat-android` from the
activity's `android_main`, and `crates/concat/src/platform.rs` is where
the three differ - how the backend is chosen, how files are picked, and
@@ -126,7 +126,8 @@ a person waits on are - planning a frame, an undo, opening a document,
decoding, a scrub through the cache, compositing on the CPU and the GPU,
an export - each against a budget, on synthetic media so the numbers are
the machine's and the code's. `--check` fails the run when a scenario is
-outside its budget, which is what CI wants; `--quick` skips the media.
+outside its budget; `--quick` skips the media, and CI runs the quick set
+that way on every push.
The quick scenarios also run under `cargo test`, so a regression there
stops the build. See `crates/concat-perf/src/main.rs` for what each
number means and what is not measured.
diff --git a/src/crates/concat-render/src/gpu/tests.rs b/src/crates/concat-render/src/gpu/tests.rs
index 0422106f..5b0f8485 100644
--- a/src/crates/concat-render/src/gpu/tests.rs
+++ b/src/crates/concat-render/src/gpu/tests.rs
@@ -20,6 +20,13 @@ use crate::plan::{Crop, Transition, detached_clip};
fn gpu() -> Option<WgpuCompositor> {
let compositor = WgpuCompositor::new();
if compositor.is_none() {
+ // CI installs a software Vulkan driver so this suite runs there; a
+ // machine that says it must run and has no adapter is a broken
+ // setup, not a skip.
+ assert!(
+ std::env::var_os("CONCAT_REQUIRE_GPU").is_none(),
+ "CONCAT_REQUIRE_GPU is set and no GPU adapter is usable"
+ );
eprintln!("no usable GPU adapter; skipping");
}
compositor