audit / bun-audit (plugin-kit) (push) Successful in 25s
audit / bun-audit (sdk) (push) Successful in 25s
audit / bun-audit (web) (push) Successful in 37s
audit / docs-site-audit (push) Successful in 36s
audit / pnpm-audit (push) Successful in 29s
audit / cargo-audit (push) Successful in 2m57s
decky / build-publish (push) Successful in 43s
deb / build-publish-client-arm64 (push) Failing after 1m9s
deb / build-publish-host (push) Failing after 1m16s
ci / rust-arm64 (push) Failing after 1m35s
ci / web (push) Successful in 1m2s
ci / docs-site (push) Successful in 1m11s
apple / swift (push) Successful in 5m32s
docker / apps (., web/Dockerfile, punktfunk-web) (push) Successful in 2m3s
docker / builders (ci/rust-ci-noble.Dockerfile, punktfunk-rust-ci-noble) (push) Successful in 2m53s
docker / builders (ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3m30s
audit / license-gate (push) Successful in 7m50s
docker / apps (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 2m38s
docker / builders (ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 9m43s
flatpak / build-publish (push) Successful in 10m55s
android / android (push) Successful in 21m25s
windows-host / package (push) Successful in 20m6s
windows-host / winget-source (push) Skipped
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Failing after 13m57s
docker / deploy-docs (push) Successful in 57s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Failing after 13m36s
docker / builders (--build-arg FEDORA_VERSION=44, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm, -f44) (push) Successful in 9m32s
windows-msix / package (arm64, C:\Users\Public\ffmpeg-arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (push) Failing after 3m20s
deb / build-publish (push) Successful in 16m37s
docker / builders-arm64cross (push) Successful in 2m27s
apple / screenshots (push) Successful in 21m3s
windows-msix / package (x64, C:\Users\Public\ffmpeg, , x86_64-pc-windows-msvc, C:\t) (push) Failing after 3m12s
ci / rust (push) Canceled after 10m44s
windows / build (aarch64-pc-windows-msvc) (push) Successful in 5m42s
windows / build (x86_64-pc-windows-msvc) (push) Successful in 7m29s
arch / build-publish (push) Successful in 15m41s
Backend = the existing RustFS (storage.unom.io, S3, region home-central; LAN-pinned to home-central's address by ci-core's unbound so cache traffic never hairpins the router). Repo secrets SCCACHE_ACCESS_KEY_ID/SECRET carry a keypair scoped to the unom-ci-sccache bucket; keys embed compiler hash + target + flags, so the Ubuntu, Fedora, cross-arm64 and MSVC universes share one bucket without ever colliding. Wired: ci (rust, rust-arm64), deb (all three), rpm, bench, linux-client-screenshots, windows, windows-msix, windows-host. CARGO_INCREMENTAL=0 alongside (sccache and incremental are mutually exclusive, and incremental artifacts are what bloated the persistent Windows target dirs anyway). The binary is baked into the builder images; a per-job ensure-step (same pattern as the GTK4 packages step) keeps jobs green while the running :latest predates the bake, and ensure-windows-toolchain.ps1 self-provisions sccache.exe on the Windows runner. windows-drivers stays unwrapped (wdk-build owns its build env), arch/android/apple are follow-ups. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
193 lines
10 KiB
YAML
193 lines
10 KiB
YAML
# Build the punktfunk Windows client as signed MSIX packages (x64 + ARM64) and publish them to
|
|
# Gitea's generic package registry, so Windows boxes can download + install a real package (Start
|
|
# tile, clean install/uninstall) instead of a loose exe. Runs on a self-hosted windows-amd64
|
|
# runner (host mode; the MSVC/WinUI toolchain comes from unom/infra's windows-runner/, FFmpeg
|
|
# self-provisions via the "Ensure Windows toolchain" step below, same as windows.yml) — the
|
|
# Windows SDK's makeappx/signtool are baked into the runner's daemon env.
|
|
#
|
|
# Both arches come off the ONE x64 runner: x86_64 natively, aarch64 cross-compiled (the x64 MSVC
|
|
# toolset has the ARM64 cross compiler; the matrix points FFMPEG_DIR at the ARM64 FFmpeg tree). See
|
|
# windows.yml for the cross-build rationale + the BOM/MAX_PATH runner gotchas.
|
|
#
|
|
# Registry (public, unom org): https://git.unom.io/unom/-/packages (generic group)
|
|
# Packaging internals: clients/windows/packaging/README.md.
|
|
#
|
|
# Versioning — single project version; MSIX requires a strictly 4-part numeric version, so:
|
|
# vX.Y.Z tag -> X.Y.Z.0 (THE release; any -rc/+meta pre-release suffix is dropped for MSIX).
|
|
# Published to the generic registry + the stable `latest/` alias + attached to the
|
|
# unified Gitea Release alongside every other platform's artifact.
|
|
# main push / dispatch -> <next-minor>.<run_number>.0 (canary; base is one minor ahead of the
|
|
# latest stable tag via scripts/ci/pf-version.ps1, run number climbs monotonically).
|
|
# Published to the generic registry + the `canary/` alias.
|
|
# Both arches share the version; artifacts are arch-suffixed (..._x64.msix / ..._arm64.msix).
|
|
#
|
|
# Signing (clients/windows/packaging/pack-msix.ps1): if the MSIX_CERT_PFX_B64 / MSIX_CERT_PASSWORD
|
|
# Actions secrets are set (a real or shared code-signing .pfx whose subject DN == Publisher), the
|
|
# package is signed with them. Otherwise an ephemeral self-signed cert is generated and its public
|
|
# .cer is published next to the .msix (users import it to Trusted People before install).
|
|
#
|
|
# That fallback is for canary/CI ONLY. On a v* tag the pack script FAILS CLOSED — a missing secret
|
|
# aborts the build instead of quietly shipping a release signed by a per-build throwaway cert that
|
|
# no one can pin. Nothing to opt into here: the script reads GITHUB_REF itself.
|
|
name: windows-msix
|
|
# One pending run per workflow+ref: a newer push supersedes the queued/running one and cancels
|
|
# it (a canary only needs the latest commit; each release tag is its own ref so tag runs never
|
|
# cancel each other). Keeps a busy push cadence from piling ~10 queued runs per commit onto the
|
|
# runner fleet. Gitea honors this for push triggers (PR triggers: see gitea#35933).
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'clients/windows/**'
|
|
- 'clients/session/**'
|
|
- 'crates/punktfunk-core/**'
|
|
- 'crates/pf-client-core/**'
|
|
- 'crates/pf-presenter/**'
|
|
- 'crates/pf-console-ui/**'
|
|
- 'crates/pf-ffvk/**'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- '.gitea/workflows/windows-msix.yml'
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: git.unom.io
|
|
OWNER: unom
|
|
PKG: punktfunk-client-windows
|
|
RUSTC_WRAPPER: sccache
|
|
SCCACHE_BUCKET: unom-ci-sccache
|
|
SCCACHE_ENDPOINT: https://storage.unom.io
|
|
SCCACHE_REGION: home-central
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_SECRET_ACCESS_KEY }}
|
|
# sccache and incremental compilation are mutually exclusive; CI wants the shared
|
|
# cache, dev boxes keep incremental.
|
|
CARGO_INCREMENTAL: "0"
|
|
|
|
jobs:
|
|
package:
|
|
runs-on: windows-amd64
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: x64
|
|
target: x86_64-pc-windows-msvc
|
|
ffmpeg: C:\Users\Public\ffmpeg
|
|
td: C:\t
|
|
session_flags: ''
|
|
- arch: arm64
|
|
target: aarch64-pc-windows-msvc
|
|
ffmpeg: C:\Users\Public\ffmpeg-arm64
|
|
td: C:\t-a64
|
|
# No skia-binaries prebuilt for aarch64-pc-windows-msvc: the session ships
|
|
# without the Skia console UI on ARM64 (streaming unaffected) — flip when
|
|
# rust-skia adds the target.
|
|
session_flags: '--no-default-features'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Ensure Windows toolchain (WDK, FFmpeg, Inno Setup, ARM64 target)
|
|
shell: pwsh
|
|
run: ./scripts/ci/ensure-windows-toolchain.ps1
|
|
|
|
- name: Configure + version
|
|
shell: pwsh
|
|
run: |
|
|
# CARGO_TARGET_DIR (per-arch, short) dodges the MAX_PATH wall in the CMake-from-source
|
|
# crates (see windows.yml). FFMPEG_DIR selects the arch's import libs + is read by
|
|
# pack-msix.ps1 for the runtime DLLs. All via GITHUB_ENV.
|
|
"CARGO_TARGET_DIR=${{ matrix.td }}" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
|
"FFMPEG_DIR=${{ matrix.ffmpeg }}" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
|
# pf-ffvk's bindgen needs Vulkan headers (arch-independent; provisioned alongside FFmpeg).
|
|
"PF_FFVK_VULKAN_INCLUDE=C:\Users\Public\vulkan-headers\include" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
|
rustup target add ${{ matrix.target }}
|
|
$pf = & "$env:GITHUB_WORKSPACE/scripts/ci/pf-version.ps1" # single source of truth: base is one minor ahead of the latest stable tag
|
|
$parts = if ($env:GITHUB_REF -like 'refs/tags/v*') {
|
|
# MSIX needs a purely-numeric 4-part version: drop any -rc/+meta pre-release suffix.
|
|
(($env:GITHUB_REF_NAME -replace '^v', '') -replace '[-+].*$', '').Split('.')
|
|
} else {
|
|
# Canary: <major>.<minor>.<run>.0 — major.minor track one minor ahead of stable, run climbs monotonically.
|
|
@($pf.PF_MAJOR, $pf.PF_MINOR, $env:GITHUB_RUN_NUMBER)
|
|
}
|
|
while ($parts.Count -lt 4) { $parts += '0' }
|
|
$v = ($parts[0..3] -join '.')
|
|
"MSIX_VERSION=$v" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
|
Write-Output "MSIX version $v arch ${{ matrix.arch }} target ${{ matrix.target }}"
|
|
|
|
# All three client binaries — the shell spawns punktfunk-session.exe (a package
|
|
# sibling) for every stream, and punktfunk-console.exe is the couch Start-menu tile's
|
|
# hand-off shim. --no-default-features on ARM64 is a no-op for the shell.
|
|
- name: Build (release)
|
|
shell: pwsh
|
|
run: cargo build --release -p punktfunk-client-windows -p punktfunk-client-session ${{ matrix.session_flags }} --target ${{ matrix.target }}
|
|
|
|
- name: Pack + sign MSIX
|
|
shell: pwsh
|
|
env:
|
|
MSIX_CERT_PFX_B64: ${{ secrets.MSIX_CERT_PFX_B64 }}
|
|
MSIX_CERT_PASSWORD: ${{ secrets.MSIX_CERT_PASSWORD }}
|
|
run: |
|
|
& clients/windows/packaging/pack-msix.ps1 `
|
|
-Version $env:MSIX_VERSION -Arch ${{ matrix.arch }} `
|
|
-TargetDir ${{ matrix.td }}\${{ matrix.target }}\release -OutDir ${{ matrix.td }}\msix
|
|
|
|
- name: Publish to Gitea generic registry
|
|
shell: pwsh
|
|
env:
|
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: |
|
|
$PSNativeCommandUseErrorActionPreference = $false
|
|
$base = "https://$($env:REGISTRY)/api/packages/$($env:OWNER)/generic/$($env:PKG)"
|
|
# stable release -> `latest/` alias; canary main build -> `canary/` alias.
|
|
$alias = if ($env:GITHUB_REF -like 'refs/tags/v*') { 'latest' } else { 'canary' }
|
|
# version-less, arch-suffixed alias names so each channel keeps one predictable URL.
|
|
$aliasNames = @{
|
|
"$($env:MSIX_PATH)" = "$($env:PKG)_${{ matrix.arch }}.msix"
|
|
"$($env:MSIX_CER_PATH)" = "$($env:PKG)_${{ matrix.arch }}.cer"
|
|
}
|
|
$files = @($env:MSIX_PATH, $env:MSIX_CER_PATH) | Where-Object { $_ -and (Test-Path $_) }
|
|
if (-not $files) { throw "pack produced no artifacts to publish" }
|
|
function Put($f, $url) {
|
|
# The generic registry makes a versioned path immutable and 409s a re-upload, so a tag
|
|
# re-run re-publishing the identical artifact must be tolerated as a no-op. (The channel
|
|
# alias below is delete-then-reuploaded and never 409s.) No curl -f, so we can read the
|
|
# status code instead of aborting on it.
|
|
$code = [int](curl.exe -sS -o NUL -w "%{http_code}" --user "enricobuehler:$($env:REGISTRY_TOKEN)" --upload-file "$f" "$url")
|
|
if ($LASTEXITCODE -ne 0) { throw "upload failed (curl exit $LASTEXITCODE): $url" }
|
|
if ($code -eq 409) { Write-Output "already published (409, immutable): $url"; return }
|
|
if ($code -lt 200 -or $code -ge 300) { throw "upload failed (HTTP $code): $url" }
|
|
Write-Output "published ($code): $url"
|
|
}
|
|
foreach ($f in $files) {
|
|
$name = Split-Path $f -Leaf
|
|
# 1) immutable, versioned path
|
|
Put $f "$base/$($env:MSIX_VERSION)/$name"
|
|
# 2) channel alias (delete-then-reupload; the generic registry 409s on an existing file)
|
|
$an = $aliasNames["$f"]
|
|
curl.exe -fsS -o NUL --user "enricobuehler:$($env:REGISTRY_TOKEN)" -X DELETE "$base/$alias/$an" 2>$null
|
|
Put $f "$base/$alias/$an"
|
|
}
|
|
|
|
# On a real release, also attach the MSIX (+ its .cer) to the unified Gitea Release. Both
|
|
# arch legs attach to the same release concurrently — the helper's create-or-fetch handles
|
|
# the race, and x64/arm64 filenames differ so the assets don't collide.
|
|
- name: Attach MSIX to the Gitea release (stable tags only)
|
|
if: startsWith(gitea.ref, 'refs/tags/v')
|
|
shell: pwsh
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: |
|
|
. scripts/ci/gitea-release.ps1
|
|
$rid = Ensure-GiteaRelease -Tag $env:GITHUB_REF_NAME -Name $env:GITHUB_REF_NAME -Prerelease 'auto'
|
|
foreach ($f in @($env:MSIX_PATH, $env:MSIX_CER_PATH)) {
|
|
if ($f -and (Test-Path $f)) { Upsert-GiteaAsset -ReleaseId $rid -File $f }
|
|
}
|