-
Notifications
You must be signed in to change notification settings - Fork 40
99 lines (91 loc) · 3.08 KB
/
build_and_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build And Test (Basic)
description: Basic build and tests for the submodules on each push and pull request
on:
push:
pull_request:
types: [opened, reopened]
env:
JAVA_VERSION: 11
jobs:
# Build the CryptoAnalysis module and run its tests
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
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: Event name
run: echo ${{ github.event_name }}
- name: Run maven command
run: mvn clean verify -DrunAnalysisTests
# Build the HeadlessAndroidScanner module and run its tests
build-and-test-scanner-android:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
# Set up Java version
- name: Set up Java ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
# 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: List Android platforms
# run: |
# ls -lhR $ANDROID_SDK_ROOT/platforms/
# Setup Android SDK
- name: Setup Android SDK
uses: android-actions/setup-android@v2.0.10
with:
log-accepted-android-sdk-licenses: 'false'
- name: Copy Android platforms to test resources
run: |
mv $ANDROID_SDK_ROOT/platforms/* HeadlessAndroidScanner/src/test/resources/platforms/
- name: Run maven command
run: mvn clean verify -DrunAndroidTests
# Build the HeadlessJavaScanner module and run its tests using Soot
# as the static analysis framework
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
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