Skip to content

Commit

Permalink
Fix xcframework target naming issues with Swift versions before 5.8 (#29
Browse files Browse the repository at this point in the history
)

* Extend GH action to test on with Swift 5.7

* Test on macOS 12 + Xcode 13.4.1

* Test on macOS 12 + Xcode 13.4.1
  • Loading branch information
ctreffs authored Jun 29, 2023
1 parent 904737a commit 3b5bc24
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
47 changes: 46 additions & 1 deletion .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: macos-13
strategy:
matrix:
xcode: ["14.3.1"]
xcode: ["14.1", "15.0"]
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down Expand Up @@ -65,3 +65,48 @@ jobs:
path: |
SDL2.xcframework.zip
SDL2.xcframework.checksum.txt
macos-test-build-release-xcode-legacy:
runs-on: macos-12
strategy:
matrix:
xcode: ["13.4.1"]
steps:
- name: Checkout
uses: actions/[email protected]

- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app

- name: Test
run: swift test
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

- name: Upload test artifacts
if: failure()
uses: actions/[email protected]
with:
name: test-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
.build/**/*.json
.build/**/*.xctest
- name: Build Release
run: swift build -c release
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

- name: Upload build artifacts
if: failure()
uses: actions/[email protected]
with:
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
*.lcov
.build/*.yaml
.build/**/*.a
.build/**/*.so
.build/**/*.dylib
.build/**/*.dSYM
.build/**/*.json
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ let package = Package(
targets: [
.target(name: "SDL",
dependencies: [
.target(name: "SDL2-apple", condition: .when(platforms: [.macOS, .iOS, .tvOS])),
.target(name: "SDL2", condition: .when(platforms: [.macOS, .iOS, .tvOS])),
.target(name: "CSDL2", condition: .when(platforms: [.linux, .windows])),
],
path: "Sources/SDL2"),
.testTarget(name: "SDLTests", dependencies: ["SDL"]),
.binaryTarget(name: "SDL2-apple", path: "SDL2.xcframework"),
.binaryTarget(name: "SDL2", path: "SDL2.xcframework"),
.systemLibrary(
name: "CSDL2",
pkgConfig: "sdl2",
Expand Down

0 comments on commit 3b5bc24

Please sign in to comment.