Revyl Documentation

Cookbooks

Run Swift or unsigned macOS builds on Revyl Mac CI

Test a Swift package or build a macOS app without signing on a Revyl Mac.

Use the Mac when your repository needs the native Swift toolchain or an unsigned macOS build. The image contract validates Xcode and xcrun; the first step below also probes swift and prints the toolchain versions before spending time on the build.

Set up with an agent

Paste one prompt and your coding agent does the rest.

Setup prompt

Run this repository's Swift tests on a Revyl Mac.

Read https://docs.revyl.com/cookbooks/swift-macos-revyl-macos.md and follow it. It's the current Revyl guide for this, so prefer it over anything you remember about Revyl.

Copy this workflow into `.github/workflows/swift-macos.yml`, keep a Swift package at the repository root, and use a shorter timeout so cleanup has time to finish.

You're done when the native toolchain probe passes and `swift test` completes on the Revyl Mac.

Ask me before anything that needs my login or approval.

Swift package workflow

name: Swift tests on Revyl Mac

on:
  pull_request:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  swift:
    if: >-
      github.event_name == 'workflow_dispatch' ||
      (github.event_name == 'pull_request' &&
       github.event.pull_request.head.repo.full_name == github.repository)
    runs-on: revyl-macos
    timeout-minutes: 55
    steps:
      - uses: actions/checkout@v4

      - name: Probe the native toolchain
        shell: bash
        run: |
          set -euo pipefail
          command -v xcodebuild
          command -v xcrun
          command -v swift
          xcodebuild -version
          swift --version

      - name: Run Swift tests
        run: swift test --parallel

For a package in a subdirectory, add working-directory to both steps or cd there before the probe. The workflow does not install Swift, Xcode, or a package manager; those come from the sealed image and your repository.

Unsigned macOS app build

For a committed Xcode project, replace the test step with this command and set the two environment values to your project:

env:
  MACOS_PROJECT: MyMacApp.xcodeproj
  MACOS_SCHEME: MyMacApp

steps:
  - uses: actions/checkout@v4
  - name: Build the macOS app without signing
    shell: bash
    run: |
      set -euo pipefail
      xcodebuild \
        -project "$MACOS_PROJECT" \
        -scheme "$MACOS_SCHEME" \
        -sdk macosx \
        -configuration Debug \
        -derivedDataPath "$RUNNER_TEMP/DerivedData" \
        CODE_SIGNING_ALLOWED=NO \
        CODE_SIGNING_REQUIRED=NO \
        build

This builds and tests code without a signing identity, keychain, Developer ID certificate, archive, or notarization step. Those signing workflows need credentials and approvals that this sealed job does not provide.

General macOS scripts

The same runner is suitable for short, signing-free shell scripts. Keep inputs in the checkout, $RUNNER_TEMP, or the job user's home:

- name: Run a macOS maintenance script
  shell: bash
  run: |
    set -euo pipefail
    sw_vers
    bash scripts/check_release.sh

For a Python script, install a project-specific Python under $HOME first; the image's Python runtimes are not part of the job contract.

Do not put credentials in script arguments or output. Use GitHub Actions secret environment variables only for the step that needs them, and keep generated reports private.

Common failures

  • swift is missing: keep the probe. Report the image mismatch instead of installing a second Xcode toolchain with sudo.
  • The project asks for signing: use a Simulator or unsigned Debug build, or move signing to a separate credentialed job.
  • The job approaches its limit: split dependency resolution and build work, then keep the workflow timeout below the agreed backend/host ceiling. The current production and staging sources use two hours, and a mismatch refuses the computer rather than shortening it.

On this page