@@ -10,11 +10,14 @@ jobs:
1010 build :
1111 name : Build on ${{ matrix.os }}
1212 runs-on : ${{ matrix.os }}
13- if : ${{ !startsWith(github.event.head_commit.message, '[skip ci]') }}
1413 strategy :
15- fail-fast : false
1614 matrix :
1715 os : [ ubuntu-latest ]
16+ env :
17+ CCACHE_COMPILERCHECK : ' %compiler% -dumpmachine; %compiler% -dumpversion'
18+ CCACHE_NOHASHDIR : ' true'
19+ CCACHE_HARDLINK : ' true'
20+ CCACHE_BASEDIR : ' ${{ github.workspace }}'
1821
1922 steps :
2023 - name : Checkout
@@ -34,62 +37,54 @@ jobs:
3437 echo ${{ secrets.KEY_STORE }} | base64 --decode > key.jks
3538 fi
3639
37- - name : Set up JDK 11
40+ - name : Checkout libxposed/api
41+ uses : actions/checkout@v3
42+ with :
43+ repository : libxposed/api
44+ path : libxposed/api
45+
46+ - name : Checkout libxposed/service
47+ uses : actions/checkout@v3
48+ with :
49+ repository : libxposed/service
50+ path : libxposed/service
51+
52+ - name : Setup Java
3853 uses : actions/setup-java@v3
3954 with :
40- java-version : ' 11 '
55+ java-version : ' 17 '
4156 distribution : ' temurin'
42- cache : ' gradle'
4357
44- - name : Cache gradle dependencies
45- uses : actions/cache@v3
58+ - name : Setup Gradle
59+ uses : gradle/gradle-build-action@v2
4660 with :
47- path : |
48- ~/.gradle/caches
49- ~/.gradle/wrapper
50- !~/.gradle/caches/build-cache-*
51- key : gradle-deps-core-${{ hashFiles('**/build.gradle.kts') }}
52- restore-keys : |
53- gradle-deps
54-
55- - name : Cache gradle build
56- uses : actions/cache@v3
57- with :
58- path : |
59- ~/.gradle/caches/build-cache-*
60- ~/.gradle/buildOutputCleanup/cache.properties
61- key : gradle-builds-core-${{ github.sha }}
62- restore-keys : |
63- gradle-builds
64-
65- - name : Cache native build
66- uses : actions/cache@v3
61+ gradle-home-cache-cleanup : true
62+
63+ - name : Set up ccache
64+ uses :
hendrikmuhs/[email protected] 6765 with :
68- path : |
69- ~/.ccache
70- patch-loader/build/.lto-cache
71- key : native-cache-${{ github.sha }}
72- restore-keys : native-cache-
66+ max-size : 2G
67+ key : ${{ runner.os }}
68+ restore-keys : ${{ runner.os }}
69+ save : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
7370
74- - name : Install dep
71+ - name : Build dependencies
72+ working-directory : libxposed
7573 run : |
76- sudo apt-get install -y ccache
77- ccache -o max_size=1G
78- ccache -o hash_dir=false
79- ccache -o compiler_check='%compiler% -dumpmachine; %compiler% -dumpversion'
80- ccache -zp
74+ cd api
75+ echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
76+ ./gradlew :api:publishApiPublicationToMavenLocal
77+ cd ..
78+ cd service
79+ echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
80+ ./gradlew :interface:publishInterfacePublicationToMavenLocal
8181
8282 - name : Build with Gradle
8383 run : |
84- [ $(du -s ~/.gradle/wrapper | awk '{ print $1 }') -gt 250000 ] && rm -rf ~/.gradle/wrapper/* || true
85- find ~/.gradle/caches -exec touch -d "2 days ago" {} + || true
86- echo 'org.gradle.caching=true' >> gradle.properties
8784 echo 'org.gradle.parallel=true' >> gradle.properties
88- echo 'org.gradle.vfs.watch=true' >> gradle.properties
8985 echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
9086 echo 'android.native.buildOutput=verbose' >> gradle.properties
9187 ./gradlew buildAll
92- ccache -s
9388
9489 - name : Upload Debug artifact
9590 uses : actions/upload-artifact@v3
0 commit comments