From 8db322267968109241b87d01011fd44a32bbca8e Mon Sep 17 00:00:00 2001 From: Michael Chernov <4ernovm@gmail.com> Date: Fri, 16 Feb 2024 13:43:59 +0200 Subject: [PATCH] Introduce soot wrapper build job --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++ .github/workflows/soot.yml | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 .github/workflows/soot.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 832fde5f..55a8900a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,3 +71,43 @@ jobs: sudo -u aur git config user.name "Debricked build bot" git config --global --add safe.directory "$PWD" make push + + soot-wrapper: + runs-on: ubuntu-latest + strategy: + matrix: + java-version: [ 11, 17, 21 ] + steps: + - uses: actions/checkout@v2 + with: + repository: 'debricked/soot-wrapper' + + - name: Calculate checksum + id: calc-checksum + run: echo "::set-output name=hash::$(git rev-parse HEAD)" + + - name: Cache JARs + uses: actions/cache@v2 + id: cache-jars + with: + path: | + target/*.jar + key: ${{ runner.os }}-soot-wrapper-${{ matrix.java-version }}-${{ steps.calc-checksum.outputs.hash }} + + - name: Set up JDK ${{ matrix.java-version }} + if: steps.cache-jars.outputs.cache-hit != 'true' + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java-version }} + distribution: 'adopt' + + - name: Build with Maven + if: steps.cache-jars.outputs.cache-hit != 'true' + run: mvn clean package + + - name: Upload JAR if cache missed + if: steps.cache-jars.outputs.cache-hit != 'true' + uses: actions/upload-artifact@v2 + with: + name: soot-wrapper-${{ matrix.java-version }}.jar + path: target/*.jar diff --git a/.github/workflows/soot.yml b/.github/workflows/soot.yml new file mode 100644 index 00000000..353440c0 --- /dev/null +++ b/.github/workflows/soot.yml @@ -0,0 +1,51 @@ +name: Soot + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: write + +jobs: + soot-wrapper: + runs-on: ubuntu-latest + strategy: + matrix: + java-version: [ 11, 17, 21 ] + steps: + - uses: actions/checkout@v2 + with: + repository: 'debricked/soot-wrapper' + + - name: Calculate checksum + id: calc-checksum + run: echo "::set-output name=hash::$(git rev-parse HEAD)" + + - name: Cache JARs + uses: actions/cache@v2 + id: cache-jars + with: + path: | + target/*.jar + key: ${{ runner.os }}-soot-wrapper-${{ matrix.java-version }}-${{ steps.calc-checksum.outputs.hash }} + + - name: Set up JDK ${{ matrix.java-version }} + if: steps.cache-jars.outputs.cache-hit != 'true' + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java-version }} + distribution: 'adopt' + + - name: Build with Maven + if: steps.cache-jars.outputs.cache-hit != 'true' + run: mvn clean package + + - name: Upload JAR if cache missed + if: steps.cache-jars.outputs.cache-hit != 'true' + uses: actions/upload-artifact@v2 + with: + name: soot-wrapper-${{ matrix.java-version }}.jar + path: target/*.jar