-
Notifications
You must be signed in to change notification settings - Fork 118
62 lines (55 loc) · 1.74 KB
/
acceptance-tests.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
name: Acceptance tests
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
GHIDRA_RELEASE_TAG: Ghidra_10.2.3_build
GHIDRA_VERSION: ghidra_10.2.3_PUBLIC_20230208
jobs:
acceptance-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and run docker image for cross compiling
run: |
pushd test/artificial_samples
docker build -t cross_compiling .
docker run --rm -v $(pwd)/build:/home/cwe/artificial_samples/build cross_compiling sudo python3 -m SCons
popd
pushd test/lkm_samples
./build.sh
- uses: actions/setup-java@v1
with:
java-version: "17.0.x"
java-package: jdk
architecture: x64
- name: Install Ghidra
run: |
wget https://github.com/NationalSecurityAgency/ghidra/releases/download/${GHIDRA_RELEASE_TAG}/${GHIDRA_VERSION}.zip
unzip -d ghidra ${GHIDRA_VERSION}.zip
mv ghidra/ghidra_* /opt/ghidra
rm ${GHIDRA_VERSION}.zip
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install cwe_checker
run: make all GHIDRA_PATH=/opt/ghidra
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-fail-fast -p acceptance_tests_ghidra -- --show-output --ignored --test-threads 1
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the docker image
run: docker build -t cwe_checker .
- name: Check functionality of the image
run: docker run --rm cwe_checker /bin/echo | grep -q CWE676