| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575 |
- # Release build of LYNX SHARE for Windows, macOS and Linux.
- #
- # Every published binary comes from this workflow, built from the tagged source on GitHub-hosted
- # runners, so anyone can trace a binary back to the commit and the run that produced it
- # (a requirement of the SignPath Foundation code signing program; see docs/CODE_SIGNING.md).
- #
- # version (ubuntu) reads the version (CMakeLists.txt) and the package label
- # build (ubuntu) cross-compiles LYNX.exe with Zig 0.14.1 + JUCE 8.0.4 (scripts/build-windows-zig.sh)
- # sign (ubuntu) SignPath signing request; skipped until the repository variable SIGNPATH_ENABLED is 'true'
- # package (windows) runs the self-test on the (signed) exe, builds Demo.lynx, the portable zip, the per-user
- # installer (NSIS, resources/installer/LYNX.nsi) and the Microsoft Store package (MSIX,
- # docs/STORE.md), which it installs and self-tests with a test identity
- # linux (ubuntu) CMake + GCC 13 build in an Ubuntu 22.04 container (glibc 2.35), glibc check, self-test,
- # AppImage and .tar.gz (scripts/package-linux.sh), offline start check of the AppImage
- # macos (macos) macos-app.yml: arm64 and x86_64 built on two runners in parallel, merged with lipo (round 190qd),
- # self-test, ad-hoc signature (no Apple Developer ID, not notarized), .dmg (scripts/package-macos.sh)
- # linux-arm64 linux-arm64.yml on GitHub's arm64 runner: the Linux job's steps for aarch64 (round 190oy),
- # LYNX-<label>-aarch64.AppImage and LYNX-<label>-linux-aarch64.tar.gz. publish waits for it and
- # takes its files when it passed; a failure there does not hold back the other platforms
- # publish (ubuntu) SHA256SUMS.txt over every file; on a tag push attaches everything to the (draft) GitHub release
- # plugins the optional plugin download (plugins.yml: LYNX's effects as CLAP + a short VST3 list for Windows,
- # Linux and macOS, each checked with plugexporttest, pluginval and clap-validator); never in the
- # app's installer, and the app's release doesn't wait for it
- # plugins-publish on a tag push attaches LYNX-Plugins-<label>-* (with their own SHA256SUMS file) to the same release
- # store (ubuntu) on a tag: only a notice. CI no longer submits to the Microsoft Store (the old package-only submission
- # reused outdated listings and failed certification); the full submission is made locally (docs/STORE.md)
- name: Release
- on:
- push:
- tags: ['v*']
- workflow_dispatch:
- inputs:
- store_build:
- description: 'MSIX store build 0..9 (a repackaged Store resubmission of the same release; scripts/make-msix-layout.py)'
- default: '0'
- permissions:
- contents: read
- concurrency:
- group: release-${{ github.ref }}
- cancel-in-progress: false
- env:
- ZIG_VERSION: 0.14.1
- ZIG_SHA256: 24aeeec8af16c381934a6cd7d95c807a8cb2cf7df9fa40d359aa884195c4716c
- JUCE_VERSION: 8.0.4
- JUCE_SHA256: 0effe9823a6fd8a4f98e5c08be7d308350e417b2d15dcf34011e778fefbbf005
- jobs:
- version:
- name: Version
- runs-on: ubuntu-24.04
- outputs:
- version: ${{ steps.version.outputs.version }}
- label: ${{ steps.version.outputs.label }}
- steps:
- - uses: actions/checkout@v5
- - name: 'Version (single source is CMakeLists.txt)'
- id: version
- shell: bash
- run: |
- version="$(sed -n 's/^project(LYNX VERSION \([0-9]*\.[0-9]*\.[0-9]*\(\.[0-9]*\)\{0,1\}\).*/\1/p' CMakeLists.txt)"
- [[ -n "$version" ]] || { echo "::error::no version in CMakeLists.txt"; exit 1; }
- if [[ "$GITHUB_REF_TYPE" == tag ]]; then
- tag="${GITHUB_REF_NAME#v}"
- [[ "$tag" == "$version" || "$tag" == "$version"-* ]] || { echo "::error::tag $GITHUB_REF_NAME does not match version $version"; exit 1; }
- label="$tag"
- else
- label="$version-${GITHUB_SHA::7}"
- fi
- echo "version=$version" >> "$GITHUB_OUTPUT"
- echo "label=$label" >> "$GITHUB_OUTPUT"
- echo "LYNX $version (package label $label)"
- build:
- name: Build LYNX.exe
- needs: version
- runs-on: ubuntu-24.04
- outputs:
- artifact-id: ${{ steps.upload.outputs.artifact-id }}
- steps:
- - uses: actions/checkout@v5
- # Only the downloaded toolchain is cached (checksums verified on download); the app is always built from scratch.
- - name: Cache toolchain
- id: cache
- uses: actions/cache@v5
- with:
- path: ~/opt
- key: toolchain-zig${{ env.ZIG_VERSION }}-juce${{ env.JUCE_VERSION }}-${{ env.ZIG_SHA256 }}-${{ env.JUCE_SHA256 }}
- - name: Download Zig and JUCE
- if: steps.cache.outputs.cache-hit != 'true'
- shell: bash
- run: |
- mkdir -p ~/opt && cd ~/opt
- curl -fsSL -o zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-x86_64-linux-$ZIG_VERSION.tar.xz"
- echo "$ZIG_SHA256 zig.tar.xz" | sha256sum -c -
- tar xf zig.tar.xz && rm zig.tar.xz
- curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
- echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
- tar xzf juce.tar.gz && mv "JUCE-$JUCE_VERSION" "juce-$JUCE_VERSION" && rm juce.tar.gz
- # Release code generation (round 190kz, owner decision; docs/PLATFORMS.md "Release optimisation"): a real -O3
- # (zig maps -O3 to -O2, so the -O3 goes to clang itself) and ThinLTO of LYNX's own objects; the instruction set
- # stays the x86-64 baseline (SSE2), the hottest loops pick AVX2 at run time (src/core/CpuFeatures.h). About
- # 8 more minutes of link on the runner; Harmless.cpp stays out of LTO (LYNX_WIN_LTO_SKIP, measured)
- - name: Build (Zig cross compile)
- shell: bash
- env:
- LYNX_WIN_OPT: -O2 -Xclang -O3
- LYNX_WIN_LTO: thin
- # JOBS=2 (queue 0.1.31 item 46, as plugins.yml and round-build.yml): the hosted runner is memory-bound (round 190ov
- # measured 11.2 / 16 GB + 2.5 / 3 GB swap at two compiles); one per core ran it out of memory ("lost communication")
- run: |
- ZIG="$HOME/opt/zig-x86_64-linux-$ZIG_VERSION/zig" JUCE_DIR="$HOME/opt/juce-$JUCE_VERSION" OUT=build-win JOBS=2 \
- ./scripts/build-windows-zig.sh 2>&1 | grep -v '^1 warning generated\.$'
- sha256sum build-win/LYNX.exe
- ./scripts/fetch-onnxruntime.sh windows build-win
- - name: Upload unsigned LYNX.exe
- id: upload
- uses: actions/upload-artifact@v7
- with:
- name: LYNX-unsigned
- path: |
- build-win/LYNX.exe
- build-win/lynx-asio.dll
- build-win/lynx-asio32.dll
- build-win/LYNX-bridge32.exe
- build-win/onnxruntime.dll
- if-no-files-found: error
- # the build's symbols (round 157a): a user's crash / hang file lists LYNX.exe+offset frames; with this LYNX.pdb
- # next to the same LYNX.exe, `LYNX.exe --symbolize <file> <out>` names them (signing does not change the offsets)
- - name: Upload symbols
- uses: actions/upload-artifact@v7
- with:
- name: LYNX-symbols
- path: build-win/LYNX.pdb
- retention-days: 90
- if-no-files-found: warn
- # ---------------------------------------------------------------------------------------------
- # SignPath code signing (docs/CODE_SIGNING.md). Build and signing are separate jobs: with the
- # release-signing policy (SignPath Foundation certificate) every request waits for a manual
- # approval in the SignPath web app; test-signing is approved automatically.
- # Settings:
- # repository secret SIGNPATH_API_TOKEN API token of the SignPath CI user (submitter role)
- # repository variable SIGNPATH_ORGANIZATION_ID organization id shown in the SignPath web app
- # repository variable SIGNPATH_PROJECT_SLUG project slug (default: LYNX)
- # repository variable SIGNPATH_POLICY_SLUG signing policy slug (default: release-signing)
- # repository variable SIGNPATH_ENABLED 'true' to switch this job on
- # ---------------------------------------------------------------------------------------------
- sign:
- name: Sign (SignPath)
- needs: build
- if: vars.SIGNPATH_ENABLED == 'true'
- runs-on: ubuntu-24.04
- timeout-minutes: 355 # GitHub-hosted jobs stop at 6 h
- permissions:
- actions: read # SignPath reads the job details and downloads the unsigned artifact
- contents: read
- steps:
- - name: Submit signing request
- uses: signpath/github-action-submit-signing-request@v2
- with:
- api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
- organization-id: ${{ vars.SIGNPATH_ORGANIZATION_ID }}
- project-slug: ${{ vars.SIGNPATH_PROJECT_SLUG || 'LYNX' }}
- signing-policy-slug: ${{ vars.SIGNPATH_POLICY_SLUG || 'release-signing' }}
- github-artifact-id: ${{ needs.build.outputs.artifact-id }}
- wait-for-completion: true
- wait-for-completion-timeout-in-seconds: 20700 # a release request waits up to 5 h 45 min for the manual approval
- output-artifact-directory: signed
- - name: Upload signed LYNX.exe
- uses: actions/upload-artifact@v7
- with:
- name: LYNX-signed
- path: |
- signed/LYNX.exe
- signed/lynx-asio.dll
- signed/lynx-asio32.dll
- signed/LYNX-bridge32.exe
- signed/onnxruntime.dll
- if-no-files-found: error
- package:
- name: Self-test and package
- needs: [version, build, sign]
- if: ${{ !cancelled() && needs.build.result == 'success' && (needs.sign.result == 'success' || needs.sign.result == 'skipped') }}
- runs-on: windows-latest
- env:
- LABEL: ${{ needs.version.outputs.label }}
- VERSION: ${{ needs.version.outputs.version }}
- steps:
- - uses: actions/checkout@v5
- - name: Download LYNX.exe
- uses: actions/download-artifact@v8
- with:
- name: ${{ needs.sign.result == 'success' && 'LYNX-signed' || 'LYNX-unsigned' }}
- path: bin
- - name: Check version resource and signature
- shell: pwsh
- run: |
- $exe = Get-Item bin\LYNX.exe
- $v = $exe.VersionInfo
- $v | Format-List ProductName, CompanyName, FileVersion, ProductVersion, LegalCopyright
- if ($v.ProductName -ne 'LYNX SHARE' -or $v.ProductVersion -ne $env:VERSION) { throw "version resource mismatch" }
- $sig = Get-AuthenticodeSignature $exe.FullName
- "Authenticode: $($sig.Status) $($sig.SignerCertificate.Subject)"
- if ('${{ needs.sign.result }}' -eq 'success') {
- # the test-signing policy signs with SignPath's self-signed test certificate: Windows does not trust it
- # (status UnknownError/NotTrusted), so only check that a signature from that certificate is present
- if ('${{ vars.SIGNPATH_POLICY_SLUG }}' -eq 'test-signing') {
- if ($sig.Status -eq 'NotSigned' -or $sig.SignerCertificate.Subject -notmatch 'Test certificate') { throw "test-signed build carries no test signature" }
- } elseif ($sig.Status -ne 'Valid') { throw "signed build is not validly signed" }
- }
- - name: Self-test
- shell: pwsh
- run: |
- $p = Start-Process bin\LYNX.exe -ArgumentList '--selftest', "$PWD\selftest.txt", "$PWD\selftest-demo.lynx" -Wait -PassThru
- Get-Content selftest.txt
- if ($p.ExitCode -ne 0 -or -not (Select-String -Path selftest.txt -Pattern '^result=OK' -Quiet)) { throw "self-test failed (exit $($p.ExitCode))" }
- # every built-in effect / instrument window opened as the mixer and Channel rack open them, with old-project and
- # random states; fails on a crash or a frozen UI (round 157a: the Parametric EQ froze LYNX when opened)
- - name: Editor windows test
- shell: pwsh
- run: |
- $p = Start-Process bin\LYNX.exe -ArgumentList '--opentest', "$PWD\opentest.txt" -Wait -PassThru
- Get-Content opentest.txt -Tail 5
- if ($p.ExitCode -ne 0 -or -not (Select-String -Path opentest.txt -Pattern '^result=OK' -Quiet)) { Get-Content opentest.txt | Select-String -Pattern 'FAIL|HANG'; throw "editor windows test failed (exit $($p.ExitCode))" }
- - name: Portable package and installer
- shell: pwsh
- run: |
- $name = "LYNX-$env:LABEL-windows-x64"
- New-Item -ItemType Directory -Force "pkg\$name" | Out-Null
- $p = Start-Process bin\LYNX.exe -ArgumentList '--showcase', "$PWD\pkg\$name\Demo.lynx" -Wait -PassThru
- if (-not (Test-Path "pkg\$name\Demo.lynx")) { throw "showcase did not write Demo.lynx (exit $($p.ExitCode))" }
- Copy-Item bin\LYNX.exe, bin\onnxruntime.dll, LICENSE, THIRD_PARTY.md, PRIVACY.md "pkg\$name\"
- # the third-party licence texts (round 190nk): Git for Windows' bash runs the same script as the other packages
- & "$env:ProgramFiles\Git\bin\bash.exe" scripts/collect-licenses.sh "pkg/$name/licenses"
- if ($LASTEXITCODE -ne 0 -or -not (Test-Path "pkg\$name\licenses\ara-ARA_API-LICENSE.txt")) { throw "collect-licenses failed" }
- # LYNX ASIO driver and its registration helpers (REA round 97)
- if (Test-Path bin\lynx-asio.dll) { Copy-Item bin\lynx-asio.dll, "asio\Register LYNX ASIO.bat", "asio\Unregister LYNX ASIO.bat" "pkg\$name\" }
- if (Test-Path bin\lynx-asio32.dll) { Copy-Item bin\lynx-asio32.dll "pkg\$name\" } # 32-bit hosts (round 106)
- Copy-Item bin\LYNX-bridge32.exe "pkg\$name\" # 32-bit plugins run in it (round 176a)
- New-Item -ItemType Directory -Force dist | Out-Null
- Compress-Archive -Path "pkg\$name" -DestinationPath "dist\$name.zip"
- Copy-Item bin\LYNX.exe dist\
- # per-user installer (NSIS is preinstalled on GitHub's Windows images)
- $nsis = (Get-Command makensis -ErrorAction SilentlyContinue).Source
- if (-not $nsis) { $nsis = "${env:ProgramFiles(x86)}\NSIS\makensis.exe" }
- if (-not (Test-Path $nsis)) { choco install nsis -y --no-progress; $nsis = "${env:ProgramFiles(x86)}\NSIS\makensis.exe" }
- $vi = if (($env:VERSION -split '\.').Count -ge 4) { $env:VERSION } else { "$env:VERSION.0" } # (a hotfix: 0.1.31.1)
- & $nsis -V2 -INPUTCHARSET UTF8 "-DVERSION=$env:VERSION" "-DVIVERSION=$vi" "-DSTAGE=$PWD\pkg\$name" "-DOUTFILE=$PWD\dist\LYNX-$env:LABEL-setup-x64.exe" `
- "-DICON=$PWD\resources\LYNX.ico" resources\installer\LYNX.nsi
- if ($LASTEXITCODE -ne 0) { throw "makensis failed ($LASTEXITCODE)" }
- # the installer installs and uninstalls cleanly (per user, into a scratch folder)
- $inst = "$env:RUNNER_TEMP\lynx-inst"
- Start-Process "dist\LYNX-$env:LABEL-setup-x64.exe" -ArgumentList '/S', "/D=$inst" -Wait
- if (-not (Test-Path "$inst\LYNX.exe")) { throw "installer did not install LYNX.exe" }
- # round 190nr: installing over a NEWER version removes what that version's installed-files.txt lists and this
- # version doesn't own (resources/installer/InstalledFiles.nsh); files that no list names stay
- if (-not (Test-Path "$inst\installed-files.txt")) { throw "installer did not write installed-files.txt" }
- New-Item -ItemType Directory "$inst\newer-only" | Out-Null; Set-Content "$inst\newer-only\a.txt" "x"
- Set-Content "$inst\My notes.txt" "x"; Add-Content "$inst\installed-files.txt" "newer-only"
- Start-Process "dist\LYNX-$env:LABEL-setup-x64.exe" -ArgumentList '/S', "/D=$inst" -Wait
- if (Test-Path "$inst\newer-only") { throw "install over a newer version left its newer-only folder" }
- if (-not (Test-Path "$inst\My notes.txt")) { throw "the installer removed a file no list names" }
- Remove-Item "$inst\My notes.txt"
- Start-Process "$inst\Uninstall.exe" -ArgumentList '/S', "_?=$inst" -Wait
- if (Test-Path "$inst\LYNX.exe") { throw "uninstaller left LYNX.exe" }
- # Microsoft Store package (round 165n, docs/STORE.md): an unsigned .msix the Store signs after certification.
- # Its identity comes from Partner Center (Product identity) through repository variables; placeholders until then.
- - name: Microsoft Store package (MSIX)
- shell: pwsh
- continue-on-error: true # (new in 0.1.20: must not hold back the other packages; the step's result shows)
- env:
- MSIX_IDENTITY_NAME: ${{ vars.MSIX_IDENTITY_NAME }}
- MSIX_PUBLISHER: ${{ vars.MSIX_PUBLISHER }}
- MSIX_PUBLISHER_DISPLAY: ${{ vars.MSIX_PUBLISHER_DISPLAY }}
- MSIX_DISPLAY_NAME: ${{ vars.MSIX_DISPLAY_NAME }}
- MSIX_STORE_BUILD: ${{ inputs.store_build || '0' }}
- run: |
- $sdk = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.*\x64\makeappx.exe" | Sort-Object { [version]$_.Directory.Parent.Name } | Select-Object -Last 1
- if (-not $sdk) { throw "Windows SDK (makeappx) not found" }
- $tools = $sdk.DirectoryName; "Windows SDK tools: $tools"
- $demo = "pkg\LYNX-$env:LABEL-windows-x64\Demo.lynx"
- function Pack($layout, $out, [switch]$test) {
- $a = @('scripts\make-msix-layout.py', '--version', $env:VERSION, '--bin', 'bin', '--out', $layout, '--extra', $demo, 'LICENSE', 'THIRD_PARTY.md', 'PRIVACY.md', "pkg\LYNX-$env:LABEL-windows-x64\licenses")
- if ($test) { $a += '--test-identity' }
- python @a; if ($LASTEXITCODE -ne 0) { throw "make-msix-layout failed" }
- & "$tools\makepri.exe" createconfig /cf "$layout.priconfig.xml" /dq en-US_pt-BR_es-ES_fr-FR_de-DE_it-IT_nl-NL_pl-PL_ru-RU_tr-TR_id-ID_ja-JP_ko-KR_zh-CN_zh-TW /pv 10.0.0 /o | Out-Null
- if ($LASTEXITCODE -ne 0) { throw "makepri createconfig failed" }
- & "$tools\makepri.exe" new /pr $layout /cf "$layout.priconfig.xml" /of "$layout\resources.pri" /o
- if ($LASTEXITCODE -ne 0) { throw "makepri new failed" }
- & "$tools\makeappx.exe" pack /d $layout /p $out /o
- if ($LASTEXITCODE -ne 0) { throw "makeappx pack failed" }
- }
- New-Item -ItemType Directory -Force msix | Out-Null
- Pack 'msix\store' "dist\LYNX-$env:LABEL-store.msix"
- Pack 'msix\test' 'msix\LYNX-test.msix' -test
- Get-Item "dist\LYNX-$env:LABEL-store.msix", 'msix\LYNX-test.msix' | Format-Table Name, Length
- # the package installed for real (the test identity carries Windows' "unsigned" publisher OID, so it installs
- # without a certificate) and LYNX run inside it: package identity, settings folder on the real disk (what
- # Explorer opens), the self-test; then removed
- - name: MSIX install test
- shell: pwsh
- continue-on-error: true
- run: |
- # the package depends on Microsoft's VC++ runtime framework (onnxruntime.dll): the Store installs it, here we do
- Invoke-WebRequest https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile msix\vclibs.appx
- Add-AppxPackage -Path msix\LYNX-test.msix -AllowUnsigned -DependencyPath msix\vclibs.appx
- $pkg = Get-AppxPackage | Where-Object { $_.Name -eq ([xml](Get-Content msix\test\AppxManifest.xml)).Package.Identity.Name } | Select-Object -First 1
- if (-not $pkg) { throw "package not installed" }
- "installed: $($pkg.PackageFullName) at $($pkg.InstallLocation)"
- try {
- $alias = "$env:LOCALAPPDATA\Microsoft\WindowsApps\lynx.exe"
- if (-not (Test-Path $alias)) { throw "execution alias lynx.exe missing" }
- $p = Start-Process $alias -ArgumentList '--packageinfo', "$PWD\packageinfo.txt" -Wait -PassThru
- Get-Content packageinfo.txt
- if (-not (Select-String -Path packageinfo.txt -Pattern '^packaged=yes' -Quiet)) { throw "LYNX did not run with the package identity" }
- if (-not (Select-String -Path packageinfo.txt -Pattern '^result=OK' -Quiet)) { throw "packageinfo failed (exit $($p.ExitCode))" }
- $probe = "$env:LOCALAPPDATA\Packages\$($pkg.PackageFamilyName)\LocalCache\Roaming\LYNX\package-probe.txt"
- if (-not (Test-Path $probe)) { throw "the settings folder is not on the real disk: $probe" }
- "seen from outside the package: $probe"
- $p = Start-Process $alias -ArgumentList '--selftest', "$PWD\msix-selftest.txt", "$PWD\msix-selftest.lynx" -Wait -PassThru
- Get-Content msix-selftest.txt -Tail 3
- if ($p.ExitCode -ne 0 -or -not (Select-String -Path msix-selftest.txt -Pattern '^result=OK' -Quiet)) { throw "self-test inside the package failed (exit $($p.ExitCode))" }
- } finally {
- Remove-AppxPackage -Package $pkg.PackageFullName
- }
- if (Get-AppxPackage | Where-Object { $_.PackageFullName -eq $pkg.PackageFullName }) { throw "package not removed" }
- - name: Upload package
- uses: actions/upload-artifact@v7
- with:
- name: LYNX-${{ env.LABEL }}-windows-x64
- path: dist/*
- if-no-files-found: error
- # Built inside an Ubuntu 22.04 container (glibc 2.35, the oldest Ubuntu LTS in standard support, which the
- # AppImage catalog tests on): a binary only runs on systems whose glibc is at least as new as the one it was
- # built against. GCC 13 comes from the toolchain PPA; libstdc++/libgcc are linked statically (CMakeLists.txt),
- # so no newer C++ runtime is needed either. scripts/check-linux-compat.sh fails the job otherwise.
- linux:
- name: Linux (AppImage, tar.gz)
- needs: version
- runs-on: ubuntu-24.04
- container:
- image: ubuntu:22.04
- options: --cap-add=SYS_ADMIN # lets check-appimage-start.sh run the AppImage in a network namespace (offline)
- env:
- LABEL: ${{ needs.version.outputs.label }}
- DEBIAN_FRONTEND: noninteractive
- MAX_GLIBC: '2.35'
- steps:
- - name: Build dependencies (Ubuntu 22.04 + GCC 13 from ppa:ubuntu-toolchain-r/test)
- run: |
- # (round 190qd) Launchpad's PPA answered 503 on half the requests during the 0.1.31 release: apt retries
- echo 'Acquire::Retries "30";' > /etc/apt/apt.conf.d/80-lynx-retries
- apt-get update -q
- apt-get install -y -q --no-install-recommends ca-certificates curl git gnupg software-properties-common
- add-apt-repository -y ppa:ubuntu-toolchain-r/test
- apt-get update -q
- apt-get install -y -q gcc-13 g++-13 cmake ninja-build pkg-config file binutils xvfb xauth x11-utils \
- fonts-dejavu-core libasound2-dev libjack-jackd2-dev libx11-dev libxrandr-dev libxinerama-dev \
- libxcursor-dev libxext-dev libxcomposite-dev libfreetype-dev libfontconfig1-dev libgl-dev desktop-file-utils zsync
- ldd --version | head -1
- g++-13 --version | head -1
- - uses: actions/checkout@v5
- - name: JUCE (checksum verified)
- run: |
- git config --global --add safe.directory "$GITHUB_WORKSPACE"
- curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
- echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
- mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
- - name: Build
- run: |
- cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE="$RUNNER_TEMP/juce" \
- -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13
- cmake --build build --target LYNX -- -k 0
- sha256sum build/LYNX_artefacts/Release/LYNX
- - name: Runs on glibc ${{ env.MAX_GLIBC }} without the system's libstdc++
- run: ./scripts/check-linux-compat.sh build/LYNX_artefacts/Release/LYNX "$MAX_GLIBC"
- - name: Self-test and demo project
- run: |
- bin=build/LYNX_artefacts/Release/LYNX
- xvfb-run -a "$bin" --selftest "$PWD/selftest.txt" "$PWD/selftest-demo.lynx" || true
- cat selftest.txt
- grep -q '^result=OK' selftest.txt
- xvfb-run -a "$bin" --opentest "$PWD/opentest.txt" || true
- tail -3 opentest.txt; grep -E 'FAIL|HANG' opentest.txt || true
- grep -q '^result=OK' opentest.txt
- xvfb-run -a "$bin" --showcase "$PWD/Demo.lynx" || true
- test -s Demo.lynx
- - name: Package
- run: ./scripts/package-linux.sh build/LYNX_artefacts/Release/LYNX "$LABEL" dist Demo.lynx
- # round 190rb: the package strips LYNX, so a Linux crash file's LYNX+offset frames had no names (the 0.1.29-0.1.31
- # reports could not be mapped). The symbol table of this same build, kept apart: `addr2line -f -C -e
- # LYNX-linux-x86_64.debug 0x<offset>` names a frame (the offsets are the same in the stripped package)
- - name: Keep the symbols
- run: objcopy --only-keep-debug build/LYNX_artefacts/Release/LYNX LYNX-linux-x86_64.debug
- - name: Upload symbols
- uses: actions/upload-artifact@v7
- with:
- name: LYNX-symbols-linux-x86_64
- path: LYNX-linux-x86_64.debug
- retention-days: 90
- if-no-files-found: warn
- # The catalog runs the AppImage offline for ~11 s and expects a window: start it without network (when the
- # container allows a network namespace), check that it is still running and shows a top-level window.
- - name: AppImage starts offline and shows its window
- run: REQUIRE_OFFLINE=1 ./scripts/check-appimage-start.sh "dist/LYNX-$LABEL-x86_64.AppImage"
- # issue #142 (NixOS): a system where JUCE finds no font at all; LYNX draws with the font it brings.
- - name: AppImage starts on a system without fonts
- run: FONTS=none ./scripts/check-appimage-start.sh "dist/LYNX-$LABEL-x86_64.AppImage"
- - name: Upload package
- uses: actions/upload-artifact@v7
- with:
- name: LYNX-${{ env.LABEL }}-linux-x86_64
- path: dist/*
- if-no-files-found: error
- # round 190qd: each architecture on its own runner, merged with lipo (one universal job compiled everything twice and
- # neared GitHub's 6 h job limit); see macos-app.yml
- macos:
- name: macOS
- needs: version
- permissions:
- contents: write # (macos-app.yml's attach job asks for it; it runs only on a manual run of macos-app.yml)
- uses: ./.github/workflows/macos-app.yml
- with:
- label: ${{ needs.version.outputs.label }}
- linux-arm64:
- name: Linux arm64
- needs: version
- uses: ./.github/workflows/linux-arm64.yml
- with:
- label: ${{ needs.version.outputs.label }}
- publish:
- name: Checksums and release
- needs: [version, package, linux, macos, linux-arm64]
- if: ${{ !cancelled() && needs.package.result == 'success' && needs.linux.result == 'success' && needs.macos.result == 'success' }}
- runs-on: ubuntu-24.04
- permissions:
- contents: write # attach the files to the release on a tag push
- env:
- LABEL: ${{ needs.version.outputs.label }}
- steps:
- - name: Download the packages
- uses: actions/download-artifact@v8
- with:
- pattern: LYNX-${{ env.LABEL }}-*
- path: dist
- merge-multiple: true
- # SPDX 2.3 software bill of materials of the third-party components (round 190nr): THIRD_PARTY.md + licenses/.
- - uses: actions/checkout@v5
- with:
- path: src
- - name: SBOM
- run: src/scripts/make-sbom.sh "$LABEL" "dist/LYNX-$LABEL-sbom.spdx.json"
- # The in-app updater (src/core/UpdateCheck.cpp, round 166b) picks the release files by these names: keep them stable.
- # LYNX-<label>-setup-x64.exe, LYNX-<label>-windows-x64.zip, LYNX-<label>-macos-universal.dmg (any *.dmg),
- # LYNX-<label>-x86_64.AppImage (+ .zsync; versions up to 0.1.24 find it by this name, later ones through scripts/publish-appimage-update.sh), LYNX-<label>-linux-x86_64.tar.gz,
- # LYNX-<label>-aarch64.AppImage (+ .zsync) and LYNX-<label>-linux-aarch64.tar.gz (Linux arm64, from 0.1.31),
- # and SHA256SUMS.txt, which every download is checked against (no SHA256SUMS.txt line = no update from that file).
- - name: SHA256SUMS
- run: |
- cd dist
- rm -f SHA256SUMS.txt
- sha256sum -- * > SHA256SUMS.txt
- cat SHA256SUMS.txt
- {
- echo "### After publishing this release"
- echo "Run \`scripts/publish-appimage-update.sh v$LABEL\`: until then, AppImage update checks keep offering the previous release."
- } >> "$GITHUB_STEP_SUMMARY"
- echo "::notice title=After publishing::Run scripts/publish-appimage-update.sh v$LABEL (AppImage update address)"
- - name: Upload all files
- uses: actions/upload-artifact@v7
- with:
- name: LYNX-${{ env.LABEL }}-all
- path: dist/*
- if-no-files-found: error
- - name: Attach to the GitHub release
- if: github.ref_type == 'tag'
- env:
- GH_TOKEN: ${{ github.token }}
- GH_REPO: ${{ github.repository }}
- run: |
- tag="$GITHUB_REF_NAME"
- if ! gh release view "$tag" > /dev/null 2>&1; then
- gh release create "$tag" --draft --prerelease --title "LYNX SHARE ${tag#v}" \
- --notes "Built from \`$GITHUB_SHA\` by [this workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
- fi
- gh release upload "$tag" dist/* --clobber
- # LYNX's plugins for other hosts (round 188b, docs/PLUGIN_EXPORT.md): a separate, optional download with its own
- # LYNX-Plugins-<label>-SHA256SUMS.txt. Its file names never end like the app's (the updater picks the app's by suffix).
- plugins:
- name: Plugins
- needs: version
- uses: ./.github/workflows/plugins.yml
- with:
- label: ${{ needs.version.outputs.label }}
- plugins-publish:
- name: Plugins on the release
- needs: [version, publish, plugins]
- if: ${{ !cancelled() && needs.publish.result == 'success' && needs.plugins.result == 'success' && github.ref_type == 'tag' }}
- runs-on: ubuntu-24.04
- permissions:
- contents: write # attach the files to the (draft) release that publish made
- env:
- LABEL: ${{ needs.version.outputs.label }}
- steps:
- - uses: actions/download-artifact@v8
- with:
- name: LYNX-Plugins-${{ env.LABEL }}-all
- path: dist
- - name: Attach to the GitHub release
- env:
- GH_TOKEN: ${{ github.token }}
- GH_REPO: ${{ github.repository }}
- run: |
- ls -la dist
- gh release upload "$GITHUB_REF_NAME" dist/LYNX-Plugins-* --clobber
- # Microsoft Store: DISABLED in CI (round 190ij, queue item 23). This job used to run `msstore publish`, which clones the
- # last published submission and swaps only the package. That reused the old 0.1.22 listings and the old pepper icon,
- # and certification failed (10.1.1.11 On Device Tiles, 10.1.1.3 Inaccurate Representation). The working path is a full
- # submission (15 listings, images, certification note) made by the maintainer's local scripts (submit.sh +
- # build_body.py, Partner Center API) after the release is published; see docs/STORE.md > Automatic Store submission.
- # The job therefore creates NO submission and touches no Store secret; it only prints a reminder on a tag run.
- store:
- name: Microsoft Store submission (manual)
- needs: [version, publish]
- if: ${{ !cancelled() && needs.publish.result == 'success' && github.ref_type == 'tag' }}
- runs-on: ubuntu-24.04
- steps:
- - name: Reminder
- env:
- LABEL: ${{ needs.version.outputs.label }}
- run: |
- echo "::notice title=Microsoft Store::CI does not submit to the Store (it would reuse old listings). Submit LYNX-$LABEL-store.msix with the local full-submission script (docs/STORE.md)."
|