Skip to content

Commit 7d16a20

Browse files
author
Abel Garcia Dorta
committed
ci: fix cicd
1 parent 2ba0ec5 commit 7d16a20

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

.github/workflows/ios.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,10 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17-
- name: Set Default Scheme
18-
run: |
19-
scheme_list=$(xcodebuild -list -json | tr -d "\n")
20-
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
21-
echo $default | cat >default
22-
echo Using default scheme: $default
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 16
20+
- name: Install dependencies
21+
run: yarn install --frozen-lockfile
2322
- name: Build
24-
env:
25-
scheme: ${{ 'default' }}
26-
platform: ${{ 'iOS Simulator' }}
27-
run: |
28-
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
29-
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
30-
if [ $scheme = default ]; then scheme=$(cat default); fi
31-
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
32-
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
33-
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device"
34-
- name: Test
35-
env:
36-
scheme: ${{ 'default' }}
37-
platform: ${{ 'iOS Simulator' }}
38-
run: |
39-
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
40-
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
41-
if [ $scheme = default ]; then scheme=$(cat default); fi
42-
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
43-
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
44-
xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device"
23+
run: yarn run ios

0 commit comments

Comments
 (0)