Opti Actions
update clean.yml auto ci build Bumps the actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-java](https://github.com/actions/setup-java) and [gradle/actions](https://github.com/gradle/actions). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) Updates `actions/setup-java` from 4 to 5 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v4...v5) Updates `gradle/actions` from 4 to 5 - [Release notes](https://github.com/gradle/actions/releases) - [Commits](https://github.com/gradle/actions/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-java dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: gradle/actions dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Update clean.yml
This commit is contained in:
parent
dbacad9876
commit
02c9d34f5a
|
|
@ -1,27 +1,30 @@
|
||||||
name: Build CI
|
name: CI Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
push:
|
||||||
merge_group:
|
merge_group:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macos-latest
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
CCACHE_COMPILERCHECK: '%compiler% -dumpmachine; %compiler% -dumpversion'
|
CCACHE_COMPILERCHECK: '%compiler% -dumpmachine; %compiler% -dumpversion'
|
||||||
CCACHE_NOHASHDIR: 'true'
|
CCACHE_NOHASHDIR: 'true'
|
||||||
CCACHE_HARDLINK: 'true'
|
CCACHE_HARDLINK: 'true'
|
||||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
CCACHE_BASEDIR: '${{ github.workspace }}'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
ref: ${{ github.sha }}
|
||||||
|
submodules: 'recursive'
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Cache Gradle
|
- name: Cache CCACHE
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
|
@ -37,15 +40,17 @@ jobs:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/build.gradle*') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/build.gradle*') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-m2-
|
${{ runner.os }}-ccache-
|
||||||
|
|
||||||
- name: Cache ccache
|
- name: Cache Android Build Cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.ccache
|
path: |
|
||||||
key: ${{ runner.os }}-ccache-${{ hashFiles('**/src/**/*.cpp', '**/src/**/*.h', '**/CMakeLists.txt') }}
|
~/.android/build-cache
|
||||||
|
~/.gradle/caches/modules-2
|
||||||
|
key: ${{ runner.os }}-android-build-cache-${{ hashFiles('**/build.gradle*', '**/*.versions.toml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-ccache-
|
${{ runner.os }}-android-build-cache-
|
||||||
|
|
||||||
- name: Write signing key if needed
|
- name: Write signing key if needed
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
|
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
|
||||||
|
|
@ -72,13 +77,13 @@ jobs:
|
||||||
path: libxposed/service
|
path: libxposed/service
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v5
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
|
|
@ -89,43 +94,53 @@ jobs:
|
||||||
version: 1.12.0
|
version: 1.12.0
|
||||||
|
|
||||||
- name: Remove Android's cmake
|
- name: Remove Android's cmake
|
||||||
run: rm -rf $ANDROID_HOME/cmake
|
shell: bash
|
||||||
|
run: rm -rf "$ANDROID_HOME/cmake"
|
||||||
|
|
||||||
- name: Build local dependencies
|
- name: Setup build environment properties
|
||||||
run: |
|
run: |
|
||||||
echo "--- Building API dependency ---"
|
# for libxposed/api build
|
||||||
cd libxposed/api
|
echo 'org.gradle.jvmargs=-Xmx2048m' >> libxposed/api/gradle.properties
|
||||||
./gradlew :api:publishApiPublicationToMavenLocal --no-daemon
|
|
||||||
echo "--- Building Service Interface dependency ---"
|
# for main project build
|
||||||
|
{
|
||||||
|
echo 'org.gradle.parallel=true'
|
||||||
|
echo 'org.gradle.jvmargs=-Xmx2048m'
|
||||||
|
echo 'android.native.buildOutput=verbose'
|
||||||
|
} >> gradle.properties
|
||||||
|
|
||||||
|
- name: Build dependencies with Gradle
|
||||||
|
working-directory: libxposed
|
||||||
|
run: |
|
||||||
|
cd api
|
||||||
|
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
|
||||||
|
./gradlew :api:publishApiPublicationToMavenLocal
|
||||||
cd ../service
|
cd ../service
|
||||||
./gradlew :interface:publishInterfacePublicationToMavenLocal --no-daemon
|
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
|
||||||
|
./gradlew :interface:publishInterfacePublicationToMavenLocal
|
||||||
|
|
||||||
- name: Set short commit id
|
- name: Set short commit id
|
||||||
run: echo "commit=$(echo ${{ github.sha }} | cut -c-7)" >> $GITHUB_ENV
|
run: echo "commit=$(echo ${{ github.sha }} | cut -c-7)" > $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: |
|
run: ./gradlew buildAll
|
||||||
echo 'org.gradle.parallel=true' >> gradle.properties
|
|
||||||
echo 'org.gradle.jvmargs=-Xmx3g' >> gradle.properties
|
|
||||||
echo 'android.native.buildOutput=verbose' >> gradle.properties
|
|
||||||
./gradlew buildAll
|
|
||||||
|
|
||||||
- name: Upload Debug artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: npatch-debug
|
|
||||||
path: out/debug/*
|
|
||||||
|
|
||||||
- name: Upload Release artifact
|
- name: Upload Release artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: npatch-release
|
name: npatch-release-${{ env.commit }}
|
||||||
path: out/release/*
|
path: out/release/*
|
||||||
|
|
||||||
|
- name: Upload Debug artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: npatch-debug-${{ env.commit }}
|
||||||
|
path: out/debug/*
|
||||||
|
|
||||||
- name: Upload mappings
|
- name: Upload mappings
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: mappings
|
name: mappings-${{ env.commit }}
|
||||||
path: |
|
path: |
|
||||||
patch-loader/build/outputs/mapping
|
patch-loader/build/outputs/mapping
|
||||||
manager/build/outputs/mapping
|
manager/build/outputs/mapping
|
||||||
|
|
@ -133,6 +148,6 @@ jobs:
|
||||||
- name: Upload symbols
|
- name: Upload symbols
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: symbols
|
name: symbols-${{ env.commit }}
|
||||||
path: |
|
path: |
|
||||||
patch-loader/build/symbols
|
patch-loader/build/symbols
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
name: Clean Gradle Cache
|
name: Clean Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
@ -15,3 +15,17 @@ jobs:
|
||||||
|
|
||||||
- name: 删除 ccache 缓存
|
- name: 删除 ccache 缓存
|
||||||
run: rm -rf ~/.ccache/
|
run: rm -rf ~/.ccache/
|
||||||
|
|
||||||
|
cleanup-runs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
steps:
|
||||||
|
- name: 清理所有失敗的 Workflows
|
||||||
|
uses: Mattraks/delete-workflow-runs@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
repository: ${{ github.repository }}
|
||||||
|
retain_days: 0
|
||||||
|
keep_minimum_runs: 1
|
||||||
|
delete_run_by_conclusion_pattern: 'failure,skipped'
|
||||||
Loading…
Reference in New Issue