Skip to content

Commit

Permalink
🤖 CI: Add build-package workflow
Browse files Browse the repository at this point in the history
- Decrement `swift-tools-version` from 6.0 to 5.10.0
- Can be set to 6.0 again when swift-actions/setup-swift supports Swift 6
    - See: swift-actions/setup-swift#684
  • Loading branch information
superturboryan committed Nov 6, 2024
1 parent a5e6bb5 commit 3994f69
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 🧩 Build Package

on:
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: macos-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Check last commit for skip keyword
run: python workflow_scripts/check_latest_commit_for_skip.py >> $GITHUB_ENV

- name: ⏩ SKIPPING REMAINING STEPS 👀
if: env.should_skip == 'true'
run: exit 0

- name: Setup Swift
if: env.should_skip == 'false'
uses: swift-actions/[email protected]
with:
swift-version: '5.10' # Should match swift-tools-version in Package.swift

- name: Build Control Library
if: env.should_skip == 'false'
run: |
xcodebuild -scheme Control \
-sdk iphonesimulator \
-configuration Release \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \
BUILD_DIR=$(pwd)/build/Control
- name: Build Controllers Library
if: env.should_skip == 'false'
run: |
xcodebuild -scheme Controllers \
-sdk iphonesimulator \
-configuration Release \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \
BUILD_DIR=$(pwd)/build/Controllers
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 6.0
// swift-tools-version: 5.10.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down

0 comments on commit 3994f69

Please sign in to comment.