Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit dc1cac9

Browse files
MaxDesiatovmattt
andauthored
Test with Swift 5.3 on Linux (#183)
* Test with Swift 5.3 on Linux * Test Swift 5.3 and 5.2 on Linux * Test Swift 5.3 and 5.2 on macOS * Add package manifests for Swift 5.2 and 5.3 * Add Changelog entry for #183 * Test on latest version of Xcode for Swift 5.2 Co-authored-by: Mattt <[email protected]>
1 parent 81de0cd commit dc1cac9

File tree

4 files changed

+96
-14
lines changed

4 files changed

+96
-14
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,47 @@ on:
88

99
jobs:
1010
macos:
11-
runs-on: macOS-latest
11+
runs-on: macos-latest
12+
13+
strategy:
14+
matrix:
15+
xcode:
16+
- "11.7" # Swift 5.2
17+
- "12" # Swift 5.3
1218

1319
steps:
1420
- name: Checkout
1521
uses: actions/checkout@v1
1622
- uses: actions/cache@v2
1723
with:
1824
path: .build
19-
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
25+
key: ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
2026
restore-keys: |
21-
${{ runner.os }}-spm-
27+
${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-
2228
- name: Build and Test
2329
run: swift test -c release
2430
env:
25-
DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer
31+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
2632

2733
linux:
2834
runs-on: ubuntu-latest
2935

36+
strategy:
37+
matrix:
38+
swift: ["5.3", "5.2"]
39+
3040
container:
31-
image: swift:5.2
41+
image: swift:${{ matrix.swift }}
3242

3343
steps:
3444
- name: Checkout
3545
uses: actions/checkout@v1
3646
- uses: actions/cache@v2
3747
with:
3848
path: .build
39-
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
49+
key: ${{ runner.os }}-spm-swift-${{ matrix.swift }}-${{ hashFiles('**/Package.resolved') }}
4050
restore-keys: |
41-
${{ runner.os }}-spm-
51+
${{ runner.os }}-spm-swift-${{ matrix.swift }}-
4252
- name: Install System Dependencies
4353
run: |
4454
apt-get update

Changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Added support for Swift 5.3.
13+
#183 by @MaxDesiatov and @mattt.
14+
1015
### Fixed
1116

1217
- Fixed missing GraphViz dependency in Dockerfile.

Package.swift

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.1
1+
// swift-tools-version:5.3
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
@@ -10,36 +10,58 @@ let package = Package(
1010
.library(name: "SwiftDoc", targets: ["SwiftDoc"])
1111
],
1212
dependencies: [
13-
.package(url: "https://github.com/apple/swift-syntax.git", .revision("0.50200.0")),
13+
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .revision("0.50300.0")),
1414
.package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .upToNextMinor(from: "0.1.0")),
1515
.package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.4.0")),
1616
.package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.2.1")),
1717
.package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.1.2")),
1818
.package(url: "https://github.com/NSHipster/HypertextLiteral.git", .upToNextMinor(from: "0.0.2")),
1919
.package(url: "https://github.com/SwiftDocOrg/Markup.git", .upToNextMinor(from: "0.0.3")),
20-
.package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.0.0")),
20+
.package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.1.0")),
2121
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.0.6")),
2222
.package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.2.0")),
23-
.package(url: "https://github.com/NSHipster/swift-log-github-actions.git", .upToNextMinor(from: "0.0.1")),
23+
.package(name: "LoggingGitHubActions", url: "https://github.com/NSHipster/swift-log-github-actions.git", .upToNextMinor(from: "0.0.1")),
2424
],
2525
targets: [
2626
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
2727
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2828
.target(
2929
name: "swift-doc",
30-
dependencies: ["ArgumentParser", "SwiftDoc", "SwiftSemantics", "SwiftMarkup", "CommonMarkBuilder", "HypertextLiteral", "Markup", "DCOV", "GraphViz", "SwiftSyntaxHighlighter", "Logging", "LoggingGitHubActions"]
30+
dependencies: [
31+
.target(name: "SwiftDoc"),
32+
.target(name: "DCOV"),
33+
.product(name: "ArgumentParser", package: "swift-argument-parser"),
34+
.product(name: "SwiftSemantics", package: "SwiftSemantics"),
35+
.product(name: "SwiftMarkup", package: "SwiftMarkup"),
36+
.product(name: "CommonMarkBuilder", package: "CommonMark"),
37+
.product(name: "HypertextLiteral", package: "HypertextLiteral"),
38+
.product(name: "Markup", package: "Markup"),
39+
.product(name: "GraphViz", package: "GraphViz"),
40+
.product(name: "SwiftSyntaxHighlighter", package: "SwiftSyntaxHighlighter"),
41+
.product(name: "Logging", package: "swift-log"),
42+
.product(name: "LoggingGitHubActions", package: "LoggingGitHubActions")
43+
]
3144
),
3245
.target(
3346
name: "DCOV",
3447
dependencies: []
3548
),
3649
.target(
3750
name: "SwiftDoc",
38-
dependencies: ["SwiftSyntax", "SwiftSemantics", "SwiftMarkup"]
51+
dependencies: [
52+
.product(name: "SwiftSyntax", package: "SwiftSyntax"),
53+
.product(name: "SwiftSemantics", package: "SwiftSemantics"),
54+
.product(name: "SwiftMarkup", package: "SwiftMarkup")
55+
]
3956
),
4057
.testTarget(
4158
name: "SwiftDocTests",
42-
dependencies: ["SwiftDoc", "SwiftSyntax", "SwiftSemantics", "SwiftMarkup"]
59+
dependencies: [
60+
.target(name: "SwiftDoc"),
61+
.product(name: "SwiftSyntax", package: "SwiftSyntax"),
62+
.product(name: "SwiftSemantics", package: "SwiftSemantics"),
63+
.product(name: "SwiftMarkup", package: "SwiftMarkup")
64+
]
4365
),
4466
]
4567
)

