diff options
author | liushuyu <[email protected]> | 2023-03-05 17:58:50 -0700 |
---|---|---|
committer | Morph <[email protected]> | 2023-06-30 14:24:31 -0400 |
commit | 22263787e363ab7c383d2b7e180487c575704a7c (patch) | |
tree | 6826bbef7a68379f26762196c65e4c022b9d34f1 /.github | |
parent | 9252ad4e1091eaa0d9865c6a212feaac20d13918 (diff) | |
download | yuzu-mainline-22263787e363ab7c383d2b7e180487c575704a7c.tar.gz yuzu-mainline-22263787e363ab7c383d2b7e180487c575704a7c.zip |
CI: add Android build workflow
* Switch OpenJDK runtime to Eclipse Temurin (AdoptOpenJDK has rebranded
to Eclipse Temurin)
* Fetch submodules using full clones instead of shallow clones
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/android-build.yml | 79 | ||||
-rw-r--r-- | .github/workflows/verify.yml | 4 |
2 files changed, 81 insertions, 2 deletions
diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml new file mode 100644 index 000000000..e639e965a --- /dev/null +++ b/.github/workflows/android-build.yml @@ -0,0 +1,79 @@ +# SPDX-FileCopyrightText: 2022 yuzu Emulator Project +# SPDX-License-Identifier: GPL-3.0-or-later + +name: 'yuzu-android-build' + +on: + push: + tags: [ "*" ] + +jobs: + android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Set up cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + ~/.ccache + key: ${{ runner.os }}-android-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-android- + - name: Query tag name + uses: olegtarasov/[email protected] + id: tagName + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y ccache apksigner glslang-dev glslang-tools + - name: Build + run: ./.ci/scripts/android/build.sh + - name: Copy and sign artifacts + env: + ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} + run: ./.ci/scripts/android/upload.sh + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: android + path: artifacts/ + # release steps + release-android: + runs-on: ubuntu-latest + needs: [android] + if: ${{ startsWith(github.ref, 'refs/tags/') }} + permissions: + contents: write + steps: + - uses: actions/download-artifact@v3 + - name: Query tag name + uses: olegtarasov/[email protected] + id: tagName + - name: Create release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tagName.outputs.tag }} + release_name: ${{ steps.tagName.outputs.tag }} + draft: false + prerelease: false + - name: Upload artifacts + uses: alexellis/[email protected] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + asset_paths: '["./**/*.apk","./**/*.aab"]' diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index bd4141f56..b5d338199 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -129,11 +129,12 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + fetch-depth: 0 - name: set up JDK 17 uses: actions/setup-java@v3 with: java-version: '17' - distribution: 'adopt' + distribution: 'temurin' - name: Set up cache uses: actions/cache@v3 with: @@ -151,7 +152,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y ccache apksigner glslang-dev glslang-tools - git -C ./externals/vcpkg/ fetch --all --unshallow - name: Build run: ./.ci/scripts/android/build.sh - name: Copy and sign artifacts |