Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Apr 5, 2024
1 parent 2b15fb3 commit 727cb92
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [mattmassicotte]
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
42 changes: 25 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 727cb92

Please sign in to comment.