Skip to content

Commit

Permalink
Run each module seperately
Browse files Browse the repository at this point in the history
  • Loading branch information
svenfeld committed Oct 1, 2024
1 parent f50ba23 commit f237b3a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 49 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/android_tests.yml

This file was deleted.

63 changes: 50 additions & 13 deletions .github/workflows/main_build.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,74 @@
name: CryptoAnalysis build
name: Combined CI for Parent and Submodules

on: [push, pull_request]

jobs:
# Builds the project in windows, ubuntu and macos
build:
# Build and test modules with a matrix strategy for OS and module paths
build-and-test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
module:
- name: "parent-module"
path: ". -N"
- name: "CryptoAnalysis"
path: "CryptoAnalysis"
- name: "HeadlessJavaScanner"
path: "HeadlessJavaScanner"
runs-on: ${{ matrix.os }}
name: Project build in ${{ matrix.os }}
name: Build and test ${{ matrix.module.name }} on ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
# Sets up Java version
- name: Set up Java

- name: Set up Java 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-package: jdk
java-version: '11'
# Sets up Maven version
distribution: 'adopt'

- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.6.3
# Restores Maven dependecies
- name: Restore local Maven repository

- name: Restore Maven dependencies
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run maven command
run: mvn clean verify
- name: Build and test ${{ matrix.module.name }}
run: mvn -f ${{ matrix.module.path }} clean install


# HeadlessAndroidScanner module build and test
android-module:
runs-on: ubuntu-latest
needs: build-and-test
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Set up Java 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: List Android platforms
run: |
ls -lhR $ANDROID_SDK_ROOT/platforms/
- name: Copy Android platforms to test resources
run: |
cp -R $ANDROID_SDK_ROOT/platforms/* HeadlessAndroidScanner/src/test/resources/platforms/
- name: Build Android module (skip tests)
run: mvn clean install -DskipTests

- name: Test Android module
run: mvn -f HeadlessAndroidScanner test

0 comments on commit f237b3a

Please sign in to comment.