name: qt-ci on: workflow_dispatch: inputs: publish_nightly: description: Publish a nightly with signed update manifests after all checks pass type: boolean default: false linux_arm64_host: description: Add an x64 cross-build benchmark alongside the native ARM64 baseline type: choice options: - native - x64 default: native public_key: description: Production Ed25519 public key (leave default for verified updates) type: string default: HoyKVmfuH+KDioPCJJNxOB2e/bXJoOALSjo1QeMsDlk= pull_request: branches: - dev - main - capy/explain-cloud-session-setup - capy/gfn-correctness/** paths: - ".github/workflows/qt-ci.yml" - ".github/workflows/qt-build.yml" - ".github/workflows/qt-checks.yml" - ".github/workflows/qt-flatpak.yml" - ".github/workflows/qt-linux-arm64-cross.yml" - ".github/workflows/qt-release-candidate.yml" - ".github/workflows/qt-stable-release.yml" - ".github/workflows/decky.yml" - ".github/actionlint.yaml" - ".github/actions/**" - ".github/cmake/**" - ".github/scripts/**" - "opennow-qt/**" - "native/opennow-core/**" - "native/opennow-streamer/**" - "locales/**" - "scripts/**" - "package.json" - "decky/**" push: branches: - dev - main paths: - ".github/workflows/qt-ci.yml" - ".github/workflows/qt-build.yml" - ".github/workflows/qt-checks.yml" - ".github/workflows/qt-flatpak.yml" - ".github/workflows/qt-linux-arm64-cross.yml" - ".github/workflows/qt-release-candidate.yml" - ".github/workflows/qt-stable-release.yml" - ".github/actionlint.yaml" - ".github/actions/**" - ".github/cmake/**" - ".github/scripts/**" - "opennow-qt/**" - "native/opennow-core/**" - "native/opennow-streamer/**" - "locales/**" - "scripts/**" - "package.json" concurrency: group: qt-ci-${{ github.event_name == 'workflow_dispatch' && github.run_id || github.ref }} cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }} permissions: contents: read jobs: preflight: name: Validate nightly update key if: github.event_name == 'workflow_dispatch' runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} persist-credentials: false - name: Require a pinned public key for publication env: OPENNOW_UPDATE_PUBLIC_KEY: ${{ inputs.public_key }} PUBLISH_RELEASE: ${{ inputs.publish_nightly }} run: python3 opennow-qt/packaging/sign_nightly_release.py preflight - name: Require a nightly base newer than the published stable if: inputs.publish_nightly env: GH_TOKEN: ${{ github.token }} run: | version=$(python3 opennow-qt/packaging/nightly_release.py version \ --run "$GITHUB_RUN_NUMBER" --attempt "$GITHUB_RUN_ATTEMPT") gh api --paginate --slurp "repos/$GITHUB_REPOSITORY/releases?per_page=100" \ > "$RUNNER_TEMP/releases.json" python3 opennow-qt/packaging/sign_nightly_release.py release-guard \ --version "$version" --releases "$RUNNER_TEMP/releases.json" contracts: name: Shared checks uses: ./.github/workflows/qt-checks.yml checks: name: ${{ matrix.label }} needs: contracts if: ${{ !cancelled() && needs.contracts.result != 'cancelled' }} runs-on: ${{ matrix.os }} timeout-minutes: 30 strategy: fail-fast: false matrix: include: - label: linux-x64 os: blacksmith-16vcpu-ubuntu-2404 qt-host: linux qt-arch: linux_gcc_64 target-arch: x64 parallel: "8" - label: windows-x64 os: blacksmith-16vcpu-windows-2025 qt-host: windows qt-arch: win64_msvc2022_64 target-arch: x64 parallel: "8" - label: macos-arm64 os: blacksmith-6vcpu-macos-15 qt-host: mac qt-arch: clang_64 target-arch: arm64 parallel: "3" env: CARGO_TERM_COLOR: always OPENNOW_CHECKOUT: ${{ matrix.label == 'windows-x64' && 'O:/' || github.workspace }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.label == 'macos-arm64' && '13.0' || '' }} steps: - name: Require shared checks to pass shell: bash env: CONTRACTS_RESULT: ${{ needs.contracts.result }} run: test "$CONTRACTS_RESULT" = success - uses: actions/checkout@v4 - uses: ./.github/actions/qt-unit-tests with: label: ${{ matrix.label }} qt-host: ${{ matrix.qt-host }} qt-arch: ${{ matrix.qt-arch }} target-arch: ${{ matrix.target-arch }} parallel: ${{ matrix.parallel }} build: name: Manual packages if: github.event_name == 'workflow_dispatch' needs: [contracts, preflight] uses: ./.github/workflows/qt-build.yml with: upload_complete: ${{ github.event_name == 'workflow_dispatch' }} update_public_key: ${{ inputs.public_key }} linux_arm64_host: ${{ inputs.linux_arm64_host }} sign-nightly: name: Isolated nightly update signing if: github.event_name == 'workflow_dispatch' && inputs.publish_nightly && inputs.linux_arm64_host == 'native' needs: [preflight, contracts, checks, build] runs-on: blacksmith-2vcpu-ubuntu-2404 environment: qt-update-signing timeout-minutes: 30 steps: - name: Verify signing tools run: | python3 -c 'import sys; assert sys.version_info >= (3, 11)' openssl version | grep -E '^OpenSSL 3\.' command -v jq sha256sum >/dev/null - uses: actions/checkout@v4 with: ref: ${{ github.sha }} persist-credentials: false sparse-checkout: opennow-qt/packaging - uses: actions/download-artifact@v4 with: name: opennow-qt-${{ needs.build.outputs.version }}-complete-unsigned path: unsigned-release - name: Sign and verify the immutable packages and AppImage sidecars env: OPENNOW_UPDATE_PUBLIC_KEY: ${{ inputs.public_key }} OPENNOW_UPDATE_ED25519_PRIVATE_KEY: ${{ secrets.OPENNOW_UPDATE_ED25519_PRIVATE_KEY }} RELEASE_VERSION: ${{ needs.build.outputs.version }} SOURCE_SHA: ${{ github.sha }} run: | python3 opennow-qt/packaging/sign_nightly_release.py sign \ --source unsigned-release --destination signed-release \ --version "$RELEASE_VERSION" --commit "$SOURCE_SHA" - uses: actions/upload-artifact@v4 with: name: opennow-qt-${{ needs.build.outputs.version }}-complete-update-signed path: signed-release/ if-no-files-found: error compression-level: 0 retention-days: 14 - name: Remove signing workspace artifacts if: always() run: rm -rf unsigned-release signed-release publish-nightly: name: Publish update-signed nightly prerelease if: github.event_name == 'workflow_dispatch' && inputs.publish_nightly && inputs.linux_arm64_host == 'native' needs: [contracts, checks, build, sign-nightly] runs-on: blacksmith-2vcpu-ubuntu-2404 permissions: contents: write env: RELEASE_VERSION: ${{ needs.build.outputs.version }} SOURCE_SHA: ${{ github.sha }} OPENNOW_UPDATE_PUBLIC_KEY: ${{ inputs.public_key }} steps: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} persist-credentials: false sparse-checkout: opennow-qt/packaging - uses: actions/download-artifact@v4 with: name: opennow-qt-${{ needs.build.outputs.version }}-complete-update-signed path: nightly-release - name: Verify signed inventory shell: bash run: | python3 opennow-qt/packaging/sign_nightly_release.py verify \ --source nightly-release --version "$RELEASE_VERSION" --commit "$SOURCE_SHA" (cd nightly-release && sha256sum --check --strict SHA256SUMS) - name: Upload the complete draft release shell: bash env: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail python3 opennow-qt/packaging/verify_release_tag.py \ --repository "$GITHUB_REPOSITORY" --tag "v$RELEASE_VERSION" \ --commit "$SOURCE_SHA" --allow-missing gh release create "v$RELEASE_VERSION" nightly-release/* \ --repo "$GITHUB_REPOSITORY" --target "$SOURCE_SHA" \ --title "OpenNOW v$RELEASE_VERSION" --generate-notes \ --draft --prerelease --latest=false - name: Require a nightly base newer than the published stable shell: bash env: GH_TOKEN: ${{ github.token }} run: | gh api --paginate --slurp "repos/$GITHUB_REPOSITORY/releases?per_page=100" \ > "$RUNNER_TEMP/releases.json" python3 opennow-qt/packaging/sign_nightly_release.py release-guard \ --version "$RELEASE_VERSION" --releases "$RUNNER_TEMP/releases.json" - name: Publish the verified draft shell: bash env: GH_TOKEN: ${{ github.token }} run: | python3 opennow-qt/packaging/verify_release_tag.py \ --repository "$GITHUB_REPOSITORY" --tag "v$RELEASE_VERSION" \ --commit "$SOURCE_SHA" --create-missing gh release edit "v$RELEASE_VERSION" --repo "$GITHUB_REPOSITORY" \ --draft=false --prerelease --latest=false