diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..83e3ffb --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [mattmassicotte] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..65d6a2c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: + - main + paths-ignore: + - 'README.md' + - 'CODE_OF_CONDUCT.md' + - '.editorconfig' + - '.spi.yml' + pull_request: + branches: + - main + +jobs: + test: + name: Test + runs-on: macOS-14 + env: + DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer + strategy: + matrix: + destination: + - "platform=macOS" + - "platform=macOS,variant=Mac Catalyst" + - "platform=iOS Simulator,name=iPhone 12" + - "platform=tvOS Simulator,name=Apple TV" + - "platform=visionOS Simulator,name=Apple Vision Pro" + + steps: + - uses: actions/checkout@v4 + - name: Test platform ${{ matrix.destination }} + run: set -o pipefail && xcodebuild -scheme Glyph -destination "${{ matrix.destination }}" test | xcbeautify diff --git a/Package.swift b/Package.swift index f96db3f..ddd755f 100644 --- a/Package.swift +++ b/Package.swift @@ -1,23 +1,31 @@ // swift-tools-version: 5.10 -// The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( - name: "Glyph", - products: [ - // Products define the executables and libraries a package produces, making them visible to other packages. - .library( - name: "Glyph", - targets: ["Glyph"]), - ], - targets: [ - // Targets are the basic building blocks of a package, defining a module or a test suite. - // Targets can depend on other targets in this package and products from dependencies. - .target( - name: "Glyph"), - .testTarget( - name: "GlyphTests", - dependencies: ["Glyph"]), - ] + name: "Glyph", + platforms: [ + .macOS(.v10_15), + .macCatalyst(.v13), + .iOS(.v13), + .tvOS(.v13), + .visionOS(.v1), + ], + products: [ + .library(name: "Glyph", targets: ["Glyph"]), + ], + targets: [ + .target(name: "Glyph"), + .testTarget(name: "GlyphTests", dependencies: ["Glyph"]), + ] ) + +let swiftSettings: [SwiftSetting] = [ + .enableExperimentalFeature("StrictConcurrency"), +] + +for target in package.targets { + var settings = target.swiftSettings ?? [] + settings.append(contentsOf: swiftSettings) + target.swiftSettings = settings +}