This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
Support Android 14 QPR2 Beta 2 #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Core | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**/README.md' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
if: ${{ !startsWith(github.event.head_commit.message, '[skip ci]') }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Cache Gradle Dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
!~/.gradle/caches/build-cache-* | |
key: gradle-deps-core-${{ hashFiles('**/build.gradle') }} | |
restore-keys: | | |
gradle-deps | |
- name: Cache Gradle Build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches/build-cache-* | |
key: gradle-builds-core-${{ github.sha }} | |
restore-keys: | | |
gradle-builds | |
- name: Cache Ccache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.ccache | |
key: ccache-cache-${{ github.sha }} | |
restore-keys: ccache-cache- | |
- name: Install ccache | |
run: | | |
sudo apt-get install -y ccache | |
ccache -o max_size=2G | |
ccache -o hash_dir=false | |
- name: Build with Gradle | |
run: | | |
mkdir -p ~/.gradle/wrapper | |
mkdir -p ~/.gradle/caches | |
[ $(du -s ~/.gradle/wrapper | awk '{ print $1 }') -gt 250000 ] && rm -rf ~/.gradle/wrapper/* || true | |
find ~/.gradle/caches -exec touch -d "2 days ago" {} + || true | |
echo 'org.gradle.caching=true' >> gradle.properties | |
echo 'org.gradle.parallel=true' >> gradle.properties | |
echo 'org.gradle.vfs.watch=true' >> gradle.properties | |
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties | |
./gradlew zipDebug zipRelease | |
- name: Prepare artifact | |
if: success() | |
id: prepareArtifact | |
run: | | |
releaseName=`ls out/riru-*-release.zip | awk -F '(/|.zip)' '{print $2}'` && echo "::set-output name=releaseName::$releaseName" | |
debugName=`ls out/riru-*-debug.zip | awk -F '(/|.zip)' '{print $2}'` && echo "::set-output name=debugName::$debugName" | |
unzip out/riru-*-release.zip -d riru-release | |
unzip out/riru-*-debug.zip -d riru-debug | |
- name: Upload release | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ steps.prepareArtifact.outputs.releaseName }} | |
path: './riru-release/*' | |
- name: Upload debug | |
# if: ${{ github.event_name == 'pull_request' && success() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ steps.prepareArtifact.outputs.debugName }} | |
path: './riru-debug/*' | |
- name: Upload mappings | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mappings | |
path: "riru/build/outputs/mapping/release" |