Skip to content

Commit

Permalink
try running android builds in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Nov 23, 2024
1 parent a425465 commit 1285641
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/actions/build_android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ inputs:
sentry-dsn:
description: 'The sentry dsn for sending error info'
required: true
build-mode:
description: 'Build an APK or App Bundle'
default: 'apk'
runs:
using: "composite"
steps:
Expand All @@ -44,6 +47,7 @@ runs:
env:
ANDROID_KEY_JKS: ${{ inputs.android-key-jks }}
- name: Build APK
if: ${{ inputs.version }} == 'apk'
shell: bash
run: flutter build apk --split-debug-info=./symbols --obfuscate --build-number="$BUILD_NUMBER" --build-name="$VERSION" --dart-define=SENTRY_DSN="$SENTRY_DSN" --dart-define=cronetHttpNoPlay=true
env:
Expand All @@ -55,6 +59,7 @@ runs:
SENTRY_DSN: ${{ inputs.sentry-dsn }}
#SENTRY_URL: ${{ inputs.sentry-url }}
- name: Build AppBundle
if: ${{ inputs.version }} == 'bundle'
shell: bash
run: flutter build appbundle --split-debug-info=./symbols --obfuscate --build-number="$BUILD_NUMBER" --build-name="$VERSION" --dart-define=SENTRY_DSN="$SENTRY_DSN"
env:
Expand All @@ -71,9 +76,7 @@ runs:
run: cd android && ./gradlew app:dependencies --configuration releaseCompileClasspath
- uses: actions/upload-artifact@v4
continue-on-error: true
if: runner.os == 'Linux'
if: runner.os == 'Linux' && ${{ inputs.version }} == 'apk'
with:
name: artifact-${{ runner.os }}
path: |
build/app/outputs/apk
build/app/outputs/bundle
path: build/app/outputs/apk
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
include:
- os: ubuntu-latest
android_build: apk
- os: ubuntu-latest
android_build: bundle
name: Build
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -41,6 +46,7 @@ jobs:
sentry-org: ${{ secrets.SENTRY_ORG }}
sentry-project: ${{ secrets.SENTRY_PROJECT }}
sentry-dsn: ${{ secrets.SENTRY_DSN }}
build-mode: ${{ matrix.os.android_build }}
#sentry-url: ${{ secrets.SENTRY_URL }}
- name: Build IOS / Upload Beta
if: github.event_name == 'push'
Expand Down

0 comments on commit 1285641

Please sign in to comment.