Skip to content

Commit f761f11

Browse files
Copilotfulldecent
andcommitted
Fix GitHub Actions workflow for macOS/iOS builds and add platform specs to Package.swift
Co-authored-by: fulldecent <[email protected]>
1 parent 8dd2934 commit f761f11

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,21 @@ name: Test
99

1010
jobs:
1111
test:
12-
runs-on: macos-latest
12+
runs-on: macos-13
1313

1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- name: Select Xcode version
18-
run: >
19-
sudo xcode-select -s
20-
/Applications/Xcode_15.4.app/Contents/Developer
17+
- name: Setup Xcode version
18+
uses: maxim-lobanov/setup-xcode@v1
19+
with:
20+
xcode-version: '15.4'
2121

22-
- name: Build
22+
- name: Build for macOS
2323
run: swift build
2424

2525
- name: Run tests
2626
run: swift test
2727

28-
- name: Build for iOS Simulator
29-
run: |
30-
xcodebuild -scheme FDWaveformView \
31-
-destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \
32-
build \
33-
CODE_SIGNING_REQUIRED=NO \
34-
CODE_SIGNING_ALLOWED=NO
28+
- name: Build for iOS
29+
run: swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios12.0-simulator"

Package.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import PackageDescription
55

66
let package = Package(
77
name: "FDWaveformView",
8+
platforms: [
9+
.iOS(.v12),
10+
.macOS(.v10_14)
11+
],
812
products: [
913
// Products define the executables and libraries a package produces, making them visible to other packages.
1014
.library(

0 commit comments

Comments
 (0)