Packages from every CI platform, Docker builds for local packaging
scripts/package.sh turns release builds into the packages CI uploads and
the Docker builds produce: Linux .tar.gz and .deb (dependencies from
dpkg-shlibdeps), Windows .zip and NSIS installer, renamed Android APKs,
each with a SHA256SUMS file.
CI (ci.yml): package-linux, package-windows (installer now required),
package-flatpak (bundle from packaging/flatpak, cargo sources generated
in the job), package-gateway-image (docker save of tsgw) and the Android
job (debug APKs for arm64-v8a and x86_64, a signed release APK when the
signing secrets exist) each upload an artifact. A v* tag also attaches
everything to a draft GitHub release.
docker/{linux,windows,android}.Dockerfile with scripts/docker-build.sh
build the same packages locally into dist/<platform>/: Ubuntu 24.04,
a mingw-w64 cross build with a static libvpx pinned by commit, and the
Android SDK/NDK/cargo-ndk CI uses. Proxy settings and an optional CA
certificate are passed through. docker.yml runs them weekly and when
they change. docs/building.md describes both ways.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
13 files changed
+773
-57
No files matched your search
@@ -0,0 +1,102 @@
|
||||
# Packages: from CI and built locally
|
||||
|
||||
Every platform has installable packages. CI builds them on each run, and the
|
||||
Dockerfiles in `docker/` build the same kinds of packages on any machine with
|
||||
Docker. Both use `scripts/package.sh`, so file names and contents match.
|
||||
|
||||
| Platform | Files | Install |
|
||||
|---|---|---|
|
||||
| Linux x86_64 | `tsc-<version>-linux-x86_64.tar.gz` | unpack; `bin/` has `tsc-desktop`, `tsctl`, `tsgw` (prefix layout: `tar -xzf … --strip-components=1 -C ~/.local`) |
|
||||
| | `tsc-desktop_<version>_amd64.deb` | `sudo apt install ./tsc-desktop_<version>_amd64.deb` (Ubuntu 24.04+, Debian 13+) |
|
||||
| | `tsc-desktop.flatpak` (CI only) | `flatpak install --user tsc-desktop.flatpak` |
|
||||
| Windows x86_64 | `tsc-<version>-windows-x86_64.zip` | unpack; `tsc-desktop.exe`, `tsctl.exe`, `tsgw.exe` |
|
||||
| | `tsc-desktop-<version>-setup.exe` | run it (per-machine install, uninstaller in Settings → Apps) |
|
||||
| Android | `tsc-<version>-android-debug.apk` | `adb install …` or open it on the phone (arm64-v8a and x86_64) |
|
||||
| | `tsc-<version>-android-release.apk` | only with signing configured ([release.md](release.md#android-apk-signing)) |
|
||||
|
||||
Each package run also writes `SHA256SUMS-<platform>`. Nothing is code-signed
|
||||
yet: Windows SmartScreen warns about the installer, and the debug APK is
|
||||
signed with a debug key (fine for testing, not for the Play Store).
|
||||
|
||||
The gateway also runs as a container ([gateway-admin.md](gateway-admin.md)):
|
||||
CI uploads the image as `tsgw-image.tar.gz` (`docker load -i tsgw-image.tar.gz`,
|
||||
then `docker run … tsgw:<version>`), or build it with
|
||||
`docker build -f crates/tsc-gateway/Dockerfile -t tsgw .`.
|
||||
|
||||
## From CI
|
||||
|
||||
`.github/workflows/ci.yml` uploads one artifact per platform on every run:
|
||||
`tsc-linux-x86_64`, `tsc-windows-x86_64`, `tsc-flatpak-x86_64`,
|
||||
`tsc-android` and `tsgw-image`. Download them from the run's page (Actions → the run →
|
||||
Artifacts), or with the GitHub CLI:
|
||||
|
||||
```sh
|
||||
gh run list --workflow ci.yml --limit 5
|
||||
gh run download <run id> --dir dist
|
||||
```
|
||||
|
||||
GitHub keeps artifacts for 90 days. For builds that stay, push a version tag:
|
||||
`git tag -s v0.2.0 && git push origin v0.2.0` runs the whole workflow and, if
|
||||
everything passes, the `release` job attaches all packages and a `SHA256SUMS`
|
||||
to a **draft** GitHub release, which you review and publish by hand
|
||||
([release.md](release.md#checklist)).
|
||||
|
||||
The Windows packages from CI use the MSVC toolchain and libvpx from vcpkg.
|
||||
The Android job builds a signed release APK only when the repository has the
|
||||
signing secrets (`ANDROID_KEYSTORE_BASE64`, `TSC_SIGNING_STORE_PASSWORD`,
|
||||
`TSC_SIGNING_KEY_ALIAS`, `TSC_SIGNING_KEY_PASSWORD`).
|
||||
|
||||
`.github/workflows/docker.yml` builds the Docker files below weekly, by hand
|
||||
(Actions → Docker builds → Run workflow) and when they change, and uploads
|
||||
their output as `docker-linux`, `docker-windows` and `docker-android`.
|
||||
|
||||
## Locally with Docker
|
||||
|
||||
Needs Docker 23+ (BuildKit) or Docker Desktop, and about 15 GB of free disk
|
||||
per platform (toolchains plus the build cache). From the repository root:
|
||||
|
||||
```sh
|
||||
scripts/docker-build.sh linux # → dist/linux/
|
||||
scripts/docker-build.sh windows # → dist/windows/
|
||||
scripts/docker-build.sh android # → dist/android/
|
||||
scripts/docker-build.sh # all three
|
||||
```
|
||||
|
||||
The same with plain Docker, e.g. `docker build -f docker/linux.Dockerfile -o dist/linux .`
|
||||
Rebuilds are incremental: the cargo registry, `target/` and Gradle live in
|
||||
BuildKit cache mounts (`docker builder prune` frees them).
|
||||
|
||||
| Dockerfile | Builds | Notes |
|
||||
|---|---|---|
|
||||
| `docker/linux.Dockerfile` | `.tar.gz` and `.deb` on Ubuntu 24.04 | the binaries need glibc 2.39+ and the libraries the `.deb` lists |
|
||||
| `docker/windows.Dockerfile` | `.zip` and the NSIS installer | cross-compiled for `x86_64-pc-windows-gnu` with mingw-w64 and a static libvpx; works on Windows 10 and 11 |
|
||||
| `docker/android.Dockerfile` | debug APK | SDK, NDK and cargo-ndk as in CI; `--build-arg ABIS=arm64-v8a,x86_64,armeabi-v7a` picks the ABIs |
|
||||
|
||||
Options go after the platform, straight to `docker build`:
|
||||
|
||||
```sh
|
||||
scripts/docker-build.sh android --build-arg ABIS=arm64-v8a
|
||||
scripts/docker-build.sh android --build-arg APK=release \
|
||||
--secret id=keystore,src=release.jks --secret id=signing,src=signing.env
|
||||
```
|
||||
|
||||
For the signed release APK, `signing.env` holds `TSC_SIGNING_STORE_PASSWORD=…`,
|
||||
`TSC_SIGNING_KEY_ALIAS=…` and `TSC_SIGNING_KEY_PASSWORD=…`. Secrets are not
|
||||
stored in the image or the build cache.
|
||||
|
||||
**Behind a proxy:** `scripts/docker-build.sh` passes `HTTPS_PROXY`,
|
||||
`HTTP_PROXY` and `NO_PROXY` on to the build and uses host networking when
|
||||
the proxy is on localhost. If the proxy inspects TLS, set
|
||||
`BUILD_CA_CERT=/path/to/proxy-ca.pem` so the builds trust it.
|
||||
|
||||
## Locally without Docker
|
||||
|
||||
- **Linux:** the packages from the table above need
|
||||
`sudo apt install libasound2-dev libfontconfig1-dev libxkbcommon-dev libvpx-dev libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev cmake dpkg-dev`,
|
||||
then `cargo build --release --locked -p tsc-ui -p tsctl -p tsc-gateway`
|
||||
and `scripts/package.sh linux`.
|
||||
- **Windows:** [packaging/windows/README.md](../packaging/windows/README.md)
|
||||
(MSVC, vcpkg libvpx, NSIS), then `bash scripts/package.sh windows` from Git Bash.
|
||||
- **Android:** [android.md](android.md) (SDK, NDK, cargo-ndk), then
|
||||
`cd android && ./gradlew assembleDebug` and `scripts/package.sh android`.
|
||||
- **Flatpak:** [packaging/README.md](../packaging/README.md#flatpak).
|
||||
+13
-7
@@ -138,8 +138,11 @@ repository; losing it means existing installs can no longer be updated.
|
||||
`TSC_SIGNING_STORE_PASSWORD`, `TSC_SIGNING_KEY_ALIAS`,
|
||||
`TSC_SIGNING_KEY_PASSWORD` ([android.md](android.md)). Without them it
|
||||
builds unsigned or debug-signed artifacts only.
|
||||
- CI: the keystore as a base64 secret, decoded to `$RUNNER_TEMP`, removed
|
||||
afterwards. Check with `apksigner verify --print-certs app-release.apk`.
|
||||
- CI: the `android` job signs a release APK when the repository has the
|
||||
secrets `ANDROID_KEYSTORE_BASE64` (`base64 -w0 tsc-release.jks`),
|
||||
`TSC_SIGNING_STORE_PASSWORD`, `TSC_SIGNING_KEY_ALIAS` and
|
||||
`TSC_SIGNING_KEY_PASSWORD`; the keystore is decoded to `$RUNNER_TEMP` and
|
||||
removed afterwards. Check with `apksigner verify --print-certs app-release.apk`.
|
||||
- Google Play: use Play App Signing; our keystore is then the upload key
|
||||
(it can be reset through Play support if lost). F-Droid builds and signs
|
||||
itself unless reproducible builds are set up.
|
||||
@@ -167,14 +170,17 @@ Before tagging:
|
||||
Release:
|
||||
|
||||
7. Tag `v<version>` (signed) on the release commit and push it.
|
||||
8. Build the artifacts from the tag: Windows executable and installer
|
||||
(signed), Linux tarball, Flatpak bundle, Android APK / AAB (signed); the
|
||||
gateway container image if it changed.
|
||||
8. The tag's CI run builds every package ([building.md](building.md)): Linux
|
||||
tarball and `.deb`, Flatpak bundle, Windows zip and installer, Android APKs
|
||||
(signed when the secrets are set), the gateway image; its `release` job
|
||||
attaches them with a `SHA256SUMS` to a draft GitHub release. Sign the
|
||||
Windows executable and installer, and an AAB for Google Play, by hand
|
||||
until CI has the certificates.
|
||||
9. Verify: signatures (`signtool verify`, `apksigner verify`), the installer
|
||||
and the Flatpak on a clean machine (matrix rows IN1-IN3), the version in
|
||||
the About page.
|
||||
10. `SHA256SUMS` (signed), a draft GitHub release with the changelog section,
|
||||
known issues and the tested server versions; publish it.
|
||||
10. Sign `SHA256SUMS`; write the changelog section, known issues and the
|
||||
tested server versions into the draft release; publish it.
|
||||
11. Update the Flathub manifest (tag, commit, `cargo-sources.json`), Google
|
||||
Play / F-Droid.
|
||||
|
||||
|
||||
Reference in new issue
Block a user