Skip to content

Commit 2ae35d8

Browse files
authored
Add support for Linux, macCatalyst, and visionOS (#24)
1 parent 7a7f8ad commit 2ae35d8

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
platforms: [
2828
'iOS_17,watchOS_10',
2929
'macOS_14,tvOS_17',
30+
'macCatalyst_14'
3031
]
3132
fail-fast: false
3233
steps:
@@ -55,3 +56,21 @@ jobs:
5556
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
5657
- name: Build and Test Framework
5758
run: xcrun swift test -c release -Xswiftc -enable-testing
59+
linux:
60+
name: "Build and Test on Linux"
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout Repo
64+
uses: actions/checkout@v4
65+
- name: Setup Swift Environment
66+
uses: swift-actions/setup-swift@v1
67+
with:
68+
swift-version: 5.9
69+
- name: Build and Test Framework
70+
run: swift test -c release --enable-code-coverage -Xswiftc -enable-testing
71+
- name: Prepare Coverage Reports
72+
run: |
73+
llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/release/swift-async-queuePackageTests.xctest -instr-profile .build/x86_64-unknown-linux-gnu/release/codecov/default.profdata > coverage.lcov
74+
- name: Upload Coverage Reports
75+
if: success()
76+
uses: codecov/codecov-action@v3

Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ let package = Package(
1010
.iOS(.v13),
1111
.tvOS(.v13),
1212
.watchOS(.v6),
13+
.macCatalyst(.v13),
14+
.visionOS(.v1),
1315
],
1416
products: [
1517
.library(

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# swift-async-queue
22
[![CI Status](https://img.shields.io/github/actions/workflow/status/dfed/swift-async-queue/ci.yml?branch=main)](https://github.com/dfed/swift-async-queue/actions?query=workflow%3ACI+branch%3Amain)
3-
[![Swift Package Manager compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager)
43
[![codecov](https://codecov.io/gh/dfed/swift-async-queue/branch/main/graph/badge.svg?token=nZBHcZZ63F)](https://codecov.io/gh/dfed/swift-async-queue)
5-
[![Version](https://img.shields.io/cocoapods/v/AsyncQueue.svg)](https://cocoapods.org/pods/AsyncQueue)
6-
[![License](https://img.shields.io/cocoapods/l/AsyncQueue.svg)](https://cocoapods.org/pods/AsyncQueue)
7-
[![Platform](https://img.shields.io/cocoapods/p/AsyncQueue.svg)](https://cocoapods.org/pods/AsyncQueue)
4+
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://spdx.org/licenses/MIT.html)
5+
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fdfed%2Fswift-async-queue%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/dfed/swift-async-queue)
6+
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fdfed%2Fswift-async-queue%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/dfed/swift-async-queue)
87

98
A library of queues that enable sending ordered tasks from synchronous to asynchronous contexts.
109

Scripts/build.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
3636
case macOS_12
3737
case macOS_13
3838
case macOS_14
39+
case macCatalyst_13
40+
case macCatalyst_14
3941
case watchOS_6
4042
case watchOS_7
4143
case watchOS_8
@@ -70,7 +72,9 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
7072
.macOS_11,
7173
.macOS_12,
7274
.macOS_13,
73-
.macOS_14:
75+
.macOS_14,
76+
.macCatalyst_13,
77+
.macCatalyst_14:
7478
return "platform=OS X"
7579

7680
case .watchOS_6:
@@ -112,6 +116,10 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
112116
return "macosx13.3"
113117
case .macOS_14:
114118
return "macosx14.0"
119+
case .macCatalyst_13:
120+
return "macosx13.3"
121+
case .macCatalyst_14:
122+
return "macosx14.0"
115123

116124
case .watchOS_6,
117125
.watchOS_7,
@@ -138,7 +146,9 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
138146
.macOS_11,
139147
.macOS_12,
140148
.macOS_13,
141-
.macOS_14:
149+
.macOS_14,
150+
.macCatalyst_13,
151+
.macCatalyst_14:
142152
return true
143153

144154
case .watchOS_6,

0 commit comments

Comments
 (0)