This repository was archived by the owner on Aug 4, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 691
79 lines (71 loc) · 2.08 KB
/
Copy pathci-android.yml
File metadata and controls
79 lines (71 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI - Android Build
on:
push:
branches:
- main
paths:
- '.github/workflows/ci-android.yml'
- '.github/actions/**'
- 'android/**'
- 'nitrogen/**'
- 'src/types/**'
- 'src/*.nitro.ts'
- 'example/android/**'
- 'example/package.json'
- 'nitro.json'
pull_request:
branches:
- main
paths:
- '.github/workflows/ci-android.yml'
- '.github/actions/**'
- 'android/**'
- 'nitrogen/**'
- 'src/types/**'
- 'src/*.nitro.ts'
- 'example/android/**'
- 'example/package.json'
- 'nitro.json'
merge_group:
types:
- checks_requested
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup
uses: ./.github/actions/setup
- name: Generate nitrogen code
run: bun run nitrogen
- name: Install JDK
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'zulu'
java-version: '17'
- name: Finalize Android SDK
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install example dependencies
run: |
cd example
bun install
# Remove circular references to prevent infinite recursion
rm -rf node_modules/react-native-iap/example
rm -rf node_modules/react-native-iap/node_modules
- name: Build example for Android
env:
JAVA_OPTS: '-XX:MaxHeapSize=6g'
run: |
cd example/android
./gradlew build