Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/dash-bmv2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/dockerfiles/Dockerfile.*'
- '!dash-pipeline/py_model*'
- 'dash-pipeline/dockerfiles/*.env'
- '!dash-pipeline/.dockerignore'
- '!dash-pipeline/**.md'
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/dash-pymodel-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: DASH-PYMODEL-CI

on:
push:
branches: [ "**" ]
paths:
- '.gitmodules'
- '.github/workflows/dash-pymodel-ci.yml'
- 'test/**.py'
- 'test/**requirements.txt'
- 'test/**.sh'
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/dockerfiles/Dockerfile.*'
- '!dash-pipeline/bmv2*'
- '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-pymodel-ci.yml'
- 'test/**.py'
- 'test/**requirements.txt'
- 'test/**.sh'
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/dockerfiles/Dockerfile.*'
- '!dash-pipeline/bmv2*'
- '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 Python DASH Pipeline
runs-on: ubuntu-22.04
env:
docker_fg_flags: --privileged
docker_fg_root_flags: --privileged -u root
docker_bg_root_flags: -d --privileged -u root
docker_bg_flags: -d --privileged
defaults:
run:
working-directory: ./dash-pipeline
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Upgrade pip tooling
run: python -m pip install --upgrade pip setuptools wheel
- name: Install pymodel Python dependencies
run: python -m pip install -r py_model/requirements.txt
- name: Build python based pymodel artifacts
run: make py-artifacts
- name: Update SAI submodule
run: git submodule update --init
- name: Pull/Build docker saithrift-bldr image
run: make docker-saithrift-bldr
- name: Pull/Build docker pymodel-bldr image
run: make docker-pymodel-bldr
- name: Generate SAI API
run: DOCKER_FLAGS=$docker_fg_flags make sai TARGET=pymodel
- name: Run pymodel
run: DOCKER_FLAGS=$docker_bg_root_flags make run-pymodel HAVE_DPAPP=y
- name: Pull/Build docker dpapp image
run: make docker-dash-dpapp
- name: Build dpapp
run: DOCKER_FLAGS=$docker_fg_flags make dpapp TARGET=pymodel
- name: Check if SAI spec is updated
run: DOCKER_FLAGS=$docker_fg_flags make check-sai-spec
- name: Prepare network
run: DOCKER_FLAGS=$docker_fg_flags make network HAVE_DPAPP=y
- name: Run dpapp
run: DOCKER_FLAGS=$docker_bg_flags make run-dpapp TARGET=pymodel
- 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 TARGET=pymodel
- name: Run PTF Tests
run: DOCKER_FLAGS=$docker_fg_root_flags make run-saithrift-ptftests

- uses: azure/docker-login@v1
if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
with:
login-server: sonicdash.azurecr.io
username: ${{ secrets.DASH_ACR_USERNAME }}
password: ${{ secrets.DASH_ACR_PASSWORD }}
- name: Publish DASH pymodel builder base docker image
run: make docker-publish-pymodel-bldr
if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ __pycache__/
.pytest_cache/
dash-pipeline/bmv2/dash_pipeline.bmv2/
dash-pipeline/dpdk-pna/dash_pipeline.dpdk
dash-pipeline/py_model/dash_pipeline.py_model/
dash-pipeline/py_model/p4_helper/v1/__pycache__/
dash-pipeline/py_model/p4_helper/config/__pycache__/
dash-pipeline/SAI/lib/
dash-pipeline/SAI/rpc/
dash-pipeline/dpapp/build
10 changes: 9 additions & 1 deletion .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ CloudStorm
cloudstorm
CNIP
codebase
codegen
collaterals
compat
Compat
Expand All @@ -105,7 +106,9 @@ confgen
config
configs
configurated
Conntrack
conntrack
ConntrackIn
ConntrackOut
Containerlab
CP
CPUs
Expand Down Expand Up @@ -236,6 +239,7 @@ ENIs
ENI's
enqueue
enqueues
entrypoint
entrypoints
enum
EPUs
Expand Down Expand Up @@ -504,6 +508,8 @@ PTF
ptf
ptftests
py
py_model
pymodel
PyPi
pytest
PyTest
Expand Down Expand Up @@ -545,6 +551,7 @@ RJ
Roadmap
roadmap
routable
rpc
RPC
RPCs
RPF
Expand Down Expand Up @@ -665,6 +672,7 @@ TEP
testability
testbed
testbeds
textproto
TGen
Tgen
Tgens
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![DASH-bmv2-CI](https://github.com/sonic-net/DASH/workflows/DASH-BMV2-CI/badge.svg?branch=main)](https://github.com/sonic-net/DASH/actions/workflows/dash-bmv2-ci.yml)
[![DASH-pymodel-CI](https://github.com/sonic-net/DASH/workflows/DASH-pymodel-CI/badge.svg?branch=main)](https://github.com/sonic-net/DASH/actions/workflows/dash-pymodel-ci.yml)
[![Spellcheck](https://github.com/sonic-net/DASH/actions/workflows/dash-md-spellcheck.yml/badge.svg)](https://github.com/sonic-net/DASH/actions/workflows/dash-md-spellcheck.yml)

# SONiC-DASH - Disaggregated API for SONiC Hosts - extending functionality to stateful workloads!
Expand Down
60 changes: 60 additions & 0 deletions assets/CI-badge-pymodel-failing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions assets/CI-badge-pymodel-passing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading