Try to fix iOS CI failure #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: iOS CI | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
# Cancel any current or previous job from the same PR | |
concurrency: | |
group: ios-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
# Code checkout | |
- name: Checkout code | |
id: checkout_code | |
uses: actions/checkout@v4 | |
# Copy secrets | |
- name: Copy secrets | |
id: copy_secrets | |
env: | |
API_READ_ACCESS_TOKEN: ${{ secrets.API_READ_ACCESS_TOKEN }} | |
DB_ENCRYPTION_PASS: ${{ secrets.DB_ENCRYPTION_PASS }} | |
run: | | |
touch ./local.properties | |
echo api_read_access_token=\"$API_READ_ACCESS_TOKEN\" >> ./local.properties | |
echo db_encryption_pass=\"$DB_ENCRYPTION_PASS\" >> ./local.properties | |
cat ./local.properties | |
# Setup java | |
- name: Setup JDK 17 | |
id: setup_jdk | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: 17 | |
# Grant execute permission for gradlew | |
- name: Grant execute permission for gradlew | |
id: grant_gradle_permission | |
run: chmod +x gradlew | |
# Caching gradle packages | |
- uses: actions/cache@v3 | |
name: Cache Gradle for quicker builds | |
id: caching_gradle | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
# Build ios app | |
- name: Build iOS app | |
id: generate_debug_build | |
run: xcodebuild -workspace iosApp/iosApp.xcworkspace -configuration Debug -scheme iosApp -sdk iphoneos -destination name='iPhone 8' -allowProvisioningUpdates build |