Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI to use latest Xcode, test in release #68

Merged
merged 7 commits into from
Nov 7, 2022
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
21 changes: 11 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
xcode:
- '13.3.1'
- '13.4.1'
- '14.0'
- '14.0.1'
- '14.1'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Print Swift version
Expand All @@ -38,9 +39,9 @@ jobs:
swift:
- 5.5
- 5.6
#- 5.7
- 5.7
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run tests
run: make test-linux SWIFT_VERSION=${{ matrix.swift }}

Expand All @@ -50,12 +51,12 @@ jobs:
strategy:
matrix:
include:
- { toolchain: wasm-5.6.0-RELEASE }
- { toolchain: wasm-5.7.1-RELEASE }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: echo "${{ matrix.toolchain }}" > .swift-version
- uses: swiftwasm/swiftwasm-action@v5.6
- uses: swiftwasm/swiftwasm-action@v5.7
with:
shell-action: carton test --environment node

Expand All @@ -65,8 +66,8 @@ jobs:
# steps:
# - uses: compnerd/gha-setup-swift@main
# with:
# branch: swift-5.5-release
# tag: 5.5-RELEASE
# branch: swift-5.7-release
# tag: 5.7.1-RELEASE
#
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
# - run: swift test && swift build --configuration release
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ test-linux:
-v "$(PWD):$(PWD)" \
-w "$(PWD)" \
swift:$(SWIFT_VERSION) \
bash -c 'make test-swift SWIFT_VERSION=$(SWIFT_VERSION)'
bash -c 'apt-get update && apt-get -y install make && make test-swift SWIFT_VERSION=$(SWIFT_VERSION)'

test-swift:
swift test $(SWIFT_BUILD_ARGS) $(SWIFT_TEST_ARGS)
swift build --configuration release $(SWIFT_BUILD_ARGS)
swift test --configuration release $(SWIFT_BUILD_ARGS) $(SWIFT_TEST_ARGS)

test-platforms:
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-destination platform="$(PLATFORM_IOS)"
xcodebuild \
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-configuration Release \
Expand All @@ -47,7 +47,7 @@ test-platforms:
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-destination platform="$(PLATFORM_MAC_CATALYST)"
xcodebuild \
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-configuration Release \
Expand All @@ -57,7 +57,7 @@ test-platforms:
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-destination platform="$(PLATFORM_TVOS)"
xcodebuild \
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-configuration Release \
Expand Down
2 changes: 1 addition & 1 deletion Sources/CustomDump/Conformances/KeyPath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
instantiateKeyPathBuffer(root, leaf, $0)
}

let heapObj = UnsafeRawPointer(Unmanaged.passUnretained(instance).toOpaque())
let heapObj = UnsafeRawPointer(Unmanaged.passRetained(instance).autorelease().toOpaque())
let keyPath = unsafeBitCast(heapObj, to: AnyKeyPath.self)
return keyPath
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/CustomDumpTests/XCTAssertNoDifferenceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import XCTest

@available(iOS 13, macOS 10.15, tvOS 13, watchOS 6, *)
class XCTAssertNoDifferenceTests: XCTestCase {
#if compiler(>=5.4) && (os(iOS) || os(macOS) || os(tvOS) || os(watchOS))
#if DEBUG && compiler(>=5.4) && (os(iOS) || os(macOS) || os(tvOS) || os(watchOS))
func testXCTAssertNoDifference() {
XCTExpectFailure()

Expand Down