-
Notifications
You must be signed in to change notification settings - Fork 99
58 lines (50 loc) · 1.43 KB
/
build.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
# Config file for automatic testing using github actions
#
name: Unit_Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
verify-python:
name: Python code verification (src)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
make set-dev
python -m pip install scapy==2.4.5
- name: Verify code (python w/black)
run: |
make format-check
- name: Run pytests (utests/tests)
run: |
make test
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Dependencies
run: |
sudo apt-get install cmake libffi-dev ethtool python3-dev
# Install the latest pip version (not python3-pip) as older versions
# seem to have issues when installing from source.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py
sudo python3 -m pip install --upgrade setuptools nose2 scapy wheel
bash CI/install-nanomsg.sh
sudo ldconfig
bash CI/install-nnpy.sh
- name: Install
run: |
sudo python3 -m pip install .
- name: Before_script
run: |
cd ptf_nn/; sudo ./veth_setup.sh; cd ..
- name: Script
run: |
python3 CI/check-nnpy.py
./CI/run_tests.sh
sudo python3 /usr/local/bin/nose2 utests.tests.test