69 lines (58 loc) · 1.67 KB
/
run-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
63
64
65
66
67
68
69
name: CI Test for GEF
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
jobs:
build:
name: "Run Unit tests"
runs-on: [ubuntu-20.04]
defaults:
run:
shell: bash
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install python and toolchain
run: |
sudo apt-get update
sudo apt-get install -y gdb-multiarch python3-dev python3-pip python3-wheel python3-setuptools git cmake gcc g++ pkg-config libglib2.0-dev
sudo python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(python3 -m pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
id: cache-deps
env:
cache-name: cache-deps
with:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
path: |
${{ steps.pip-cache.outputs.dir }}
restore-keys:
${{ runner.os }}-pip-${{ env.cache-name }}-
${{ runner.os }}-pip-
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-
- name: Install Python modules (Capstone, Keystone, Unicorn, Ropper)
run: |
mkdir -p ${{ steps.pip-cache.outputs.dir }}
python3 -m pip install --user --upgrade -r ./requirements.txt
- name: Setup GEF
run: |
echo "source $(pwd)/gef.py" > ~/.gdbinit
gdb -q -ex 'gef missing' -ex 'gef help' -ex 'gef config' -ex start -ex continue -ex quit /bin/pwd
- name: Run linter
run: |
make lint
- name: Run Tests
run: |
make test