Github Actions: Build android
This commit is contained in:
parent
cd4ef8611c
commit
a273892744
2 changed files with 54 additions and 0 deletions
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
|
@ -107,6 +107,52 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
||||||
|
android:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Set up cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
~/.ccache
|
||||||
|
key: ${{ runner.os }}-android-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-android-
|
||||||
|
- name: Query tag name
|
||||||
|
uses: little-core-labs/get-git-tag@v3.0.2
|
||||||
|
id: tagName
|
||||||
|
- name: Deps
|
||||||
|
run: |
|
||||||
|
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
|
||||||
|
- name: Copy artifacts
|
||||||
|
run: |
|
||||||
|
mkdir artifacts/
|
||||||
|
cp src/android/app/build/outputs/apk/release/*.apk \
|
||||||
|
src/android/app/build/outputs/bundle/release/*.aab \
|
||||||
|
artifacts/
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: android
|
||||||
|
path: artifacts/
|
||||||
transifex:
|
transifex:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: citraemu/build-environments:linux-transifex
|
container: citraemu/build-environments:linux-transifex
|
||||||
|
|
|
@ -49,6 +49,14 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
|
||||||
DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
|
DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Use ccache for android if available
|
||||||
|
# =======================================================================
|
||||||
|
if (NOT $ENV{NDK_CCACHE} EQUAL "")
|
||||||
|
set(CCACHE_EXE $ENV{NDK_CCACHE})
|
||||||
|
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_EXE})
|
||||||
|
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXE})
|
||||||
|
endif()
|
||||||
|
|
||||||
# Sanity check : Check that all submodules are present
|
# Sanity check : Check that all submodules are present
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue