Skip to content

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

Build the phones into the nightly and the releases

Jareer51b4e1e599bd
diff --git a/.github/release-notes.sh b/.github/release-notes.sh
index da7bf181..bc25556e 100755
--- a/.github/release-notes.sh
+++ b/.github/release-notes.sh
@@ -44,6 +44,8 @@ cat <<'EOF'
| macOS | `macos-arm64.dmg` | `macos-x86_64.dmg` | |
| Windows | | `windows-x86_64.zip` | `windows-aarch64.zip` |
| Linux | | `linux-x86_64.tar.gz` | `linux-aarch64.tar.gz` |
+| Android | | | `android-arm64.apk` |
+| iOS / iPadOS | | | `ios-arm64.ipa` |
Every bundle runs with nothing else installed.
@@ -53,6 +55,11 @@ Every bundle runs with nothing else installed.
stay beside it.
- **Linux**: `tar xzf` the archive and run `./concat` from the folder;
`concat.desktop` is there for a launcher.
+- **Android**: open the `.apk` on the phone and allow the install from
+ this source; Android 8.0 or newer, 64-bit.
+- **iOS / iPadOS**: sideload the `.ipa` with AltStore, Sideloadly or
+ Xcode's Devices window, which sign it with your Apple ID; iOS 15 or
+ newer.
`SHA256SUMS` lists each file's checksum.
diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml
index d80cff08..ae75e788 100644
--- a/.github/workflows/mobile.yml
+++ b/.github/workflows/mobile.yml
@@ -1,29 +1,47 @@
name: Build for phones
-# Builds Concat for Android and iOS on every push to main and every pull
-# request, and uploads what each produces: an APK, and the iOS app bundle
-# ready for a signing identity. Phones are cross-compiled - the Android
-# job runs on Linux with the NDK, the iOS job on macOS with Xcode - and
-# the two native libraries that cannot be fetched prebuilt for a phone are
-# built from source here and cached: FFmpeg by engine/scripts/ffmpeg-mobile.sh,
-# with the platform's hardware codecs, and whisper.cpp by its crate.
-# sherpa-onnx comes prebuilt from k2-fsa through engine/scripts/sherpa-mobile.sh.
+# Builds Concat for Android and iOS and uploads one artifact per phone,
+# named like the desktop bundles from build-app.yml:
+#
+# Android arm64 -> Concat-<version>-android-arm64.apk
+# iOS arm64 -> Concat-<version>-ios-arm64.ipa
+#
+# Reusable, the way build-app.yml is: nightly.yml calls it on every push
+# to main and release.yml on every tag, so the nightly and the releases
+# carry the phones beside the desktops. Pull requests build here directly.
+#
+# Phones are cross-compiled - the Android job runs on Linux with the NDK,
+# the iOS job on macOS with Xcode - and the two native libraries that
+# cannot be fetched prebuilt for a phone are built from source here and
+# cached: FFmpeg by engine/scripts/ffmpeg-mobile.sh, with the platform's
+# hardware codecs, and whisper.cpp by its crate. sherpa-onnx comes prebuilt
+# from k2-fsa through engine/scripts/sherpa-mobile.sh.
#
# engine/scripts/mobile-env.sh is the one description of the build
# environment, here and on a developer's machine.
#
# The APK is signed with the repository's key when ANDROID_KEYSTORE (the
# keystore, base64) and ANDROID_KEYSTORE_PASSWORD are set as secrets, and
-# with a key made for the run when they are not.
+# with a key made for the run when they are not. The .ipa is ad-hoc
+# signed: a tester signs it with their own Apple ID on the way onto a
+# phone (AltStore, Sideloadly, Xcode's Devices window all do this).
on:
- push:
- branches: [main]
+ workflow_call:
+ secrets:
+ ANDROID_KEYSTORE:
+ description: Base64 of the release keystore
+ required: false
+ ANDROID_KEYSTORE_PASSWORD:
+ required: false
pull_request:
workflow_dispatch:
+# Keyed by the calling workflow too, so a call from the nightly or a
+# release never shares a group with a pull request's run. A tag's release
+# is never cancelled; everything else is superseded by the next push.
concurrency:
- group: mobile-${{ github.ref }}
- cancel-in-progress: true
+ group: mobile-${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
env:
CARGO_TERM_COLOR: always
@@ -38,6 +56,12 @@ jobs:
timeout-minutes: 90
steps:
- uses: actions/checkout@v7
+ - name: Read the version
+ id: version
+ run: |
+ version=$(sed -n 's/^version = "\(.*\)"/\1/p' engine/Cargo.toml | head -1)
+ echo "version=$version" >> "$GITHUB_OUTPUT"
+ echo "Building Concat $version for aarch64-linux-android"
# The engine pins its toolchain in rust-toolchain.toml, so the phone's
# standard library is added to that toolchain from inside engine/,
# where the pin applies.
@@ -125,10 +149,21 @@ jobs:
} >> "$GITHUB_STEP_SUMMARY"
fi
- - uses: actions/upload-artifact@v4
+ # Named by version and target, as the desktop bundles are; the
+ # nightly stamps its commit into the same name.
+ - name: Stage
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ run: |
+ set -euo pipefail
+ mkdir stage
+ cp engine/target/release/apk/Concat.apk "stage/Concat-$VERSION-android-arm64.apk"
+ ls -l stage
+
+ - uses: actions/upload-artifact@v7
with:
name: Concat-android-arm64
- path: engine/target/release/apk/Concat.apk
+ path: stage/*
if-no-files-found: error
ios:
@@ -137,6 +172,12 @@ jobs:
timeout-minutes: 90
steps:
- uses: actions/checkout@v7
+ - name: Read the version
+ id: version
+ run: |
+ version=$(sed -n 's/^version = "\(.*\)"/\1/p' engine/Cargo.toml | head -1)
+ echo "version=$version" >> "$GITHUB_OUTPUT"
+ echo "Building Concat $version for aarch64-apple-ios"
# The engine pins its toolchain in rust-toolchain.toml, so the phone's
# standard library is added to that toolchain from inside engine/,
# where the pin applies.
@@ -198,8 +239,23 @@ jobs:
- name: Bundle
run: engine/scripts/ios-app.sh aarch64-apple-ios release
- - uses: actions/upload-artifact@v4
+ # An .ipa is the bundle under Payload/ in a zip: the form every
+ # sideloading tool and Xcode's Devices window take, re-signing it
+ # with the tester's own identity on the way onto the phone. ditto
+ # keeps the bundle's signature and resource forks where zip would
+ # not.
+ - name: Stage
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ run: |
+ set -euo pipefail
+ mkdir -p stage payload/Payload
+ cp -R engine/target/aarch64-apple-ios/release/Concat.app payload/Payload/
+ (cd payload && ditto -c -k --keepParent Payload "../stage/Concat-$VERSION-ios-arm64.ipa")
+ ls -l stage
+
+ - uses: actions/upload-artifact@v7
with:
name: Concat-ios-arm64
- path: engine/target/aarch64-apple-ios/release/Concat.app
+ path: stage/*
if-no-files-found: error
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 26063669..29bf4973 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -1,9 +1,9 @@
name: Nightly
# Every push to main that passes the engine's tests builds the app for every
-# platform and architecture and refreshes the rolling `nightly` pre-release
-# with the bundles: the latest main, always downloadable, without anyone
-# cutting a tag. The tag is moved to the commit the bundles were built from,
+# platform and architecture, desktops and phones, and refreshes the rolling
+# `nightly` pre-release with the bundles: the latest main, always
+# downloadable, without anyone cutting a tag. The tag is moved to the commit the bundles were built from,
# so the release page's "compare" and its notes stay honest.
#
# Tagged releases (release.yml) are the ones to point people at; this is the
@@ -27,9 +27,14 @@ jobs:
uses: ./.github/workflows/build-app.yml
secrets: inherit
+ phones:
+ if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
+ uses: ./.github/workflows/mobile.yml
+ secrets: inherit
+
publish:
name: Refresh the nightly release
- needs: [build]
+ needs: [build, phones]
runs-on: ubuntu-latest
permissions:
contents: write
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 25b46f08..cee5e6ee 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,8 +1,9 @@
name: Release
# Pushing a tag that starts with v (v0.3.0, v0.3.0-alpha.1, ...) builds the
-# app for every platform and architecture and publishes a GitHub release
-# under that tag with one bundle per target and a checksum file. A tag
+# app for every platform and architecture, desktops and phones, and
+# publishes a GitHub release under that tag with one bundle per target and
+# a checksum file. A tag
# containing a hyphen is a pre-release. The tag must be the workspace's
# version, alone or with a pre-release suffix: a release whose files say
# one number and whose tag says another is a release nobody can reason
@@ -10,7 +11,9 @@ name: Release
#
# 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 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.
on:
push:
tags: ["v*"]
@@ -39,7 +42,7 @@ jobs:
tag="${{ inputs.tag || github.ref_name }}"
version=$(sed -n 's/^version = "\(.*\)"/\1/p' engine/Cargo.toml | head -1)
# The tag is the version, or the version with a pre-release
- # suffix: v0.2.0 and v0.2.0-alpha.22 both belong to 0.2.0.
+ # suffix: v0.2.1 and v0.2.1-alpha.22 both belong to 0.2.1.
case "$tag" in
"v$version" | "v$version-"*) ;;
*)
@@ -54,9 +57,14 @@ jobs:
uses: ./.github/workflows/build-app.yml
secrets: inherit
+ phones:
+ needs: [check]
+ uses: ./.github/workflows/mobile.yml
+ secrets: inherit
+
publish:
name: Publish release
- needs: [check, build]
+ needs: [check, build, phones]
runs-on: ubuntu-latest
permissions:
contents: write