2021-08-24 14:18:44 +02:00
|
|
|
name: CI
|
2021-06-12 23:24:17 +02:00
|
|
|
on:
|
|
|
|
push:
|
2021-08-28 20:09:55 +02:00
|
|
|
branches:
|
|
|
|
- master
|
2021-08-24 14:18:44 +02:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '**.java'
|
|
|
|
- '**.gradle'
|
|
|
|
- 'brut.apktool/apktool-lib/src/main/resources/**'
|
2022-04-24 23:33:11 +02:00
|
|
|
- 'brut.apktool/apktool-lib/src/test/**'
|
2021-08-24 14:18:44 +02:00
|
|
|
- '.github/workflows/**'
|
2023-03-04 19:50:14 +01:00
|
|
|
- 'gradle/wrapper/**'
|
|
|
|
- 'gradlew'
|
|
|
|
- 'gradlew.bat'
|
2022-05-23 13:09:43 +02:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2021-06-12 23:24:17 +02:00
|
|
|
|
2022-03-13 12:40:02 +01:00
|
|
|
env:
|
|
|
|
BINARY_PATH: brut.apktool/apktool-lib/src/main/resources/prebuilt
|
|
|
|
|
2021-06-12 23:24:17 +02:00
|
|
|
jobs:
|
2021-09-01 13:23:39 +02:00
|
|
|
analyze-mac-aapt:
|
|
|
|
runs-on: macos-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-13 12:40:02 +01:00
|
|
|
file: [ aapt_64, aapt2_64 ]
|
2021-09-01 13:23:39 +02:00
|
|
|
steps:
|
2022-03-13 12:40:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-01 13:23:39 +02:00
|
|
|
- name: Verify Executable
|
|
|
|
run: ${{ env.BINARY_PATH }}/macosx/${{ matrix.file }} version
|
|
|
|
- name: Output Static
|
|
|
|
run: otool -L ${{ env.BINARY_PATH }}/macosx/${{ matrix.file }} || true
|
|
|
|
|
|
|
|
analyze-linux-aapt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-13 12:40:02 +01:00
|
|
|
file: [ aapt, aapt_64, aapt2, aapt2_64 ]
|
2021-09-01 13:23:39 +02:00
|
|
|
steps:
|
2022-03-13 12:40:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-01 13:23:39 +02:00
|
|
|
- name: Verify Executable
|
|
|
|
run: ${{ env.BINARY_PATH }}/linux/${{ matrix.file }} version
|
|
|
|
- name: Output Static
|
|
|
|
run: ldd ${{ env.BINARY_PATH }}/linux/${{ matrix.file }} || true
|
|
|
|
|
|
|
|
analyze-windows-aapt:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-13 12:40:02 +01:00
|
|
|
file: [ aapt.exe, aapt_64.exe, aapt2.exe, aapt2_64.exe ]
|
2021-09-01 13:23:39 +02:00
|
|
|
steps:
|
2022-03-13 12:40:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-01 13:23:39 +02:00
|
|
|
- name: Verify Executable
|
|
|
|
run: ${{ env.BINARY_PATH }}/windows/${{ matrix.file }} version
|
|
|
|
- name: Output Static
|
|
|
|
run: ldd ${{ env.BINARY_PATH }}/windows/${{ matrix.file }} || true
|
|
|
|
|
2021-08-24 14:18:44 +02:00
|
|
|
build-and-test-with-Java-8-and-later:
|
|
|
|
runs-on: ${{ matrix.os }}
|
2021-09-01 13:23:39 +02:00
|
|
|
needs:
|
|
|
|
- analyze-mac-aapt
|
|
|
|
- analyze-linux-aapt
|
|
|
|
- analyze-windows-aapt
|
2021-08-24 14:18:44 +02:00
|
|
|
name: Build/Test (JDK ${{ matrix.java }}, ${{ matrix.os }})
|
|
|
|
strategy:
|
2021-08-28 20:10:06 +02:00
|
|
|
fail-fast: true
|
2021-08-24 14:18:44 +02:00
|
|
|
matrix:
|
|
|
|
os: [ ubuntu-latest, macOS-latest, windows-latest ]
|
2023-07-20 11:19:29 +02:00
|
|
|
java: [ 8, 11, 17, 18, 19, 20 ]
|
2021-08-24 14:18:44 +02:00
|
|
|
steps:
|
2022-03-13 12:40:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-java@v3
|
2021-08-24 14:18:44 +02:00
|
|
|
with:
|
|
|
|
distribution: 'zulu'
|
|
|
|
java-version: ${{ matrix.java }}
|
|
|
|
- name: Build and test
|
2023-07-24 12:44:09 +02:00
|
|
|
uses: gradle/gradle-build-action@v2.6.1
|
2022-03-13 12:40:02 +01:00
|
|
|
with:
|
|
|
|
arguments: build shadowJar proguard
|
2021-08-24 14:18:44 +02:00
|
|
|
|
|
|
|
upload-artifact:
|
2021-06-12 23:24:17 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Build apktool.jar
|
2021-08-24 14:18:44 +02:00
|
|
|
if: github.repository == 'iBotPeaches/Apktool' && github.ref == 'refs/heads/master'
|
|
|
|
needs:
|
|
|
|
- build-and-test-with-Java-8-and-later
|
2021-06-12 23:24:17 +02:00
|
|
|
steps:
|
2022-03-13 12:40:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-java@v3
|
2021-06-12 23:24:17 +02:00
|
|
|
with:
|
2021-08-24 13:59:22 +02:00
|
|
|
distribution: 'zulu'
|
2023-01-14 14:09:39 +01:00
|
|
|
java-version: 17
|
2021-06-12 23:24:17 +02:00
|
|
|
- name: Build
|
2023-07-24 12:44:09 +02:00
|
|
|
uses: gradle/gradle-build-action@v2.6.1
|
2022-03-13 12:40:02 +01:00
|
|
|
with:
|
|
|
|
arguments: build shadowJar proguard
|
2021-06-12 23:24:17 +02:00
|
|
|
- name: Upload
|
2022-03-13 12:40:02 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-06-12 23:24:17 +02:00
|
|
|
with:
|
2021-06-12 23:31:07 +02:00
|
|
|
name: apktool.jar
|
2021-06-12 23:24:17 +02:00
|
|
|
path: brut.apktool/apktool-cli/build/libs/apktool-*-small.jar
|