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

Commit 94b9b9a

Browse files
compnerdmattt
andauthored
Add packa
* build: switch main to track main from swift-syntax This changes the build to track main, which is required when building against the latest toolchain. This allows us to build SwiftSyntaxHighlighter on Windows with the latest toolchain. * Revert "build: switch main to track main from swift-syntax" This reverts commit efaf5da. * Add version-specific manifests for Swift 5.4 and 5.5 * Update Xcode versions in CI workflow Co-authored-by: Mattt <mattt@me.com>
1 parent f2da001 commit 94b9b9a

File tree

3 files changed

+98
-2
lines changed

3 files changed

+98
-2
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
xcode:
16-
- "12.2" # Swift 5.3
16+
- "12.4" # Swift 5.3
1717

1818
name: "macOS Big Sur (Xcode ${{ matrix.xcode }})"
1919

@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
matrix:
4444
xcode:
45-
- "12" # Swift 5.3
45+
- "12.4" # Swift 5.3
4646

4747
name: "macOS Catalina (Xcode ${{ matrix.xcode }})"
4848

Package@swift-5.4.swift

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// swift-tools-version:5.3
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: "SwiftSyntaxHighlighter",
8+
platforms: [
9+
.macOS(.v10_13)
10+
],
11+
products: [
12+
.library(
13+
name: "SwiftSyntaxHighlighter",
14+
targets: ["SwiftSyntaxHighlighter"]),
15+
.executable(name: "swift-highlight",
16+
targets: ["swift-highlight"])
17+
],
18+
dependencies: [
19+
.package(name: "SwiftSyntax",
20+
url: "https://github.com/apple/swift-syntax.git",
21+
.revision("release/5.4")),
22+
.package(name: "swift-argument-parser",
23+
url: "https://github.com/apple/swift-argument-parser.git",
24+
.upToNextMinor(from: "0.3.2"))
25+
],
26+
targets: [
27+
.target(name: "Highlighter",
28+
dependencies: ["SwiftSyntax"]),
29+
.target(name: "Pygments",
30+
dependencies: ["Highlighter"],
31+
path: "Sources/TokenizationSchemes/Pygments"),
32+
.target(name: "Xcode",
33+
dependencies: ["Highlighter"],
34+
path: "Sources/TokenizationSchemes/Xcode"),
35+
.target(
36+
name: "swift-highlight",
37+
dependencies: [
38+
"SwiftSyntaxHighlighter",
39+
.product(name: "ArgumentParser", package: "swift-argument-parser")
40+
]),
41+
.target(
42+
name: "SwiftSyntaxHighlighter",
43+
dependencies: ["SwiftSyntax", "Highlighter", "Xcode", "Pygments"]),
44+
.testTarget(
45+
name: "SwiftSyntaxHighlighterTests",
46+
dependencies: ["SwiftSyntaxHighlighter"]),
47+
]
48+
)

Package@swift-5.5.swift

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// swift-tools-version:5.3
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: "SwiftSyntaxHighlighter",
8+
platforms: [
9+
.macOS(.v10_13)
10+
],
11+
products: [
12+
.library(
13+
name: "SwiftSyntaxHighlighter",
14+
targets: ["SwiftSyntaxHighlighter"]),
15+
.executable(name: "swift-highlight",
16+
targets: ["swift-highlight"])
17+
],
18+
dependencies: [
19+
.package(name: "SwiftSyntax",
20+
url: "https://github.com/apple/swift-syntax.git",
21+
.revision("release/5.5")),
22+
.package(name: "swift-argument-parser",
23+
url: "https://github.com/apple/swift-argument-parser.git",
24+
.upToNextMinor(from: "0.3.2"))
25+
],
26+
targets: [
27+
.target(name: "Highlighter",
28+
dependencies: ["SwiftSyntax"]),
29+
.target(name: "Pygments",
30+
dependencies: ["Highlighter"],
31+
path: "Sources/TokenizationSchemes/Pygments"),
32+
.target(name: "Xcode",
33+
dependencies: ["Highlighter"],
34+
path: "Sources/TokenizationSchemes/Xcode"),
35+
.target(
36+
name: "swift-highlight",
37+
dependencies: [
38+
"SwiftSyntaxHighlighter",
39+
.product(name: "ArgumentParser", package: "swift-argument-parser")
40+
]),
41+
.target(
42+
name: "SwiftSyntaxHighlighter",
43+
dependencies: ["SwiftSyntax", "Highlighter", "Xcode", "Pygments"]),
44+
.testTarget(
45+
name: "SwiftSyntaxHighlighterTests",
46+
dependencies: ["SwiftSyntaxHighlighter"]),
47+
]
48+
)

0 commit comments

Comments
 (0)