swiftlang / swiftlang/github-workflows

Add apple platform cross compile workflows.

Open
#133 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
115
Forks
57
Avg merge
1d 8h
Merged PRs (30d)
3

Description

Swift-MMIO wants to make sure it can build for all apple platforms, so we've added the following workflow. Something similar should be provided directly by this repo.

name: Apple CC Matrix

on:
  workflow_call:

jobs:
  apple-cc-build:
    name: ${{ matrix.os.name }} (Xcode ${{ matrix.xcode_version }} - ${{ matrix.macos_version }} - ${{ matrix.macos_arch }})
    runs-on: [self-hosted, macos, "${{ matrix.macos_version }}", "${{ matrix.macos_arch }}"]
    strategy:
      fail-fast: false
      matrix:
        xcode_version: ["16.3"]
        os:
          - name: iOS
            platform: iOS
          - name: tvOS
            platform: tvOS
          - name: visionOS
            platform: xrOS
          - name: watchOS
            platform: watchOS
        arch: [arm64]
        macos_version: [sequoia]
        macos_arch: [ARM64]
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Install xcbeautify
        run: |
          curl -L https://github.com/cpisciotta/xcbeautify/releases/download/2.28.0/xcbeautify-2.28.0-arm64-apple-macosx.zip -o xcbeautify.zip
          sha256 -c 00d16a08b426e004e5d101631515ea1bbc0ab20209541cd4cacb569d3289c9e7 xcbeautify.zip
          unzip xcbeautify.zip -d /tmp
          chmod +x /tmp/xcbeautify
          /tmp/xcbeautify --version
      - name: Select Xcode
        run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode_version }}.app" >> $GITHUB_ENV
      - name: Swift version
        run: xcrun swift --version
      - name: Build / Test
        run: xcodebuild build -scheme swift-mmio-Package -destination generic/platform=${{ matrix.os.platform }} | /tmp/xcbeautify
        timeout-minutes: 60

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the repository's existing GitHub Actions workflow files and compare their conventions with the provided Apple CC Matrix example. Add the corresponding Apple-platform workflow, then verify that the matrix covers iOS, tvOS, visionOS, and watchOS and that each build/test job completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, swift
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.