Make sure configured CFLAGS and LDFLAGS are used to build tools #177
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: DAG tests | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
pre_job: | |
name: Prerequisite checks | |
if: ${{ github.repository_owner == 'LibtraceTeam' }} | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
concurrent_skipping: 'same_content' | |
cancel_others: 'true' | |
run-tests-ubuntu: | |
name: DAG tests ${{ matrix.os }} ${{ matrix.c_compiler }},${{ matrix.cxx_compiler }} | |
needs: pre_job | |
if: ${{ needs.pre_job.outputs.should_skip != 'true' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
c_compiler: [gcc, clang] | |
cxx_compiler: [g++, clang++] | |
exclude: | |
- c_compiler: gcc | |
cxx_compiler: clang++ | |
- c_compiler: clang | |
cxx_compiler: g++ | |
steps: | |
- name: Setup Enviroment Variables | |
env: | |
CC: ${{ matrix.c_compiler }} | |
CXX: ${{ matrix.cxx_compiler }} | |
run: echo CC = $CC, CXX = $CXX | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt-get -y install flex bison libpcap0.8-dev libtool pkgconf autoconf automake m4 gcc clang llvm gcc-multilib uthash-dev | |
sudo apt-get -y install build-essential git | |
- name: Checkout DAG kernel module/packages | |
uses: actions/checkout@v3 | |
with: | |
path: dag-packages | |
repository: wanduow/dag-packages | |
ssh-key: ${{ secrets.DAG_PACKAGES }} | |
- name: Build DAG kernel module | |
run: | | |
cd dag-packages/kernel-module | |
sudo make -j 3 KSRC=/lib/modules/$(uname -r)/build | |
sudo make install KSRC=/lib/modules/$(uname -r)/build | |
- name: Install DAG packages | |
run: | | |
sudo apt-get -y install libhwloc-dev | |
cd dag-packages | |
sudo apt-key add DAG5.8.3-BIN-Ubuntu18.04/ENDACE_GPG_KEY | |
sudo apt-get -y install ./dag-extras/libhwloc5_1.11.9-1_amd64.deb | |
cd DAG5.8.3-BIN-Ubuntu18.04/ubuntu18.04 | |
sudo apt-get -y install ./dag-dev_5.8.3_amd64.deb ./dag-base_5.8.3_amd64.deb ./libntar_1.1.0_amd64.deb | |
sudo dagload -n 1 | |
sudo dagconfig -d16 rxstreams=4 | |
- name: Checkout Libtrace | |
uses: actions/checkout@v3 | |
with: | |
path: libtrace | |
submodules: recursive | |
- name: Build/Install Wandio | |
run: | | |
cd libtrace/wandio | |
./bootstrap.sh | |
./configure | |
make -j 3 | |
sudo make install | |
sudo ldconfig | |
- name: Build/Install Libwandder | |
run: | | |
cd libtrace/libwandder | |
./bootstrap.sh | |
./configure | |
make -j 3 | |
sudo make install | |
sudo ldconfig | |
- name: Build/Install Libtrace | |
run: | | |
cd libtrace | |
./bootstrap.sh | |
./configure CFLAGS="-I$(pwd)/../libbpf/include/uapi" --with-dag | |
make -j 3 | |
sudo make install | |
- name: Build Tests | |
run: cd libtrace/test; make -j 3 | |
- name: Run do-tests.sh | |
run: cd libtrace/test; ./do-tests.sh | |
- name: Run do-tests-parallel.sh | |
run: cd libtrace/test; ./do-tests-parallel.sh | |
- name: Run do-tests-datastruct.sh | |
run: cd libtrace/test; ./do-tests-datastruct.sh | |
- name: Run do-live-tests.sh | |
run: cd libtrace/test; sudo ./do-live-tests.sh dag |