Skip to content

Commit 0719c1d

Browse files
🤖 CI: Add build-package workflow
- 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
1 parent 5a4d985 commit 0719c1d

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

.github/workflows/build-package.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 🧩 Build Package
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
runs-on: macos-latest
10+
11+
steps:
12+
- name: Check out code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.10'
19+
20+
- name: Check last commit for skip keyword
21+
run: python workflow_scripts/check_latest_commit_for_skip.py >> $GITHUB_ENV
22+
23+
- name: ⏩ SKIPPING REMAINING STEPS 👀
24+
if: env.should_skip == 'true'
25+
run: exit 0
26+
27+
- name: Setup Swift
28+
if: env.should_skip == 'false'
29+
uses: swift-actions/[email protected]
30+
with:
31+
swift-version: '5.10' # Should match swift-tools-version in Package.swift
32+
33+
- name: Build Control Library
34+
if: env.should_skip == 'false'
35+
run: |
36+
xcodebuild -scheme Control \
37+
-sdk iphonesimulator \
38+
-configuration Release \
39+
-destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \
40+
BUILD_DIR=$(pwd)/build/Control
41+
42+
- name: Build Controllers Library
43+
if: env.should_skip == 'false'
44+
run: |
45+
xcodebuild -scheme Controllers \
46+
-sdk iphonesimulator \
47+
-configuration Release \
48+
-destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \
49+
BUILD_DIR=$(pwd)/build/Controllers

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 6.0
1+
// swift-tools-version: 5.10.0
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

0 commit comments

Comments
 (0)