Skip to content

Commit

Permalink
try building android on github runner
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Apr 23, 2024
1 parent daa3621 commit 19bc861
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,8 @@ jobs:
- name: Typecheck files
run: yarn typecheck

# test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3

# - name: Setup
# uses: ./.github/actions/setup

# - name: Run unit tests
# run: yarn test --maxWorkers=2 --coverage --passWithNoTests

# build-library:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3

# - name: Setup
# uses: ./.github/actions/setup

# - name: Build package
# run: yarn prepare

build-android:
runs-on: self-hosted
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
steps:
Expand All @@ -65,6 +41,29 @@ jobs:
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi
- name: Install JDK
if: env.turbo_cache_hit != 1
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Finalize Android SDK
if: env.turbo_cache_hit != 1
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
if: env.turbo_cache_hit != 1
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Gradle
if: env.turbo_cache_hit != 1
uses: actions/cache@v3
Expand Down

0 comments on commit 19bc861

Please sign in to comment.