From 564ae346d09141e1a352f3127809f20668738930 Mon Sep 17 00:00:00 2001 From: SachinVin Date: Tue, 19 Apr 2022 00:33:12 +0530 Subject: [PATCH] CI: Andriod: Use sh to buld and create artifacts --- .ci/android/build.sh | 12 ++++++++++++ .ci/android/upload.sh | 10 ++++++++++ .github/workflows/ci.yml | 18 ++---------------- 3 files changed, 24 insertions(+), 16 deletions(-) create mode 100755 .ci/android/build.sh create mode 100755 .ci/android/upload.sh diff --git a/.ci/android/build.sh b/.ci/android/build.sh new file mode 100755 index 0000000000..3c1e2f2405 --- /dev/null +++ b/.ci/android/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash -ex + +export NDK_CCACHE=$(which ccache) + +ccache -s + +cd src/android +chmod +x ./gradlew +./gradlew bundleRelease +./gradlew assembleRelease + +ccache -s diff --git a/.ci/android/upload.sh b/.ci/android/upload.sh new file mode 100755 index 0000000000..64258dfd52 --- /dev/null +++ b/.ci/android/upload.sh @@ -0,0 +1,10 @@ +#!/bin/bash -ex + +. ./.ci/common/pre-upload.sh + +REV_NAME="citra-${GITDATE}-${GITREV}" + +cp src/android/app/build/outputs/apk/release/app-release.apk \ + "artifacts/${REV_NAME}.apk" +cp src/android/app/build/outputs/bundle/release/app-release.aab \ + "artifacts/${REV_NAME}.aab" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08936bc35f..5381af8293 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,23 +131,9 @@ jobs: sudo apt-get update sudo apt-get install ccache -y - name: Build - run: | - export NDK_CCACHE=$(which ccache) - - ccache -s - - cd src/android - chmod +x ./gradlew - ./gradlew bundleRelease - ./gradlew assembleRelease - - ccache -s + run: ./.ci/android/build.sh - name: Copy artifacts - run: | - mkdir artifacts/ - cp src/android/app/build/outputs/apk/release/*.apk \ - src/android/app/build/outputs/bundle/release/*.aab \ - artifacts/ + run: ./.ci/android/upload.sh - name: Upload uses: actions/upload-artifact@v2 with: