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
40 changes: 20 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ jobs:

if [ "$PLATFORM" = "iPadOS" ]; then
PLATFORM=iOS
FASTLANE_PLATFORM=ipados
SCRIPT_PLATFORM=ipados
else
case "$PLATFORM" in
iOS) FASTLANE_PLATFORM=ios ;;
tvOS) FASTLANE_PLATFORM=tvos ;;
watchOS) FASTLANE_PLATFORM=watchos ;;
visionOS) FASTLANE_PLATFORM=visionos ;;
macOS) FASTLANE_PLATFORM=macos ;;
iOS) SCRIPT_PLATFORM=ios ;;
tvOS) SCRIPT_PLATFORM=tvos ;;
watchOS) SCRIPT_PLATFORM=watchos ;;
visionOS) SCRIPT_PLATFORM=visionos ;;
macOS) SCRIPT_PLATFORM=macos ;;
esac
fi

Expand All @@ -110,7 +110,7 @@ jobs:
echo "MAJOR=$MAJOR" >> $GITHUB_ENV
echo "MINOR=$MINOR" >> $GITHUB_ENV
echo "RUNTIME=$RUNTIME" >> $GITHUB_ENV
echo "FASTLANE_PLATFORM=$FASTLANE_PLATFORM" >> $GITHUB_ENV
echo "SCRIPT_PLATFORM=$SCRIPT_PLATFORM" >> $GITHUB_ENV

- if: ${{ env.PLATFORM != 'macOS' }}
name: Check for ${{ env.RUNTIME }} runtime
Expand All @@ -128,20 +128,12 @@ jobs:
action: none
verbosity: xcbeautify

- if: ${{ env.PLATFORM != 'macOS' }}
name: Download Required Runtime
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
command: xcodebuild -downloadPlatform ${{ env.PLATFORM }}

- if: env.has_runtime == 'false'
name: List Downloadable Runtimes
run: xcodes runtimes --include-betas

- if: env.has_runtime == 'false'
name: Install Required Runtime (${{ env.RUNTIME }})
name: Download Required Runtime (${{ env.RUNTIME }})
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
Expand All @@ -153,7 +145,12 @@ jobs:
run: |
set -eo pipefail
xcrun simctl delete all
fastlane create_simulators platform:${{ env.FASTLANE_PLATFORM }} version:${{ env.MAJOR }}
OUTPUT=$(script/create_simulators --platform ${{ env.SCRIPT_PLATFORM }} --version ${{ env.MAJOR }} | tee /dev/stderr)
FIRST_UDID=$(printf "%s\n" "$OUTPUT" | awk '/^(Created:|Already exists:)/{print $NF}' | head -n1)
if [ -n "$FIRST_UDID" ]; then
echo "SIM_UDID=$FIRST_UDID" >> "$GITHUB_ENV"
echo "Captured SIM_UDID=$FIRST_UDID"
fi

- name: List Available Runtimes, Simulators, and Destinations
run: |
Expand All @@ -162,35 +159,38 @@ jobs:

- if: ${{ env.PLATFORM != 'watchOS' }}
name: Build Showcase
uses: mxcl/xcodebuild@v3
uses: davdroman/xcodebuild@destination
with:
xcode: ~26.0
platform: ${{ env.PLATFORM }}
platform-version: ~${{ env.MAJOR }}.${{ env.MINOR }}
destination: ${{ env.SIM_UDID }}
action: build
scheme: Showcase
configuration: Debug
verbosity: xcbeautify

- if: ${{ env.PLATFORM == 'watchOS' }}
name: Build Library
uses: mxcl/xcodebuild@v3
uses: davdroman/xcodebuild@destination
with:
xcode: ~26.0
platform: ${{ env.PLATFORM }}
platform-version: ~${{ env.MAJOR }}.${{ env.MINOR }}
destination: ${{ env.SIM_UDID }}
action: build
scheme: SwiftUIIntrospect
configuration: Debug
verbosity: xcbeautify

- if: ${{ env.PLATFORM != 'watchOS' }}
name: Run Tests
uses: mxcl/xcodebuild@v3
uses: davdroman/xcodebuild@destination
with:
xcode: ~26.0
platform: ${{ env.PLATFORM }}
platform-version: ~${{ env.MAJOR }}.${{ env.MINOR }}
destination: ${{ env.SIM_UDID }}
action: test
scheme: SwiftUIIntrospectTests
configuration: Debug
Expand Down
16 changes: 8 additions & 8 deletions Tests/Tests/WeakTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,49 @@ struct WeakTests {

var strongFoo: Foo? = Foo()

@Test func Init_nil() {
@Test func init_nil() {
@Weak var weakFoo: Foo?
#expect(weakFoo == nil)
}

@Test func Init_nonNil() {
@Test func init_nonNil() {
@Weak var weakFoo: Foo? = strongFoo
#expect(weakFoo === strongFoo)
}

@Test func Assignment_nilToNil() {
@Test func assignment_nilToNil() {
@Weak var weakFoo: Foo?
weakFoo = nil
#expect(weakFoo == nil)
}

@Test func Assignment_nilToNonNil() {
@Test func assignment_nilToNonNil() {
@Weak var weakFoo: Foo?
let otherFoo = Foo()
weakFoo = otherFoo
#expect(weakFoo === otherFoo)
}

@Test func Assignment_nonNilToNil() {
@Test func assignment_nonNilToNil() {
@Weak var weakFoo: Foo? = strongFoo
weakFoo = nil
#expect(weakFoo == nil)
}

@Test func Assignment_nonNilToNonNil() {
@Test func assignment_nonNilToNonNil() {
@Weak var weakFoo: Foo? = strongFoo
let otherFoo = Foo()
weakFoo = otherFoo
#expect(weakFoo === otherFoo)
}

@Test mutating func IndirectAssignment_nonNilToNil() {
@Test mutating func indirectAssignment_nonNilToNil() {
@Weak var weakFoo: Foo? = strongFoo
strongFoo = nil
#expect(weakFoo == nil)
}

@Test mutating func IndirectAssignment_nonNilToNonNil() {
@Test mutating func indirectAssignment_nonNilToNonNil() {
@Weak var weakFoo: Foo? = strongFoo
strongFoo = Foo()
#expect(weakFoo == nil)
Expand Down
149 changes: 0 additions & 149 deletions fastlane/Fastfile

This file was deleted.

Loading