Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Commit 4313f91

Browse files
authored
Update to Swift 5.3 (#5)
* Run CI on Swift 5.2 and 5.3 * Add names to CI jobs * Update to checkout@v2 * Update Package.swift to swift-tools-version 5.3 Add [email protected]
1 parent 8ce896c commit 4313f91

File tree

3 files changed

+52
-14
lines changed

3 files changed

+52
-14
lines changed

.github/workflows/ci.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@ on: [push]
44

55
jobs:
66
macos:
7-
runs-on: macOS-latest
7+
runs-on: macos-latest
8+
9+
strategy:
10+
matrix:
11+
xcode:
12+
- "11.7" # Swift 5.2
13+
- "12" # Swift 5.3
14+
15+
name: "macOS Catalina (Xcode ${{ matrix.xcode }})"
816

917
steps:
1018
- name: Checkout
11-
uses: actions/checkout@v1
19+
uses: actions/checkout@v2
1220
- name: Build and Test
1321
run: swift test
1422

@@ -17,13 +25,15 @@ jobs:
1725

1826
strategy:
1927
matrix:
20-
swift: ["5.1"]
28+
swift: ["5.2", "5.3"]
29+
30+
name: "Linux (Swift ${{ matrix.swift }})"
2131

2232
container:
2333
image: swift:${{ matrix.swift }}
2434

2535
steps:
2636
- name: Checkout
27-
uses: actions/checkout@v1
37+
uses: actions/checkout@v2
2838
- name: Build and Test
2939
run: swift test --enable-test-discovery

Package.swift

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
// swift-tools-version:5.1
2-
// The swift-tools-version declares the minimum version of Swift required to build this package.
1+
// swift-tools-version:5.3
32

43
import PackageDescription
54

65
let package = Package(
76
name: "SwiftMarkup",
87
products: [
9-
// Products define the executables and libraries produced by a package, and make them visible to other packages.
108
.library(
119
name: "SwiftMarkup",
1210
targets: ["SwiftMarkup"]
1311
),
1412
],
1513
dependencies: [
16-
// Dependencies declare other packages that this package depends on.
17-
.package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.5.0")),
14+
.package(name: "CommonMark",
15+
url: "https://github.com/SwiftDocOrg/CommonMark.git",
16+
.upToNextMinor(from: "0.5.0")),
1817
],
1918
targets: [
20-
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
21-
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2219
.target(
2320
name: "SwiftMarkup",
24-
dependencies: ["CommonMark"]
21+
dependencies: [
22+
.product(name: "CommonMark", package: "CommonMark")
23+
]
2524
),
2625
.testTarget(
2726
name: "SwiftMarkupTests",
28-
dependencies: ["SwiftMarkup"]
29-
),
27+
dependencies: [
28+
.target(name: "SwiftMarkup")
29+
]
30+
)
3031
]
3132
)

[email protected]

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// swift-tools-version:5.1
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "SwiftMarkup",
7+
products: [
8+
.library(
9+
name: "SwiftMarkup",
10+
targets: ["SwiftMarkup"]
11+
),
12+
],
13+
dependencies: [
14+
.package(url: "https://github.com/SwiftDocOrg/CommonMark.git",
15+
.upToNextMinor(from: "0.5.0")),
16+
],
17+
targets: [
18+
.target(
19+
name: "SwiftMarkup",
20+
dependencies: ["CommonMark"]
21+
),
22+
.testTarget(
23+
name: "SwiftMarkupTests",
24+
dependencies: ["SwiftMarkup"]
25+
)
26+
]
27+
)

0 commit comments

Comments
 (0)