From 9dbbe79a6afbb14dba82cc0f23eb84847d9ed716 Mon Sep 17 00:00:00 2001 From: Sven Meyer Date: Wed, 20 Nov 2024 13:25:51 +0100 Subject: [PATCH] Add composite actions to merge queue workflows --- .github/workflows/merge_queue_mac.yml | 48 +++++++++-------------- .github/workflows/merge_queue_ubuntu.yml | 46 ++++++++-------------- .github/workflows/merge_queue_windows.yml | 46 ++++++++-------------- 3 files changed, 52 insertions(+), 88 deletions(-) diff --git a/.github/workflows/merge_queue_mac.yml b/.github/workflows/merge_queue_mac.yml index 0fea2c577..bb5576de9 100644 --- a/.github/workflows/merge_queue_mac.yml +++ b/.github/workflows/merge_queue_mac.yml @@ -10,47 +10,35 @@ jobs: # This name must be equal to the corresponding build_and_test action build-and-test-analysis: runs-on: macos-latest + steps: - name: Checkout source code uses: actions/checkout@v4 - # Sets up Java version - - name: Set up Java ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 + - name: Build and test Analysis + uses: ./.github/actions/analysis with: - distribution: 'adopt' - java-package: jdk java-version: ${{ env.JAVA_VERSION }} - # Restores Maven dependecies - - name: Restore local Maven repository - uses: actions/cache@v4 + + # This name must be equal to the corresponding build_and_test job + build-and-test-scanner-android: + runs-on: macos-latest + + steps: + - name: Checkout source code + uses: actions/checkout@v4 + - name: Build and test Android Scanner + uses: ./.github/actions/scanner-android with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Run maven command - run: mvn clean verify -DrunAnalysisTests + java-version: ${{ env.JAVA_VERSION }} - # This name must be equal to the corresponding build_and_test action + # This name must be equal to the corresponding build_and_test job build-and-test-scanner-soot: runs-on: macos-latest + steps: - name: Checkout source code uses: actions/checkout@v4 - # Sets up Java version - - name: Set up Java ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 + - name: Build and test JavaScanner with Soot + uses: ./.github/actions/scanner-soot with: - distribution: 'adopt' - java-package: jdk java-version: ${{ env.JAVA_VERSION }} - # Restores Maven dependecies - - name: Restore local Maven repository - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Run maven command - run: mvn clean verify -DrunSootTests \ No newline at end of file diff --git a/.github/workflows/merge_queue_ubuntu.yml b/.github/workflows/merge_queue_ubuntu.yml index 7c772acde..bad7f9d72 100644 --- a/.github/workflows/merge_queue_ubuntu.yml +++ b/.github/workflows/merge_queue_ubuntu.yml @@ -10,47 +10,35 @@ jobs: # This name must be equal to the corresponding build_and_test job build-and-test-analysis: runs-on: ubuntu-latest + steps: - name: Checkout source code uses: actions/checkout@v4 - # Sets up Java version - - name: Set up Java ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 + - name: Build and test Analysis + uses: ./.github/actions/analysis with: - distribution: 'adopt' - java-package: jdk java-version: ${{ env.JAVA_VERSION }} - # Restores Maven dependecies - - name: Restore local Maven repository - uses: actions/cache@v4 + + # This name must be equal to the corresponding build_and_test job + build-and-test-scanner-android: + runs-on: macos-latest + + steps: + - name: Checkout source code + uses: actions/checkout@v4 + - name: Build and test Android Scanner + uses: ./.github/actions/scanner-android with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Run maven command - run: mvn clean verify -DrunAnalysisTests + java-version: ${{ env.JAVA_VERSION }} # This name must be equal to the corresponding build_and_test job build-and-test-scanner-soot: runs-on: ubuntu-latest + steps: - name: Checkout source code uses: actions/checkout@v4 - # Sets up Java version - - name: Set up Java ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 + - name: Build and test JavaScanner with Soot + uses: ./.github/actions/scanner-soot with: - distribution: 'adopt' - java-package: jdk java-version: ${{ env.JAVA_VERSION }} - # Restores Maven dependecies - - name: Restore local Maven repository - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Run maven command - run: mvn clean verify -DrunSootTests diff --git a/.github/workflows/merge_queue_windows.yml b/.github/workflows/merge_queue_windows.yml index b44590d24..fdfde8255 100644 --- a/.github/workflows/merge_queue_windows.yml +++ b/.github/workflows/merge_queue_windows.yml @@ -10,47 +10,35 @@ jobs: # This name must be equal to the corresponding build_and_test job build-and-test-analysis: runs-on: windows-latest + steps: - name: Checkout source code uses: actions/checkout@v4 - # Sets up Java version - - name: Set up Java ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 + - name: Build and test Analysis + uses: ./.github/actions/analysis with: - distribution: 'adopt' - java-package: jdk java-version: ${{ env.JAVA_VERSION }} - # Restores Maven dependecies - - name: Restore local Maven repository - uses: actions/cache@v4 + + # This name must be equal to the corresponding build_and_test job + build-and-test-scanner-android: + runs-on: windows-latest + + steps: + - name: Checkout source code + uses: actions/checkout@v4 + - name: Build and test Android Scanner + uses: ./.github/actions/scanner-android with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Run maven command - run: mvn clean verify -DrunAnalysisTests + java-version: ${{ env.JAVA_VERSION }} # This name must be equal to the corresponding build_and_test job build-and-test-scanner-soot: runs-on: windows-latest + steps: - name: Checkout source code uses: actions/checkout@v4 - # Sets up Java version - - name: Set up Java ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 + - name: Build and test JavaScanner with Soot + uses: ./.github/actions/scanner-soot with: - distribution: 'adopt' - java-package: jdk java-version: ${{ env.JAVA_VERSION }} - # Restores Maven dependecies - - name: Restore local Maven repository - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Run maven command - run: mvn clean verify -DrunSootTests