Compare commits
22
Commits
dev
..
b8e88bca6d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8e88bca6d | ||
|
|
93738a07ac | ||
|
|
c5f129bb42 | ||
|
|
95c69d35e2 | ||
|
|
beb6cc5715 | ||
|
|
c787b87cc5 | ||
|
|
064650a585 | ||
|
|
f6abf628e3 | ||
|
|
aa57d07dc0 | ||
|
|
ee6af8fb26 | ||
|
|
5043d9cdff | ||
|
|
157fc8d95b | ||
|
|
8e805316fb | ||
|
|
7e06415db4 | ||
|
|
2be4d5aa4e | ||
|
|
0093c4aec2 | ||
|
|
9ade0fa0ca | ||
|
|
39fd491d24 | ||
|
|
c4cc2712ee | ||
|
|
49ef8ae82f | ||
|
|
0b87f3e4ed | ||
|
|
9a9aff0880 |
@@ -17,15 +17,13 @@ env:
|
|||||||
JAVA_VERSION: '17'
|
JAVA_VERSION: '17'
|
||||||
ANDROID_HOME: ${{ runner.tool_cache }}/android-sdk
|
ANDROID_HOME: ${{ runner.tool_cache }}/android-sdk
|
||||||
ANDROID_SDK_ROOT: ${{ runner.tool_cache }}/android-sdk
|
ANDROID_SDK_ROOT: ${{ runner.tool_cache }}/android-sdk
|
||||||
GRADLE_OPTS: "-Dorg.gradle.workers.max=2 -Dorg.gradle.jvmargs=-Xmx1536m -XX:MaxMetaspaceSize=1024m"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
build-android:
|
||||||
name: Setup & Install
|
name: Build Android
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 45
|
||||||
outputs:
|
|
||||||
gradle-cache-key: ${{ steps.gradle-cache.outputs.cache-primary-key }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -79,66 +77,27 @@ jobs:
|
|||||||
|
|
||||||
- name: Prebuild Android
|
- name: Prebuild Android
|
||||||
working-directory: carry-your-live
|
working-directory: carry-your-live
|
||||||
run: |
|
run: npx expo prebuild --platform android --clean
|
||||||
for i in {1..2}; do
|
|
||||||
npx expo prebuild --platform android --clean && break || sleep 15
|
|
||||||
done
|
|
||||||
|
|
||||||
build-debug:
|
- name: Build Android Debug APK
|
||||||
name: Build Debug APK
|
|
||||||
needs: setup
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: 'npm'
|
|
||||||
cache-dependency-path: carry-your-live/package-lock.json
|
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
cache: 'gradle'
|
|
||||||
cache-dependency-path: carry-your-live/android/gradle/wrapper/gradle-wrapper.properties
|
|
||||||
|
|
||||||
- name: Install Android SDK
|
|
||||||
run: |
|
|
||||||
if [ -x "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" ]; then
|
|
||||||
echo "Android SDK already present in cache"
|
|
||||||
else
|
|
||||||
rm -rf "$ANDROID_HOME/cmdline-tools"
|
|
||||||
mkdir -p "$ANDROID_HOME/cmdline-tools"
|
|
||||||
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/cmdtools.zip
|
|
||||||
unzip -q /tmp/cmdtools.zip -d "$ANDROID_HOME/cmdline-tools"
|
|
||||||
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest"
|
|
||||||
fi
|
|
||||||
mkdir -p "$ANDROID_HOME/licenses"
|
|
||||||
echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" >> "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
|
||||||
"platform-tools" \
|
|
||||||
"platforms;android-36" \
|
|
||||||
"build-tools;36.0.0" \
|
|
||||||
"ndk;27.1.12297006"
|
|
||||||
mkdir -p carry-your-live/android/app
|
|
||||||
echo "sdk.dir=$ANDROID_HOME" > carry-your-live/android/app/local.properties
|
|
||||||
|
|
||||||
- name: Build Debug APK
|
|
||||||
working-directory: carry-your-live/android
|
working-directory: carry-your-live/android
|
||||||
run: |
|
run: ./gradlew assembleDebug --no-daemon
|
||||||
for i in {1..3}; do
|
|
||||||
./gradlew assembleDebug --no-daemon -Dorg.gradle.workers.max=2 && break || sleep 30
|
- name: Build Android Release APK
|
||||||
done
|
working-directory: carry-your-live/android
|
||||||
|
run: ./gradlew assembleRelease --no-daemon
|
||||||
|
|
||||||
|
- name: Build Android Bundle (AAB)
|
||||||
|
working-directory: carry-your-live/android
|
||||||
|
run: ./gradlew bundleRelease --no-daemon
|
||||||
|
|
||||||
|
- name: Run Unit Tests
|
||||||
|
working-directory: carry-your-live/android
|
||||||
|
run: ./gradlew test --no-daemon
|
||||||
|
|
||||||
|
- name: Run Lint
|
||||||
|
working-directory: carry-your-live/android
|
||||||
|
run: ./gradlew lint --no-daemon
|
||||||
|
|
||||||
- name: Find Debug APK
|
- name: Find Debug APK
|
||||||
id: find-debug-apk
|
id: find-debug-apk
|
||||||
@@ -147,76 +106,6 @@ jobs:
|
|||||||
echo "apk_path=$APK_PATH" >> "$GITHUB_OUTPUT"
|
echo "apk_path=$APK_PATH" >> "$GITHUB_OUTPUT"
|
||||||
echo "Found Debug APK at: $APK_PATH"
|
echo "Found Debug APK at: $APK_PATH"
|
||||||
|
|
||||||
- name: Upload Debug APK
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: android-debug-apk
|
|
||||||
path: ${{ steps.find-debug-apk.outputs.apk_path }}
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
build-release:
|
|
||||||
name: Build Release APK & AAB
|
|
||||||
needs: setup
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 35
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: 'npm'
|
|
||||||
cache-dependency-path: carry-your-live/package-lock.json
|
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
cache: 'gradle'
|
|
||||||
cache-dependency-path: carry-your-live/android/gradle/wrapper/gradle-wrapper.properties
|
|
||||||
|
|
||||||
- name: Install Android SDK
|
|
||||||
run: |
|
|
||||||
if [ -x "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" ]; then
|
|
||||||
echo "Android SDK already present in cache"
|
|
||||||
else
|
|
||||||
rm -rf "$ANDROID_HOME/cmdline-tools"
|
|
||||||
mkdir -p "$ANDROID_HOME/cmdline-tools"
|
|
||||||
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/cmdtools.zip
|
|
||||||
unzip -q /tmp/cmdtools.zip -d "$ANDROID_HOME/cmdline-tools"
|
|
||||||
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest"
|
|
||||||
fi
|
|
||||||
mkdir -p "$ANDROID_HOME/licenses"
|
|
||||||
echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" >> "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
|
||||||
"platform-tools" \
|
|
||||||
"platforms;android-36" \
|
|
||||||
"build-tools;36.0.0" \
|
|
||||||
"ndk;27.1.12297006"
|
|
||||||
mkdir -p carry-your-live/android/app
|
|
||||||
echo "sdk.dir=$ANDROID_HOME" > carry-your-live/android/app/local.properties
|
|
||||||
|
|
||||||
- name: Build Release APK
|
|
||||||
working-directory: carry-your-live/android
|
|
||||||
run: |
|
|
||||||
for i in {1..3}; do
|
|
||||||
./gradlew assembleRelease --no-daemon -Dorg.gradle.workers.max=2 && break || sleep 30
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Build Release Bundle (AAB)
|
|
||||||
working-directory: carry-your-live/android
|
|
||||||
run: |
|
|
||||||
for i in {1..3}; do
|
|
||||||
./gradlew bundleRelease --no-daemon -Dorg.gradle.workers.max=2 && break || sleep 30
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Find Release APK
|
- name: Find Release APK
|
||||||
id: find-release-apk
|
id: find-release-apk
|
||||||
run: |
|
run: |
|
||||||
@@ -231,6 +120,13 @@ jobs:
|
|||||||
echo "aab_path=$AAB_PATH" >> "$GITHUB_OUTPUT"
|
echo "aab_path=$AAB_PATH" >> "$GITHUB_OUTPUT"
|
||||||
echo "Found Release AAB at: $AAB_PATH"
|
echo "Found Release AAB at: $AAB_PATH"
|
||||||
|
|
||||||
|
- name: Upload Debug APK
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: android-debug-apk
|
||||||
|
path: ${{ steps.find-debug-apk.outputs.apk_path }}
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
- name: Upload Release APK
|
- name: Upload Release APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -245,71 +141,6 @@ jobs:
|
|||||||
path: ${{ steps.find-release-aab.outputs.aab_path }}
|
path: ${{ steps.find-release-aab.outputs.aab_path }}
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
test-lint:
|
|
||||||
name: Test & Lint
|
|
||||||
needs: setup
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 25
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: 'npm'
|
|
||||||
cache-dependency-path: carry-your-live/package-lock.json
|
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
cache: 'gradle'
|
|
||||||
cache-dependency-path: carry-your-live/android/gradle/wrapper/gradle-wrapper.properties
|
|
||||||
|
|
||||||
- name: Install Android SDK
|
|
||||||
run: |
|
|
||||||
if [ -x "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" ]; then
|
|
||||||
echo "Android SDK already present in cache"
|
|
||||||
else
|
|
||||||
rm -rf "$ANDROID_HOME/cmdline-tools"
|
|
||||||
mkdir -p "$ANDROID_HOME/cmdline-tools"
|
|
||||||
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/cmdtools.zip
|
|
||||||
unzip -q /tmp/cmdtools.zip -d "$ANDROID_HOME/cmdline-tools"
|
|
||||||
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest"
|
|
||||||
fi
|
|
||||||
mkdir -p "$ANDROID_HOME/licenses"
|
|
||||||
echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" >> "$ANDROID_HOME/licenses/android-sdk-license"
|
|
||||||
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
|
||||||
"platform-tools" \
|
|
||||||
"platforms;android-36" \
|
|
||||||
"build-tools;36.0.0" \
|
|
||||||
"ndk;27.1.12297006"
|
|
||||||
mkdir -p carry-your-live/android/app
|
|
||||||
echo "sdk.dir=$ANDROID_HOME" > carry-your-live/android/app/local.properties
|
|
||||||
|
|
||||||
- name: Run Unit Tests
|
|
||||||
working-directory: carry-your-live/android
|
|
||||||
run: |
|
|
||||||
for i in {1..3}; do
|
|
||||||
./gradlew test --no-daemon -Dorg.gradle.workers.max=2 && break || sleep 30
|
|
||||||
done
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Run Lint
|
|
||||||
working-directory: carry-your-live/android
|
|
||||||
run: |
|
|
||||||
for i in {1..2}; do
|
|
||||||
./gradlew lint --no-daemon -Dorg.gradle.workers.max=2 && break || sleep 30
|
|
||||||
done
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Upload Test Reports
|
- name: Upload Test Reports
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user