-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from drmohundro/feat/swift-6-support
feat: Swift 6 support
- Loading branch information
Showing
38 changed files
with
908 additions
and
1,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: SwiftLint | ||
uses: norio-nomura/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,46 +5,139 @@ on: [push, pull_request] | |
jobs: | ||
mac-test: | ||
name: Mac Test | ||
runs-on: macOS-latest | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- platform: macOS | ||
scheme: "SWXMLHash OSX" | ||
action: "build-for-testing test-without-building" | ||
|
||
- platform: iOS | ||
scheme: "SWXMLHash iOS" | ||
action: "build-for-testing test-without-building" | ||
sdk-and-dest: '-sdk iphonesimulator -destination "OS=17.2,name=iPhone 15"' | ||
|
||
- platform: tvOS | ||
scheme: "SWXMLHash tvOS" | ||
sdk-and-dest: '-sdk appletvsimulator -destination "name=Apple TV"' | ||
|
||
- platform: watchOS | ||
scheme: "SWXMLHash watchOS" | ||
action: "build-for-testing test-without-building" | ||
sdk-and-dest: "-sdk watchsimulator" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Build and test | ||
uses: actions/checkout@v4 | ||
|
||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: "16.0" | ||
|
||
- name: Build and Test | ||
env: | ||
WORKSPACE: "-workspace SWXMLHash.xcworkspace" | ||
ACTION: "build-for-testing test-without-building" | ||
run: | | ||
set -o pipefail | ||
xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash OSX" | xcpretty | ||
xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash iOS" -sdk iphonesimulator -destination "OS=17.2,name=iPhone 15" | xcpretty | ||
xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash tvOS" -sdk appletvsimulator -destination "name=Apple TV" | xcpretty | ||
xcodebuild build $WORKSPACE -scheme "SWXMLHash watchOS" -sdk watchsimulator | xcpretty | ||
bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_TOKEN}} | ||
xcodebuild ${{ matrix.action }} $WORKSPACE -scheme ${{ matrix.scheme }} ${{ matrix.sdk-and-dest }} | xcpretty | ||
# TODO: I'd like to use this action instead of the above xcodebuild command, but I'm getting a destination error: | ||
# xcodebuild: error: Unable to find a destination matching the provided destination specifier: | ||
# { id:D918798E-6DEE-48F7-850A-A4C0D9328F0A } | ||
# | ||
# - uses: mxcl/[email protected] | ||
# with: | ||
# platform: ${{ matrix.platform }} | ||
# workspace: "SWXMLHash.xcworkspace" | ||
|
||
linux-test: | ||
name: Linux Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- image: swift:5.8-focal | ||
skip-testing: true | ||
|
||
- image: swift:5.8-jammy | ||
skip-testing: true | ||
|
||
- image: swift:5.8-rhel-ubi9 | ||
skip-testing: true | ||
|
||
- image: swift:5.9-focal | ||
skip-testing: true | ||
|
||
- image: swift:5.9-jammy | ||
skip-testing: true | ||
|
||
- image: swift:5.9-rhel-ubi9 | ||
skip-testing: true | ||
|
||
- image: swift:5.10-focal | ||
skip-testing: true | ||
|
||
- image: swift:5.10-jammy | ||
skip-testing: true | ||
|
||
- image: swift:5.10-rhel-ubi9 | ||
skip-testing: true | ||
|
||
- image: swift:6.0-focal | ||
perform-testing: true | ||
|
||
- image: swift:6.0-jammy | ||
perform-testing: true | ||
|
||
- image: swift:6.0-rhel-ubi9 | ||
perform-testing: true | ||
container: | ||
image: ${{ matrix.image }} | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
if: ${{ matrix.skip-testing }} | ||
run: | | ||
swift build | ||
- name: Build and test | ||
if: ${{ matrix.perform-testing }} | ||
run: | | ||
eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" | ||
swift build --build-tests | ||
swift test | ||
windows-test: | ||
name: Windows Test | ||
runs-on: windows-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- branch: swift-5.10-release | ||
tag: 5.10-RELEASE | ||
skip-testing: true | ||
|
||
- branch: swift-6.0-release | ||
tag: 6.0-RELEASE | ||
perform-testing: true | ||
|
||
steps: | ||
- name: Install Swift | ||
uses: compnerd/gha-setup-swift@main | ||
with: | ||
branch: swift-5.8-release | ||
tag: 5.8-RELEASE | ||
branch: ${{ matrix.branch}} | ||
tag: ${{ matrix.tag }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
if: ${{ matrix.skip-testing }} | ||
run: | | ||
swift build | ||
- name: Build and test | ||
run: swift test | ||
if: ${{ matrix.perform-testing }} | ||
run: | | ||
swift build --build-tests | ||
swift test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM swift:5.1 | ||
FROM swiftlang/swift:nightly-6.0-focal | ||
|
||
ENV APP_HOME ./app | ||
RUN mkdir $APP_HOME | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// swift-tools-version:5.10 | ||
|
||
// | ||
// TypesConversionBasicTests.swift | ||
// [email protected].swift | ||
// SWXMLHash | ||
// | ||
// Copyright (c) 2016 Norio Nomura | ||
|
||
// Copyright (c) 2024 David Mohundro | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -24,19 +25,29 @@ | |
// THE SOFTWARE. | ||
// | ||
|
||
@testable import SWXMLHashTests | ||
import XCTest | ||
import PackageDescription | ||
|
||
XCTMain([ | ||
testCase(LazyTypesConversionTests.allTests), | ||
testCase(LazyWhiteSpaceParsingTests.allTests), | ||
testCase(LazyXMLParsingTests.allTests), | ||
testCase(MixedTextWithXMLElementsTests.allTests), | ||
testCase(XMLHashConfigTests.allTests), | ||
testCase(TypeConversionArrayOfNonPrimitiveTypesTests.allTests), | ||
testCase(TypeConversionBasicTypesTests.allTests), | ||
testCase(TypeConversionComplexTypesTests.allTests), | ||
testCase(TypeConversionPrimitiveTypesTests.allTests), | ||
testCase(WhiteSpaceParsingTests.allTests), | ||
testCase(XMLParsingTests.allTests) | ||
]) | ||
let package = Package( | ||
name: "SWXMLHash", | ||
products: [ | ||
.library( | ||
name: "SWXMLHash", | ||
targets: ["SWXMLHash"] | ||
) | ||
], | ||
targets: [ | ||
.target( | ||
name: "SWXMLHash", | ||
path: "Source", | ||
exclude: ["Info.plist"] | ||
), | ||
.testTarget( | ||
name: "SWXMLHashTests", | ||
dependencies: ["SWXMLHash"], | ||
exclude: ["Info.plist", "test.xml"] | ||
) | ||
], | ||
swiftLanguageVersions: [ | ||
.v5 | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// swift-tools-version:5.1 | ||
// swift-tools-version:5.8 | ||
|
||
// | ||
// SWXMLHash.swift | ||
// [email protected].swift | ||
// SWXMLHash | ||
// | ||
// Copyright (c) 2014 David Mohundro | ||
// Copyright (c) 2024 David Mohundro | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -23,6 +24,7 @@ | |
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
// | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
|
@@ -36,11 +38,13 @@ let package = Package( | |
targets: [ | ||
.target( | ||
name: "SWXMLHash", | ||
path: "Source" | ||
path: "Source", | ||
exclude: ["Info.plist"] | ||
), | ||
.testTarget( | ||
name: "SWXMLHashTests", | ||
dependencies: ["SWXMLHash"] | ||
dependencies: ["SWXMLHash"], | ||
exclude: ["Info.plist", "test.xml"] | ||
) | ||
], | ||
swiftLanguageVersions: [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// swift-tools-version:4.2 | ||
// swift-tools-version:5.9 | ||
|
||
// | ||
// SWXMLHash.swift | ||
// [email protected].swift | ||
// SWXMLHash | ||
// | ||
// Copyright (c) 2014 David Mohundro | ||
// Copyright (c) 2024 David Mohundro | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -38,12 +38,16 @@ let package = Package( | |
targets: [ | ||
.target( | ||
name: "SWXMLHash", | ||
path: "Source" | ||
path: "Source", | ||
exclude: ["Info.plist"] | ||
), | ||
.testTarget( | ||
name: "SWXMLHashTests", | ||
dependencies: ["SWXMLHash"] | ||
dependencies: ["SWXMLHash"], | ||
exclude: ["Info.plist", "test.xml"] | ||
) | ||
], | ||
swiftLanguageVersions: [.v3, .v4, .v4_2] | ||
swiftLanguageVersions: [ | ||
.v5 | ||
] | ||
) |
Oops, something went wrong.