build.sh 791 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash -ex
  2. # SPDX-FileCopyrightText: 2023 yuzu Emulator Project
  3. # SPDX-FileCopyrightText: 2024 suyu Emulator Project
  4. # SPDX-License-Identifier: GPL-3.0-or-later
  5. export NDK_CCACHE="$(which ccache)"
  6. ccache -s
  7. git submodule update --init --recursive
  8. BUILD_FLAVOR="mainline"
  9. BUILD_TYPE="release"
  10. if [ "${GITHUB_REPOSITORY}" == "suyu/suyu" ]; then
  11. BUILD_TYPE="relWithDebInfo"
  12. fi
  13. if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
  14. export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
  15. base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
  16. fi
  17. cd src/android
  18. chmod +x ./gradlew
  19. ./gradlew "assemble${BUILD_FLAVOR}${BUILD_TYPE}" "bundle${BUILD_FLAVOR}${BUILD_TYPE}"
  20. ccache -s
  21. if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
  22. rm "${ANDROID_KEYSTORE_FILE}"
  23. fi