mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 12:21:08 +01:00
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch. gate test shard 1/5 (and the Sonar scan that reads its coverage) fails on crates/ui-egui/src/doc_windows/tests.rs `a_document_made_current_in_presentation_mode_comes_to_the_front_after_it`, which main fails too (CI run 45581083304); this PR touches no ui-egui code. Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
91 lines
4.5 KiB
YAML
91 lines
4.5 KiB
YAML
name: Nightly macOS build
|
|
|
|
# Builds the unsigned Apple-silicon VectorCraft Nightly (packaging/macos/nightly.sh) on a hosted
|
|
# macOS runner and checks the archive as the Launcher unpacks it, ending with the bundle's version
|
|
# query (packaging/macos/nightly-verify.sh --expect unsigned). No secrets and no environment: the real
|
|
# Nightly is signed and notarized by the shared release-ref signer (craft-common-actions), which calls
|
|
# packaging/macos/nightly-sign.sh.
|
|
on:
|
|
# macOS runners are shared with release builds and have a monthly minute cap: pull requests run
|
|
# this only with the `full-ci` label, never by changed paths. `labeled` so adding it starts a run.
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, labeled]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# A newer push to a labelled PR cancels its older run. Any event that will not build (no `full-ci`
|
|
# label, or another label added) gets a group of its own, so it never cancels a real build.
|
|
concurrency:
|
|
group: nightly-macos-${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'full-ci') && (github.event.action != 'labeled' || github.event.label.name == 'full-ci') && github.ref || github.run_id }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Nightly .app (aarch64, unsigned)
|
|
if: >-
|
|
github.event_name == 'workflow_dispatch' ||
|
|
(contains(github.event.pull_request.labels.*.name, 'full-ci') &&
|
|
(github.event.action != 'labeled' || github.event.label.name == 'full-ci'))
|
|
runs-on: macos-15
|
|
timeout-minutes: 120
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: 0
|
|
RUST_BACKTRACE: 1
|
|
steps:
|
|
- name: Harden runner
|
|
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
|
|
with:
|
|
egress-policy: audit
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
# The release's pin (release.yml craft-fonts-ref), so the bundle's notices match a shipped build.
|
|
- name: Check out craft-fonts
|
|
uses: storytold/craft-common-actions/actions/checkout-craft-fonts@main
|
|
with:
|
|
ref: b076417b5880bd4154bd22f00695b1d28c6bea83
|
|
- id: rust
|
|
uses: storytold/craft-common-actions/actions/rust-channel@main
|
|
with:
|
|
targets: aarch64-apple-darwin
|
|
- uses: step-security/dtolnay-rust-toolchain@8dd607977d06adf4ed49b190381e74c17a9dd25f # v1.0.0
|
|
with:
|
|
toolchain: ${{ steps.rust.outputs.toolchain }}
|
|
targets: ${{ steps.rust.outputs.targets }}
|
|
components: ${{ steps.rust.outputs.components }}
|
|
# A version of the prepared Nightly form for this commit; the real one comes from the feed's
|
|
# identity job. Only nightly.sh's input checks read it.
|
|
- name: Prepare a Nightly identity for this commit
|
|
run: |
|
|
set -euo pipefail
|
|
base="$(python3 -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["package"]["version"].split("-")[0])')"
|
|
sha="$(git rev-parse HEAD)"
|
|
date="$(date -u +%Y-%m-%d)"
|
|
{
|
|
echo "VECTORCRAFT_BUILD_SHA=$sha"
|
|
echo "VECTORCRAFT_BUILD_DATE=$date"
|
|
echo "VECTORCRAFT_VERSION=$base-nightly.${date//-/}.$GITHUB_RUN_NUMBER.$GITHUB_RUN_ATTEMPT.g${sha:0:12}"
|
|
} >>"$GITHUB_ENV"
|
|
- name: Build the unsigned Nightly bundle
|
|
env:
|
|
VECTORCRAFT_BUILD_CHANNEL: nightly-v1
|
|
CARGO_TARGET_DIR: ${{ runner.temp }}/nightly-targets
|
|
DIST: ${{ runner.temp }}/nightly-dist
|
|
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
|
|
run: bash packaging/macos/nightly.sh --arch aarch64
|
|
- name: Check the archive and the bundle's version
|
|
run: bash packaging/macos/nightly-verify.sh --expect unsigned --input "$RUNNER_TEMP/nightly-dist/vectorcraft-$VECTORCRAFT_VERSION-macos-aarch64-nightly.zip"
|
|
# Keeps the verified unsigned zip briefly for keyless signer tests and hand testing. Unsigned only.
|
|
- name: Keep the unsigned archive
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
with:
|
|
name: vectorcraft-nightly-macos-aarch64-unsigned
|
|
path: ${{ runner.temp }}/nightly-dist/vectorcraft-${{ env.VECTORCRAFT_VERSION }}-macos-aarch64-nightly.zip
|
|
if-no-files-found: error
|
|
retention-days: 7
|
|
compression-level: 0
|