Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions workflow to run fingerprint tests #219

Merged
merged 1 commit into from
May 9, 2024
Merged
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
125 changes: 125 additions & 0 deletions .github/workflows/fingerprint-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: "Run fingerprint tests"

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
workflow_dispatch:

jobs:

fingerprint-tests:

runs-on: ubuntu-latest

strategy:
matrix:
mode: ["debug", "release"]
fail-fast: false

steps:

- name: Checking out OMNeT++
uses: actions/checkout@v4
with:
repository: omnetpp/omnetpp
path: omnetpp
# Some (yet) unreleased changes after 6.0.3 are
# needed for the fingerprints to match.
ref: omnetpp-6.x

- name: Checking out INET
uses: actions/checkout@v4
with:
repository: inet-framework/inet
path: inet4.5
ref: v4.5.2

- name: Checking out Simu5G
uses: actions/checkout@v4
with:
path: Simu5G

- name: Creating ccache directory
run: mkdir -p /home/runner/work/ccache

- name: Restoring ccache cache
uses: actions/cache@v4
with:
path: /home/runner/work/ccache
key: native-${{ matrix.mode }}-ccache-${{ github.run_id }}
# See: https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
restore-keys: native-${{ matrix.mode }}-ccache

- name: Build and test
env:
MODE: ${{ matrix.mode }}
run: |
# This entire thing is a single script to make persisting
# the configured environment variables across steps easier.
# The log output is grouped at least, for better readability.

echo "::group::Installing dependency packages"
sudo apt update
sudo apt install -y --no-install-recommends git wget curl ca-certificates make \
ccache clang lld gdb bison flex perl doxygen graphviz libxml2-dev zlib1g-dev python3
echo "::endgroup::"

echo "::group::Configuring ccache"
export PATH=/usr/lib/ccache:$PATH
export CCACHE_DIR=/home/runner/work/ccache
echo "::endgroup::"

echo "::group::Running OMNeT++ setenv"
cd $GITHUB_WORKSPACE/omnetpp
cp configure.user.dist configure.user
. setenv -f
echo "::endgroup::"

echo "::group::Configuring OMNeT++"
./configure WITH_LIBXML=yes WITH_QTENV=no WITH_OSG=no WITH_OSGEARTH=no
echo "::endgroup::"

echo "::group::Building OMNeT++"
make MODE=$MODE -j $(nproc) base
echo "::endgroup::"

echo "::group::Running INET setenv"
cd $GITHUB_WORKSPACE/inet4.5
. setenv -f
echo "::endgroup::"

echo "::group::Making INET Makefiles"
make makefiles
echo "::endgroup::"

echo "::group::Building INET"
make MODE=$MODE -j $(nproc)
echo "::endgroup::"

echo "::group::Running Simu5G setenv"
cd $GITHUB_WORKSPACE/Simu5G
. setenv -f
echo "::endgroup::"

echo "::group::Making Simu5G Makefiles"
make makefiles
echo "::endgroup::"

echo "::group::Building Simu5G"
make MODE=$MODE -j $(nproc)
echo "::endgroup::"

echo "::group::Running fingerprint tests"
cd tests/fingerprint
if [ "$MODE" = "debug" ]; then
./fingerprints -d
else
./fingerprints
fi
echo "::endgroup::"