-
Notifications
You must be signed in to change notification settings - Fork 93
107 lines (105 loc) · 3.99 KB
/
dash-bmv2-ci.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
100
101
102
103
104
105
106
107
name: DASH-BMV2-CI
on:
push:
branches: [ "**" ]
paths:
- '.gitmodules'
- '.github/workflows/dash-bmv2-ci.yml'
- 'test/**.py'
- 'test/**requirements.txt'
- 'test/**.sh'
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/dockerfiles/Dockerfile.*'
- 'dash-pipeline/dockerfiles/*.env'
- '!dash-pipeline/.dockerignore'
- '!dash-pipeline/**.md'
- '!dash-pipeline/**.svg'
- '!dash-pipeline/**.png'
- '!dash-pipeline/**.txt'
pull_request:
branches: [ "**" ]
paths:
- '.gitmodules'
- '.github/workflows/dash-bmv2-ci.yml'
- 'test/**.py'
- 'test/**requirements.txt'
- 'test/**.sh'
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/dockerfiles/Dockerfile.*'
- 'dash-pipeline/dockerfiles/*.env'
- '!dash-pipeline/.dockerignore'
- '!dash-pipeline/**.md'
- '!dash-pipeline/**.svg'
- '!dash-pipeline/**.png'
- '!dash-pipeline/**.txt'
workflow_dispatch:
jobs:
build:
name: Build and Test DASH Pipeline
runs-on: ubuntu-20.04
env:
docker_fg_flags: --privileged
docker_fg_root_flags: --privileged -u root
docker_bg_flags: -d --privileged
defaults:
run:
working-directory: ./dash-pipeline
steps:
- uses: actions/checkout@v3
- name: Pull docker p4c image
run: make docker-dash-p4c
- name: Build P4 software switch (bmv2) and P4Info
run: DOCKER_FLAGS=$docker_fg_flags make p4
- name: Install SAI submodule
run: git submodule update --init
- name: Pull/Build docker saithrift-bldr image
run: make docker-saithrift-bldr
- name: Pull/Build docker bmv2-bldr image
run: make docker-bmv2-bldr
- name: Generate SAI API
run: DOCKER_FLAGS=$docker_fg_flags make sai
- name: Pull/Build docker dpapp image
run: make docker-dash-dpapp
- name: Build bmv2 dpapp
run: DOCKER_FLAGS=$docker_fg_flags make dpapp
- name: Check if SAI spec is updated
run: DOCKER_FLAGS=$docker_fg_flags make check-sai-spec
- name: Build libsai c++ tests
run: DOCKER_FLAGS=$docker_fg_flags make test
- name: Prepare network
run: DOCKER_FLAGS=$docker_fg_flags make network HAVE_DPAPP=y
- name: Run P4 software switch (bmv2) with P4Runtime
run: DOCKER_FLAGS=$docker_bg_flags make run-switch HAVE_DPAPP=y
- name: Force bmv2 to load forwarding pipeline config via dummy libsai call
run: DOCKER_FLAGS=$docker_fg_flags make init-switch
- name: Test SAI library over P4RT to switch
run: DOCKER_FLAGS=$docker_fg_flags make run-libsai-test
- name: Run dpapp
run: DOCKER_FLAGS=$docker_bg_flags make run-dpapp HAVE_DPAPP=y
- name: Generate saithrift-server
run: DOCKER_FLAGS=$docker_fg_flags make saithrift-server
- name: Generate saithrift-client local docker
run: DOCKER_FLAGS=$docker_fg_flags make docker-saithrift-client
- name: Run saithrift server
run: DOCKER_FLAGS=$docker_bg_flags make run-saithrift-server
- name: Run PTF Tests
run: DOCKER_FLAGS=$docker_fg_root_flags make run-saithrift-ptftests
- name: Deploy ixia-c Traffic Generator
run: DOCKER_FLAGS=$docker_fg_flags make deploy-ixiac
- name: Run Pytests
run: DOCKER_FLAGS=$docker_fg_root_flags make run-saithrift-pytests
- name: Pull/Build SAI-Challenger client builder docker image
run: DOCKER_FLAGS=$docker_fg_flags make docker-saichallenger-client-bldr
- name: Build SAI-Challenger client docker image
run: DOCKER_FLAGS=$docker_fg_flags make docker-saichallenger-client
- name: Run SAI-Challenger Tests
run: DOCKER_FLAGS=$docker_fg_root_flags make run-saichallenger-tests
- name: Build libsai debian packages
run: DOCKER_FLAGS=$docker_fg_root_flags make libsai-debs
- uses: actions/upload-artifact@v3
with:
name: libsai-debian-packages
path: /home/runner/work/DASH/DASH/dash-pipeline/SAI/debian/*deb
if-no-files-found: error