Skip to content

Enables downloading tracks behind a feature flag (#341) #16

Enables downloading tracks behind a feature flag (#341)

Enables downloading tracks behind a feature flag (#341) #16

Workflow file for this run

name: iOS starter workflow
on:
push:
branches: [ "development" ]
pull_request:
branches: [ "development" ]
jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Default Scheme
run: |

Check failure on line 18 in .github/workflows/ios.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ios.yml

Invalid workflow file

You have an error in your yaml syntax on line 18
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
device=$(xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//")
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ -d "*.xcworkspace" ]; then
filetype_parameter="workspace"
file_to_build=$(find . -name "*.xcworkspace" | head -n 1)
elif [ -d "*.xcodeproj" ]; then
filetype_parameter="project"
file_to_build=$(find . -name "*.xcodeproj" | head -n 1)
else
echo "No Xcode project or workspace found."
exit 1
fi
xcodebuild build-for-testing -scheme "$scheme" -$filetype_parameter "$file_to_build" -destination "platform=$platform,name=$device"
- name: Test
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
device=$(xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//")
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ -d "*.xcworkspace" ]; then
filetype_parameter="workspace"
file_to_build=$(find . -name "*.xcworkspace" | head -n 1)
elif [ -d "*.xcodeproj" ]; then
filetype_parameter="project"
file_to_build=$(find . -name "*.xcodeproj" | head -n 1)
else
echo "No Xcode project or workspace found."
exit 1
fi
xcodebuild test-without-building -scheme "$scheme" -$filetype_parameter "$file_to_build" -destination "platform=$platform,name=$device"