Skip to content

Commit

Permalink
Add Swift 5.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ffried committed Sep 15, 2022
1 parent fd9986d commit c2cb096
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: swift-actions/[email protected]
id: swift-setup
with:
swift-version: '5.6'
swift-version: '5.7'
- name: Read OS Version
uses: sersoft-gmbh/[email protected]
id: os-version
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- uses: swift-actions/[email protected]
id: swift-setup
with:
swift-version: '5.6'
swift-version: '5.7'
- name: Read OS Version
uses: sersoft-gmbh/[email protected]
id: os-version
Expand Down
52 changes: 27 additions & 25 deletions .github/workflows/swift-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,33 @@ jobs:
test-spm:
strategy:
matrix:
os: [ macos-11, ubuntu-18.04, ubuntu-20.04 ]
swift-version: [ 5.5, 5.6 ]
os: [ macos-11 ]
swift-version: [ '' ]
xcode-version: [ '^13.0' ]
include:
- os: macos-12
swift-version: ''
xcode-version: '^14.0'
- os: ubuntu-20.04
swift-version: 5.5
xcode-version: ''
- os: ubuntu-20.04
swift-version: 5.6
xcode-version: ''
- os: ubuntu-20.04
swift-version: 5.7
xcode-version: ''
- os: ubuntu-22.04
swift-version: 5.7
xcode-version: ''

runs-on: ${{matrix.os}}

steps:
- if: runner.os == 'macOS'
uses: maxim-lobanov/[email protected]
with:
xcode-version: ^13.0
xcode-version: ${{matrix.xcode-version}}
- name: Install Swift
if: runner.os == 'Linux'
uses: sersoft-gmbh/[email protected]
Expand Down Expand Up @@ -55,50 +72,35 @@ jobs:
fail_ci_if_error: true

test-xcode:
runs-on: macos-11
runs-on: macos-12
strategy:
matrix:
action: [ test ]
destination:
- platform=macOS
- platform=iOS Simulator,OS=latest,name=iPhone 11 Pro
- platform=iOS Simulator,OS=latest,name=iPad Pro (11-inch) (2nd generation)
- platform=tvOS Simulator,OS=latest,name=Apple TV 4K
# parallel-testing-enabled: [true]
# enable-code-coverage: [true]
# Watch currently doesn't work because there's no XCTest on watchOS
# include:
# - action: build
# destination: platform=watchOS Simulator,OS=latest,name=Apple Watch Series 6 - 44mm
# parallel-testing-enabled: false
# enable-code-coverage: false
- platform=iOS Simulator,OS=latest,name=iPhone 13 Pro
- platform=iOS Simulator,OS=latest,name=iPad Pro (11-inch) (3rd generation)
- platform=tvOS Simulator,OS=latest,name=Apple TV 4K (2nd generation)
- platform=watchOS Simulator,OS=latest,name=Apple Watch Series 7 (45mm)
steps:
- uses: maxim-lobanov/[email protected]
with:
xcode-version: ^13.0
xcode-version: ^14.0
- name: Read Swift Version
uses: sersoft-gmbh/[email protected]
id: swift-version
- uses: actions/[email protected]
- name: Workaround Package.resolved format issues
if: ${{ startsWith(steps.swift-version.outputs.version, '5.5') }}
run: rm -rf Package.resolved
- uses: sersoft-gmbh/[email protected]
with:
spm-package: './'
scheme: swift-filestreamer
destination: ${{matrix.destination}}
action: ${{matrix.action}}
action: test
parallel-testing-enabled: true
enable-code-coverage: true
# parallel-testing-enabled: ${{matrix.parallel-testing-enabled}}
# enable-code-coverage: ${{matrix.enable-code-coverage}}
- uses: sersoft-gmbh/[email protected]
id: coverage-files
if: matrix.action == 'test'
- uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
fail_ci_if_error: true
if: matrix.action == 'test'
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-system.git",
"state" : {
"revision" : "836bc4557b74fe6d2660218d56e3ce96aff76574",
"version" : "1.1.1"
"revision" : "025bcb1165deab2e20d4eaba79967ce73013f496",
"version" : "1.2.1"
}
}
],
Expand Down
10 changes: 5 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.6
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -7,10 +7,10 @@ import Foundation
let package = Package(
name: "swift-filestreamer",
platforms: [
.macOS(.v10_12),
.iOS(.v10),
.tvOS(.v10),
.watchOS(.v3),
.macOS(.v10_13),
.iOS(.v11),
.tvOS(.v11),
.watchOS(.v4),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
Expand Down
41 changes: 41 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// swift-tools-version:5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
import Foundation

let package = Package(
name: "swift-filestreamer",
platforms: [
.macOS(.v10_12),
.iOS(.v10),
.tvOS(.v10),
.watchOS(.v3),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "FileStreamer",
targets: ["FileStreamer"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/apple/swift-system.git", from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "FileStreamer",
dependencies: [
.product(name: "SystemPackage", package: "swift-system"),
]),
.testTarget(
name: "FileStreamerTests",
dependencies: ["FileStreamer"]),
]
)

if ProcessInfo.processInfo.environment["ENABLE_DOCC_SUPPORT"] == "1" {
package.dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"))
}

0 comments on commit c2cb096

Please sign in to comment.