forked from Unipisa/Simu5G
-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (101 loc) · 3.42 KB
/
fingerprint-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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::"