Skip to content

Commit ed481e0

Browse files
committed
WIP
1 parent b1182e5 commit ed481e0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
set -eo pipefail
147147
# xcrun simctl delete all
148148
OUTPUT=$(script/create_simulators --platform ${{ env.SCRIPT_PLATFORM }} --version ${{ env.MAJOR }} | tee /dev/stderr)
149-
FIRST_UDID=$(printf "%s\n" "$OUTPUT" | awk '/^Created: /{print $NF}' | head -n1)
149+
FIRST_UDID=$(printf "%s\n" "$OUTPUT" | awk '/^(Created:|Already exists:)/{print $NF}' | head -n1)
150150
if [ -n "$FIRST_UDID" ]; then
151151
echo "SIM_UDID=$FIRST_UDID" >> "$GITHUB_ENV"
152152
echo "Captured SIM_UDID=$FIRST_UDID"

script/create_simulators

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ end
7979

8080
# Build a set of existing simulator name+runtime pairs to prevent duplicates across OS versions
8181
existing_pairs = Set.new
82+
existing_index = {}
8283
begin
8384
devices_json = run("xcrun simctl list -j devices")
8485
if !devices_json.empty?
@@ -88,6 +89,7 @@ begin
8889
name = d["name"]
8990
next unless name && runtime_key
9091
existing_pairs.add("#{name}||#{runtime_key}")
92+
existing_index["#{name}||#{runtime_key}"] = d["udid"] if d["udid"]
9193
end
9294
end
9395
end
@@ -169,7 +171,7 @@ local_devices.each do |platform, versions|
169171

170172
pair_key = "#{sim_name}||#{runtime_id}"
171173
if existing_pairs.include?(pair_key)
172-
puts "Already exists: #{sim_name} (#{runtime_version}), skipping"
174+
puts "Already exists: #{sim_name} (#{runtime_version}) -> #{existing_index[pair_key]}"
173175
skipped += 1
174176
next
175177
end

0 commit comments

Comments
 (0)