-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |