# THROWAWAY build smoke-test for the macOS (Tart) runner. Verifies both # *-apple-darwin targets actually compile and link (incl. arboard's AppKit) # through the flake on the real Mac, before the full release-macos workflow is # wired. Delete once that lands. # # Push-triggered (workflow_dispatch only works for workflows on the default # branch; our CI is on `ci`). Runs when the flake/toolchain or this file change. # Bring the Mac up before pushing so the run isn't left queued. name: macos-build-test on: push: paths: - '.gitea/workflows/macos-probe.yaml' - 'flake.nix' - 'rust-toolchain.toml' workflow_dispatch: jobs: build: # Label NAME only — `:host` in the runner registration is the execution # backend (run on host), not part of the label. runs-on: macos env: # Guarantee flakes regardless of the Mac's nix config. NIX_CONFIG: "experimental-features = nix-command flakes" steps: - uses: actions/checkout@v4 - name: build both darwin targets through the flake run: | set -e for t in aarch64-apple-darwin x86_64-apple-darwin; do echo "==================== $t ====================" nix develop -c cargo build --release --target "$t" f="target/$t/release/rdbms-playground" file "$f" echo "--- linked libs (otool -L) ---" otool -L "$f" # Portability guard: a distributable macOS binary must link only # system libs (/usr/lib, /System/Library) — never a /nix/store path. if otool -L "$f" | grep -q /nix/store; then echo "ERROR: $t binary links a /nix/store dylib — not portable"; exit 1 fi echo "OK: $t links only system libraries" done echo "=== both darwin targets built + portable ==="