mirror of
https://github.com/revanced/Apktool.git
synced 2025-02-15 21:16:50 +01:00
Optimize CI a bit (#2773)
* Use gradle-build-action on CI * Bump actions/checkout to v3 * Bump actions/setup-java to v2 * Rearrange & trim blank lines * Bump actions/upload-artifact to v3 * Test on jdk 17 * Trim blank lines * Revert test on jdk 17 * Merge duplicated build actions
This commit is contained in:
parent
31af56a430
commit
7fd91369e8
81
.github/workflows/build.yml
vendored
81
.github/workflows/build.yml
vendored
@ -1,6 +1,4 @@
|
|||||||
name: CI
|
name: CI
|
||||||
env:
|
|
||||||
BINARY_PATH: brut.apktool/apktool-lib/src/main/resources/prebuilt
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@ -12,19 +10,19 @@ on:
|
|||||||
- 'brut.apktool/apktool-lib/src/main/resources/**'
|
- 'brut.apktool/apktool-lib/src/main/resources/**'
|
||||||
- '.github/workflows/**'
|
- '.github/workflows/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
BINARY_PATH: brut.apktool/apktool-lib/src/main/resources/prebuilt
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze-mac-aapt:
|
analyze-mac-aapt:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
file: [aapt_64, aapt2_64]
|
file: [ aapt_64, aapt2_64 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Verify Executable
|
- name: Verify Executable
|
||||||
run: ${{ env.BINARY_PATH }}/macosx/${{ matrix.file }} version
|
run: ${{ env.BINARY_PATH }}/macosx/${{ matrix.file }} version
|
||||||
|
|
||||||
- name: Output Static
|
- name: Output Static
|
||||||
run: otool -L ${{ env.BINARY_PATH }}/macosx/${{ matrix.file }} || true
|
run: otool -L ${{ env.BINARY_PATH }}/macosx/${{ matrix.file }} || true
|
||||||
|
|
||||||
@ -32,14 +30,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
file: [aapt, aapt_64, aapt2, aapt2_64]
|
file: [ aapt, aapt_64, aapt2, aapt2_64 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Verify Executable
|
- name: Verify Executable
|
||||||
run: ${{ env.BINARY_PATH }}/linux/${{ matrix.file }} version
|
run: ${{ env.BINARY_PATH }}/linux/${{ matrix.file }} version
|
||||||
|
|
||||||
- name: Output Static
|
- name: Output Static
|
||||||
run: ldd ${{ env.BINARY_PATH }}/linux/${{ matrix.file }} || true
|
run: ldd ${{ env.BINARY_PATH }}/linux/${{ matrix.file }} || true
|
||||||
|
|
||||||
@ -47,14 +42,11 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
file: [aapt.exe, aapt_64.exe, aapt2.exe, aapt2_64.exe]
|
file: [ aapt.exe, aapt_64.exe, aapt2.exe, aapt2_64.exe ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Verify Executable
|
- name: Verify Executable
|
||||||
run: ${{ env.BINARY_PATH }}/windows/${{ matrix.file }} version
|
run: ${{ env.BINARY_PATH }}/windows/${{ matrix.file }} version
|
||||||
|
|
||||||
- name: Output Static
|
- name: Output Static
|
||||||
run: ldd ${{ env.BINARY_PATH }}/windows/${{ matrix.file }} || true
|
run: ldd ${{ env.BINARY_PATH }}/windows/${{ matrix.file }} || true
|
||||||
|
|
||||||
@ -70,31 +62,16 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest, macOS-latest, windows-latest ]
|
os: [ ubuntu-latest, macOS-latest, windows-latest ]
|
||||||
java: [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ]
|
java: [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/cache@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
- uses: actions/setup-java@v3
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: ${{ runner.os }}-gradle-${{ matrix.java }}-${{ hashFiles('**/*.gradle*') }}
|
|
||||||
restore-keys: ${{ runner.os }}-${{ matrix.java }}-gradle-
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java }}
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
|
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
if: startsWith(matrix.os, 'windows') == true
|
uses: gradle/gradle-build-action@v2
|
||||||
run: ./gradlew.bat build shadowJar proguard
|
with:
|
||||||
|
arguments: build shadowJar proguard
|
||||||
- name: Build and test
|
|
||||||
if: startsWith(matrix.os, 'windows') != true
|
|
||||||
run: ./gradlew build shadowJar proguard
|
|
||||||
|
|
||||||
upload-artifact:
|
upload-artifact:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -102,29 +79,18 @@ jobs:
|
|||||||
if: github.repository == 'iBotPeaches/Apktool' && github.ref == 'refs/heads/master'
|
if: github.repository == 'iBotPeaches/Apktool' && github.ref == 'refs/heads/master'
|
||||||
needs:
|
needs:
|
||||||
- build-and-test-with-Java-8-and-later
|
- build-and-test-with-Java-8-and-later
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/cache@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
- uses: actions/setup-java@v3
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: ${{ runner.os }}-gradle-${{ matrix.java }}-${{ hashFiles('**/*.gradle*') }}
|
|
||||||
restore-keys: ${{ runner.os }}-${{ matrix.java }}-gradle-
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up JDK 10
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 10
|
java-version: 10
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./gradlew build shadowJar proguard
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: build shadowJar proguard
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: apktool.jar
|
name: apktool.jar
|
||||||
path: brut.apktool/apktool-cli/build/libs/apktool-*-small.jar
|
path: brut.apktool/apktool-cli/build/libs/apktool-*-small.jar
|
||||||
@ -132,23 +98,18 @@ jobs:
|
|||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'java' ]
|
language: [ 'java' ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v1
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user