Skip to content

Commit

Permalink
Fix macOS building from Xcode
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmichel committed Oct 21, 2023
1 parent abdc4cf commit b627def
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pull Request Validation

on:
pull_request:

jobs:
windows:
runs-on: windows-latest

steps:
- name: "Checkout swift-sentry"
uses: actions/checkout@v4

- name: Install Swift
uses: compnerd/gha-setup-swift@main
with:
branch: swift-5.9-release
tag: 5.9-RELEASE

- name: Build
run: swift build --verbose

macOS:
runs-on: macos-13

steps:
- name: "Checkout swift-sentry"
uses: actions/checkout@v4

- name: Select Xcode 15.0
run: sudo xcode-select -s /Applications/Xcode_15.0.app

- name: Build
run: swift build --verbose
2 changes: 2 additions & 0 deletions Examples/SentryExampleMacOS/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ struct MacOSExample {
defer { Sentry.close() }

print("Hello macOS")

RunLoop.current.run()
}

static func startSentry() {
Expand Down
1 change: 1 addition & 0 deletions Sources/sentry/dummy.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// A required, empty file to ensure that when building from Xcode that a .o is produced.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import XCTest
@testable import swift_sentry
@testable import SwiftSentry

final class swift_sentryTests: XCTestCase {
final class SwiftSentryTests: XCTestCase {
func testExample() throws {
// XCTest Documentation
// https://developer.apple.com/documentation/xctest
Expand Down

0 comments on commit b627def

Please sign in to comment.