Skip to content

Commit 6d664a7

Browse files
committed
simplify
1 parent 7e76ecf commit 6d664a7

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

.github/workflows/swift.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,9 @@ jobs:
6767
run: sudo xcode-select -s /Applications/Xcode_26.1.1.app
6868
- name: Checkout source
6969
uses: actions/checkout@v4
70-
- name: Restore simulator runtime cache
71-
uses: actions/cache@v4
72-
with:
73-
path: ${{ runner.temp }}/sim-cache.tgz
74-
key: sim-${{ runner.os }}-${{ hashFiles('**/Package.resolved') }}-${{ matrix.platform }}-${{ matrix.os_version }}
75-
- name: Attempt to Install simulator runtime
76-
run: |
77-
if [ -f "${RUNNER_TEMP}/sim-cache.tgz" ]; then
78-
sudo tar -xzf "${RUNNER_TEMP}/sim-cache.tgz" -C /
79-
fi
8070
- name: Ensure simulator exists
8171
id: ensure-simulator
8272
run: Scripts/ensure-simulator.sh "${{ matrix.platform }}" "${{ matrix.OS_VERSION }}" "${{ matrix.destination }}"
83-
- name: Save simulator runtime cache tarball
84-
if: steps.ensure-simulator.outputs.downloaded == 'true'
85-
run: |
86-
sudo tar -czf "${RUNNER_TEMP}/sim-cache.tgz" \
87-
/Library/Developer/CoreSimulator/Images \
88-
/Library/Developer/CoreSimulator/Cryptex/Images \
89-
/Library/Developer/CoreSimulator/Volumes 2>/dev/null || true
9073
- name: Run tests
9174
run: |
9275
xcodebuild -scheme TOMLDecoder-Package -destination "${{ matrix.destination }}" -sdk "${{ matrix.sdk }}" test

Scripts/ensure-simulator.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ echo "Destination: $DESTINATION"
1717
# Extract device name from DESTINATION between name= and ,OS=
1818
device_part="${DESTINATION#*name=}"
1919
DEVICE_NAME="${device_part%%,OS=*}"
20-
downloaded=false
2120

2221
if [ -z "$DEVICE_NAME" ]; then
2322
echo "::error::Could not parse device name from DESTINATION: $DESTINATION" >&2
@@ -43,7 +42,6 @@ RUNTIME_ID="$(
4342

4443
if [ -z "${RUNTIME_ID:-}" ]; then
4544
echo "Runtime for $PLATFORM $OS_VERSION not found. Attempting to download platform $PLATFORM..."
46-
downloaded=true
4745
xcodebuild -downloadPlatform "$PLATFORM" -buildVersion "$OS_VERSION" || true
4846

4947
RUNTIME_ID="$(
@@ -98,7 +96,3 @@ if ! xcrun simctl list devices "$PLATFORM $OS_VERSION" | grep -Fq "$DEVICE_NAME
9896
else
9997
echo "Device '$DEVICE_NAME' already exists for $PLATFORM $OS_VERSION."
10098
fi
101-
102-
if [ -n "${GITHUB_OUTPUT:-}" ]; then
103-
echo "downloaded=$downloaded" >> "$GITHUB_OUTPUT"
104-
fi

0 commit comments

Comments
 (0)