Add basic BIER elements #594
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ CI | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CXXFLAGS: -std=gnu++17 | |
FLAGS: --enable-all-elements --disable-verbose-batch --enable-simtime | |
#For DPDK | |
STABLE: | |
VERSION: 20.11 | |
#Until we find a solution for the world-writable /home/runner in GitHub Actions... | |
NODPDKTEST: 1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
COMPILER: [gcc, clang] | |
FRAMEWORK: [vanilla, dpdk, dpdk-light, netmap, vanilla-nopool, dpdk-flow-dynamic] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- name: Cache Python Packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip/ | |
key: ${{ runner.os }}-pip | |
- name: Set up Clang | |
if: ${{ matrix.COMPILER == 'clang' }} | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: latest | |
platform: x64 | |
- name: Cache DPDK | |
if: matrix.FRAMEWORK == 'dpdk' || matrix.FRAMEWORK == 'dpdk-light' || matrix.FRAMEWORK == 'dpdk-flow-dynamic' | |
id: cache-dpdk | |
uses: actions/cache@v3 | |
with: | |
path: dpdk-20.11 | |
key: ${{ runner.os }}-dpdk-default | |
- name: Build DPDK | |
if: ${{ steps.cache-dpdk.outputs.cache-hit != 'true' && (matrix.FRAMEWORK == 'dpdk' || matrix.FRAMEWORK == 'dpdk-light' || matrix.FRAMEWORK == 'dpdk-flow-dynamic') }} | |
run: | | |
wget http://fast.dpdk.org/rel/dpdk-$VERSION.tar.gz && | |
tar -zxf dpdk-$VERSION.tar.gz && | |
cd dpdk-$STABLE$VERSION && | |
pip3 install meson ninja && | |
meson -Dprefix=$(pwd)/install/ -Dmachine=default build && | |
cd build && | |
ninja && | |
ninja install && | |
cd .. && | |
cd .. ; | |
- name: framework | |
run: | | |
if [ "${{matrix.FRAMEWORK}}" = "dpdk" -o "${{matrix.FRAMEWORK}}" = "dpdk-light" -o "${{matrix.FRAMEWORK}}" = "dpdk-flow-dynamic" ] ; then | |
echo "Setting DPDK variables..." ; | |
export FRAMEWORK_FLAGS="--enable-dpdk --enable-user-multithread"; | |
export PKG_CONFIG_PATH=$(pwd)/dpdk-$STABLE$VERSION/install/lib/x86_64-linux-gnu/pkgconfig/ ; | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/dpdk-$STABLE$VERSION/install/lib/x86_64-linux-gnu/ ; | |
fi | |
if [ "${{matrix.FRAMEWORK}}" = "dpdk-light" ] ; then | |
FRAMEWORK_FLAGS="$FRAMEWORK_FLAGS --enable-dpdk-packet --disable-clone --disable-task-stats --disable-cpu-load --disable-dpdk-softqueue" | |
fi | |
if [ "${{matrix.FRAMEWORK}}" = "dpdk-flow-dynamic" ] ; then | |
FRAMEWORK_FLAGS="$FRAMEWORK_FLAGS --enable-flow-dynamic" | |
fi | |
if [ "${{matrix.FRAMEWORK}}" = "netmap" ] ; then | |
if [ ! -e "netmap-13.0" ] ; then | |
wget https://github.com/luigirizzo/netmap/archive/refs/tags/v13.0.tar.gz | |
tar -zxf v13.0.tar.gz | |
fi | |
FRAMEWORK_FLAGS="--with-netmap=$(pwd)/netmap-13.0/sys/" | |
fi | |
if [ "${{matrix.FRAMEWORK}}" = "vanilla-nopool" ] ; then | |
FRAMEWORK_FLAGS="$FRAMEWORK_FLAGS --disable-click-pool" | |
fi | |
echo "FRAMEWORK_FLAGS=$FRAMEWORK_FLAGS" >> $GITHUB_ENV | |
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
- name: Compiler version | |
run: ${{matrix.COMPILER}} -v | |
- name: configure | |
run: | | |
if [ "${{matrix.COMPILER}}" = "clang" ] ; then export CC=clang; export CXX=clang++; fi | |
./configure $FLAGS $FRAMEWORK_FLAGS | |
- name: make | |
run: make | |
#Simple launch avoids going further if something very bad happens | |
- name: simple_launch | |
run: ( chmod 700 /home/runner || exit 0 ) ; ./userlevel/click -j 2 -e 'DriverManager(stop);' | |
- name: make check | |
run: make check |