Skip to content

Commit

Permalink
Removed Mirroring Functionality.
Browse files Browse the repository at this point in the history
Added new line at end of files.
Removed comments.

Cleaned pna_nic_CLI.py: cleaned load_pna_json function

added workflow test_on_test_branch.yml

added workflow test_on_test_branch.yml - second time

added workflow test_on_test_branch.yml - third time
  • Loading branch information
rupesh-chiluka-marvell committed Jun 19, 2024
1 parent a8e2947 commit e4577af
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/test_on_test_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Test

on:
push:
branches:
- pna_dev_test
- pna_dev_v1

jobs:
check-changes:
name: Check whether tests need to be run based on diff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: antrea-io/has-changes@v2
id: check_diff
with:
paths-ignore: docs/* *.md
outputs:
has_changes: ${{ steps.check_diff.outputs.has_changes }}

test:
needs: check-changes
if: ${{ needs.check-changes.outputs.has_changes == 'yes' }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- cxx: g++
cc: gcc
- cxx: clang++-8
cc: clang-8
- cxx: clang++-10
cc: clang-10
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build test Docker image
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
docker build -t bm --build-arg IMAGE_TYPE=test --build-arg CC=$CC --build-arg CXX=$CXX --build-arg GCOV=$GCOV .
- name: Run tests
run: |
ci_env=`bash <(curl -s https://codecov.io/env)`
docker run --rm $ci_env --env GCOV -w /behavioral-model bm /bin/bash -c "make check -j$(nproc) && ./ci/codecov.sh"
- name: Check style
run: |
./tools/check_style.sh
test-no-pi:
needs: check-changes
if: ${{ needs.check-changes.outputs.has_changes == 'yes' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build Dockerfile.noPI image
run: docker build -t bm-no-pi --build-arg IMAGE_TYPE=test -f Dockerfile.noPI .
- name: Run tests
run: docker run --rm -w /behavioral-model bm-no-pi /bin/bash -c "make check -j$(nproc)"

test-ubuntu22:
needs: check-changes
if: ${{ needs.check-changes.outputs.has_changes == 'yes' }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: sudo ./install_deps_ubuntu_22.04.sh
- name: Build BMv2
run: |
./autogen.sh
./configure --with-pdfixed --with-pi --with-stress-tests --enable-debugger --enable-Werror
make -j$(nproc)
- name: Run tests
run: make check -j$(nproc)

57 changes: 57 additions & 0 deletions confdefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* confdefs.h */
#define PACKAGE_NAME "bm"
#define PACKAGE_TARNAME "bm"
#define PACKAGE_VERSION "1.15.0-9631fc66"
#define PACKAGE_STRING "bm 1.15.0-9631fc66"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL ""
#define PACKAGE "bm"
#define VERSION "1.15.0-9631fc66"
#define DEBUG_ON /**/
#define LOG_DEBUG_ON /**/
#define LOG_TRACE_ON /**/
#define ELOG_ON /**/
#define WP4_16_STACKS /**/
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define STDC_HEADERS 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define HAVE_CXX11 1
#define THRIFT_ON /**/
#define THRIFT_VERSION 1300
#define HAVE_PI_PI_H 1
#define HAVE_PI_TARGET_PI_IMP_H 1
#define HAVE_PI_P4INFO_H 1
#define HAVE_ALGORITHM 1
#define HAVE_ARRAY 1
#define HAVE_CASSERT 1
#define HAVE_CMATH 1
#define HAVE_QUEUE 1
#define HAVE_CSTDIO 1
#define HAVE_STRING 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_CTIME 1
#define HAVE_TUPLE 1
#define HAVE_UNISTD_H 1
#define HAVE_UNORDERED_MAP 1
#define HAVE_UTILITY 1
#define HAVE_VECTOR 1
#define HAVE_LIBNANOMSG 1
#define NANOMSG_ON /**/
#define HAVE_PTHREAD_PRIO_INHERIT 1
#define HAVE_PTHREAD 1
#define HAVE_LIBGMP 1
#define HAVE_LIBPCAP 1
#define HAVE_DLFCN_H 1
#define HAVE_DLOPEN /**/
#define ENABLE_MODULES /**/
#define HAVE_LIBBOOST_THREAD 1
2 changes: 2 additions & 0 deletions targets/pna_nic/pna_nic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

extern int import_primitives();

extern int import_primitives();

namespace bm {

namespace pna {
Expand Down

0 comments on commit e4577af

Please sign in to comment.