Apktool/.github/workflows/build.yml

104 lines
2.9 KiB
YAML
Raw Normal View History

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