Skip to content

Commit

Permalink
cmt 3
Browse files Browse the repository at this point in the history
  • Loading branch information
danh-ld committed Sep 21, 2023
1 parent 4e8c7a0 commit f267954
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ jobs:
XCODE_PATH=$(ls /Applications | grep Xcode | sort -V | tail -n 1)
echo "Selected Xcode version: $XCODE_PATH"
sudo xcode-select -switch /Applications/$XCODE_PATH/Contents/Developer
# - name: List devices
# run: xcrun simctl list devices | grep -v "Unavailable" | grep -v "unavailable"

- name: List devices and set env variable
run: echo 'DEVICES='$(xcrun simctl list devices | grep -v "Unavailable" | grep -v "unavailable" | sed -E "s/ \(([A-Z0-9\-]+)\) / -- (\1) /g")'' >> $GITHUB_ENV
- name: List devices
run: xcrun simctl list devices | grep -v "Unavailable" | grep -v "unavailable"

- name: "Install flutter"
uses: subosito/flutter-action@v2
with:
Expand Down Expand Up @@ -65,9 +63,8 @@ jobs:
run: cd ios && pod install

- name: "Start Simulator"
# UUID=$(xcrun simctl list devices | grep -v "Unavailable" | grep -v "unavailable" | sed -E 's/ \(([A-Z0-9\-]+)\) / -- (\1) /g' | grep "${{ matrix.devices }} -- " | awk -F '[()]' '{print $(NF-3)}')
run: |
UUID=$($DEVICE_LIST | grep "${{ matrix.devices }} -- " | awk -F '[()]' '{print $(NF-3)}')
UUID=$(xcrun simctl list devices | grep -v "Unavailable" | grep -v "unavailable" | sed -E 's/ \(([A-Z0-9\-]+)\) / -- (\1) /g' | grep "${{ matrix.devices }} -- " | awk -F '[()]' '{print $(NF-3)}')
echo $UUID
echo "UUID=$UUID" >> $GITHUB_ENV
xcrun simctl boot $UUID
Expand Down

0 comments on commit f267954

Please sign in to comment.