Skip to content

Commit

Permalink
Add Windows CI (#71)
Browse files Browse the repository at this point in the history
* Skip tests with XCTExpectedFailure and comment

* Add Windows CI Job
  • Loading branch information
brianmichel authored Sep 11, 2023
1 parent 23cbf22 commit 6f357ee
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,27 @@ jobs:
- uses: swiftwasm/[email protected]
with:
shell-action: swift build

windows:
name: Windows
strategy:
matrix:
os: [windows-latest]
config: ['debug', 'release']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: compnerd/gha-setup-swift@main
with:
branch: swift-5.8.1-release
tag: 5.8.1-RELEASE
- uses: actions/checkout@v3
- name: Build
run: swift build -c ${{ matrix.config }}
- name: Run tests (debug only)
# There is an issue that exists in the 5.8.1 toolchain
# which fails on release configuration testing, but
# this issue is fixed 5.9 so we can remove the if once
# that is generally available.
if: ${{ matrix.config == 'debug' }}
run: swift test
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let package = Package(
]
)

#if swift(>=5.6)
#if swift(>=5.6) && !os(Windows)
// Add the documentation compiler plugin if possible
package.dependencies.append(
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#if !os(Linux)
// TODO: https://github.com/apple/swift-corelibs-xctest/issues/438
#if !os(Linux) && !os(Windows)
import Foundation
import XCTest
import XCTestDynamicOverlay
Expand Down
3 changes: 2 additions & 1 deletion Tests/XCTestDynamicOverlayTests/UnimplementedTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#if !os(Linux)
// TODO: https://github.com/apple/swift-corelibs-xctest/issues/438
#if !os(Linux) && !os(Windows)
import XCTest

final class UnimplementedTests: XCTestCase {
Expand Down
3 changes: 2 additions & 1 deletion Tests/XCTestDynamicOverlayTests/XCTContextTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#if !os(Linux)
// TODO: https://github.com/apple/swift-corelibs-xctest/issues/438
#if !os(Linux) && !os(Windows)
import XCTest
import XCTestDynamicOverlay

Expand Down

0 comments on commit 6f357ee

Please sign in to comment.