[email protected]

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// swift-tools-version:5.1
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "swift-doc",
8+
products: [
9+
.executable(name: "swift-doc", targets: ["swift-doc"]),
10+
.library(name: "SwiftDoc", targets: ["SwiftDoc"])
11+
],
12+
dependencies: [
13+
.package(url: "https://github.com/apple/swift-syntax.git", .revision("0.50200.0")),
14+
.package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .upToNextMinor(from: "0.1.0")),
15+
.package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.4.0")),
16+
.package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.2.1")),
17+
.package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.1.2")),
18+
.package(url: "https://github.com/NSHipster/HypertextLiteral.git", .upToNextMinor(from: "0.0.2")),
19+
.package(url: "https://github.com/SwiftDocOrg/Markup.git", .upToNextMinor(from: "0.0.3")),
20+
.package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.0.0")),
21+
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.0.6")),
22+
.package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.2.0")),
23+
.package(url: "https://github.com/NSHipster/swift-log-github-actions.git", .upToNextMinor(from: "0.0.1")),
24+
],
25+
targets: [
26+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
27+
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
28+
.target(
29+
name: "swift-doc",
30+
dependencies: ["ArgumentParser", "SwiftDoc", "SwiftSemantics", "SwiftMarkup", "CommonMarkBuilder", "HypertextLiteral", "Markup", "DCOV", "GraphViz", "SwiftSyntaxHighlighter", "Logging", "LoggingGitHubActions"]
31+
),
32+
.target(
33+
name: "DCOV",
34+
dependencies: []
35+
),
36+
.target(
37+
name: "SwiftDoc",
38+
dependencies: ["SwiftSyntax", "SwiftSemantics", "SwiftMarkup"]
39+
),
40+
.testTarget(
41+
name: "SwiftDocTests",
42+
dependencies: ["SwiftDoc", "SwiftSyntax", "SwiftSemantics", "SwiftMarkup"]
43+
),
44+
]
45+
)

0 commit comments

Comments
 (0)