Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- release
name: Linux
runs-on: ubuntu-latest
container: swift:5.10
container: swift:6.0.3
steps:
- uses: actions/checkout@v4
- name: Install dependencies
Expand All @@ -110,7 +110,7 @@ jobs:
echo "$PREFIX/usr/bin" >> $GITHUB_PATH

- name: Build
run: swift build --swift-sdk wasm32-unknown-wasi --build-tests -Xlinker -z -Xlinker stack-size=$((1024 * 1024))
run: swift build --target IssueReporting --swift-sdk wasm32-unknown-wasi -Xlinker -z -Xlinker stack-size=$((1024 * 1024))

windows:
name: Windows
Expand Down Expand Up @@ -141,4 +141,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: "Test Swift Package on Android"
uses: skiptools/swift-android-action@v2
uses: skiptools/swift-android-action@v2
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ format:
--in-place \
--recursive \
.

test-linux:
docker run \
--rm \
-v "$(PWD):$(PWD)" \
-w "$(PWD)" \
swift:5.10 \
swift:6.0.3-focal \
bash -c 'swift test -c $(CONFIG)'
6 changes: 5 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ let package = Package(
],
products: [
.library(name: "IssueReporting", targets: ["IssueReporting"]),
.library(name: "IssueReportingTestSupport", targets: ["IssueReportingTestSupport"]),
.library(
name: "IssueReportingTestSupport",
type: .dynamic,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to force this to be dynamic for Linux/Windows to be able to dynamically load its symbols.

targets: ["IssueReportingTestSupport"]
),
.library(name: "XCTestDynamicOverlay", targets: ["XCTestDynamicOverlay"]),
],
targets: [
Expand Down
12 changes: 5 additions & 7 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ let package = Package(
],
products: [
.library(name: "IssueReporting", targets: ["IssueReporting"]),
.library(name: "IssueReportingTestSupport", targets: ["IssueReportingTestSupport"]),
.library(
name: "IssueReportingTestSupport",
type: .dynamic,
targets: ["IssueReportingTestSupport"]
),
.library(name: "XCTestDynamicOverlay", targets: ["XCTestDynamicOverlay"]),
],
targets: [
Expand Down Expand Up @@ -44,12 +48,6 @@ let package = Package(
swiftLanguageModes: [.v6]
)

#if os(Linux) || os(Windows)
package.dependencies.append(
.package(url: "https://github.com/apple/swift-testing", from: "0.11.0")
)
Comment on lines -48 to -50
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an artifact of early days Testing and was causing problems.

#endif

#if os(macOS)
package.dependencies.append(contentsOf: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
Expand Down
10 changes: 5 additions & 5 deletions Sources/IssueReporting/Internal/SwiftTesting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func _recordIssue(
) {
guard let function = function(for: "$s25IssueReportingTestSupport07_recordA0ypyF")
else {
#if DEBUG
#if DEBUG && canImport(Darwin)
guard
let record = unsafeBitCast(
symbol: "$s7Testing5IssueV6record_14sourceLocationAcA7CommentVSg_AA06SourceE0VtFZ",
Expand Down Expand Up @@ -60,7 +60,7 @@ func _recordError(
) {
guard let function = function(for: "$s25IssueReportingTestSupport12_recordErrorypyF")
else {
#if DEBUG
#if DEBUG && canImport(Darwin)
guard
let record = unsafeBitCast(
symbol: """
Expand Down Expand Up @@ -110,7 +110,7 @@ func _withKnownIssue(
) {
guard let function = function(for: "$s25IssueReportingTestSupport010_withKnownA0ypyF")
else {
#if DEBUG
#if DEBUG && canImport(Darwin)
guard
let withKnownIssue = unsafeBitCast(
symbol: """
Expand Down Expand Up @@ -182,7 +182,7 @@ func _withKnownIssue(
guard
let function = function(for: "$s25IssueReportingTestSupport010_withKnownA13AsyncIsolatedypyF")
else {
#if DEBUG
#if DEBUG && canImport(Darwin)
guard
let withKnownIssue = unsafeBitCast(
symbol: """
Expand Down Expand Up @@ -254,7 +254,7 @@ func _withKnownIssue(
) async {
guard let function = function(for: "$s25IssueReportingTestSupport010_withKnownA5AsyncypyF")
else {
#if DEBUG
#if DEBUG && canImport(Darwin)
guard
let withKnownIssue = unsafeBitCast(
symbol: """
Expand Down