Introduce soot wrapper build job #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Soot test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
soot-wrapper-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java-version: [ 11, 17, 21 ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
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@v4 | ||
id: cache-jars | ||
with: | ||
path: | | ||
java/common/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@v4 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: 'adopt' | ||
- name: Build with Maven | ||
if: steps.cache-jars.outputs.cache-hit != 'true' | ||
run: | | ||
cd java/common/ | ||
mvn clean package -X -DskipTests | ||
- name: Upload JAR if cache missed | ||
if: steps.cache-jars.outputs.cache-hit != 'true' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: soot-wrapper-${{ matrix.java-version }}.jar | ||
path: java/common/target/*.jar | ||
goreleaser-test: | ||
runs-on: ubuntu-latest | ||
needs: soot-wrapper | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- name: Download JARs | ||
uses: actions/download-artifact@v4 | ||
- name: List artifacts | ||
run: | | ||
ls -la |