From be8c838445022af05fbcc8ce45793b5cd0eda75c Mon Sep 17 00:00:00 2001 From: YOCKOW Date: Sun, 9 May 2021 17:46:10 +0900 Subject: [PATCH 1/2] Confirm compatibility with Swift 5.4. --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53e9b44..fcf97fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,13 +37,14 @@ jobs: build-${{ github.workspace }}- - uses: YOCKOW/Action-setup-swift@master with: - swift-version: '5.3' - + swift-version: '5.4' + # DEBUG mode - name: Try to build products with debug mode. + id: debug_build run: swift build --configuration debug -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }} continue-on-error: true - name: Clean debug build directory if necessary - if: failure() + if: steps.debug_build.outcome == 'failure' run: rm -rf $(cd .build/debug && pwd -P) - name: Check XCTestManifests.swift if: runner.os == 'macOS' @@ -52,12 +53,13 @@ jobs: git diff --exit-code - name: Test with debug mode. run: swift test --configuration debug -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }} - + # RELEASE mode - name: Try to build products with release mode. + id: release_build run: swift build --configuration release -Xswiftc -enable-testing -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }} continue-on-error: true - name: Clean release build directory if necessary - if: failure() + if: steps.release_build.outcome == 'failure' run: rm -rf $(cd .build/release && pwd -P) - name: Test with release mode. run: swift test --configuration release -Xswiftc -enable-testing -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }} From b9c3ac50280cc4ec670057a12967bc661952b4bf Mon Sep 17 00:00:00 2001 From: YOCKOW Date: Sun, 9 May 2021 18:19:16 +0900 Subject: [PATCH 2/2] Remove LinuxMain.swift and XCTestManifests.swift Tests are automatically discovered on all platforms in Swift 5.4. --- .github/workflows/ci.yml | 5 ---- Tests/LinuxMain.swift | 8 ------ .../XCTestManifests.swift | 25 ------------------- 3 files changed, 38 deletions(-) delete mode 100644 Tests/LinuxMain.swift delete mode 100644 Tests/TimeSpecificationTests/XCTestManifests.swift diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcf97fd..ea98a46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,11 +46,6 @@ jobs: - name: Clean debug build directory if necessary if: steps.debug_build.outcome == 'failure' run: rm -rf $(cd .build/debug && pwd -P) - - name: Check XCTestManifests.swift - if: runner.os == 'macOS' - run: | - swift test --generate-linuxmain -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }} - git diff --exit-code - name: Test with debug mode. run: swift test --configuration debug -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }} # RELEASE mode diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index 6590ab4..0000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,8 +0,0 @@ -import XCTest - -import TimeSpecificationTests - -var tests = [XCTestCaseEntry]() -tests += TimeSpecificationTests.__allTests() - -XCTMain(tests) diff --git a/Tests/TimeSpecificationTests/XCTestManifests.swift b/Tests/TimeSpecificationTests/XCTestManifests.swift deleted file mode 100644 index a9c8687..0000000 --- a/Tests/TimeSpecificationTests/XCTestManifests.swift +++ /dev/null @@ -1,25 +0,0 @@ -#if !canImport(ObjectiveC) -import XCTest - -extension TimeSpecificationTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__TimeSpecificationTests = [ - ("test_codable", test_codable), - ("test_comparison", test_comparison), - ("test_date", test_date), - ("test_description", test_description), - ("test_floatLiteral", test_floatLiteral), - ("test_integerLiteral", test_integerLiteral), - ("test_normalization", test_normalization), - ("test_sumAndDifference", test_sumAndDifference), - ] -} - -public func __allTests() -> [XCTestCaseEntry] { - return [ - testCase(TimeSpecificationTests.__allTests__TimeSpecificationTests), - ] -} -#endif