-
Notifications
You must be signed in to change notification settings - Fork 26
110 lines (92 loc) · 3.27 KB
/
hdtn_test_workflow.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
name: C/C++ CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
ubuntu-x64-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Display Test Start
run: |
echo "============================================================="
echo "Run #${GITHUB_RUN_NUMBER}"
echo "Run ID: ${GITHUB_RUN_ID}"
echo "Testing: ${GITHUB_REPOSITORY}"
echo "Triggered by: ${GITHUB_EVENT_NAME}"
echo "Initiated by: ${GITHUB_ACTOR}"
echo "============================================================="
- name: Install Dependencies
run: |
sudo apt-get install cmake
sudo apt-get install build-essential
sudo apt-get install libboost-dev libboost-all-dev
sudo apt-get install libzmq3-dev python3-zmq
sudo apt-get install openssl libssl-dev
- name: Build HDTN
run: |
export HDTN_SOURCE_ROOT=$PWD
cd $HDTN_SOURCE_ROOT
mkdir build
cd build
cmake ..
make -j8
- name: Unit Tests
run: |
export HDTN_SOURCE_ROOT=$PWD
cd $HDTN_SOURCE_ROOT/build
./tests/unit_tests/unit-tests
- name: Integration Tests
run: |
export HDTN_SOURCE_ROOT=$PWD
cd $HDTN_SOURCE_ROOT/build
./tests/integrated_tests/integrated-tests
debian-x64-test:
runs-on: [self-hosted, Linux, X64, debian]
steps:
- uses: actions/checkout@v3
- name: Display Test Start
run: |
echo "============================================================="
echo "Run #${GITHUB_RUN_NUMBER}"
echo "Run ID: ${GITHUB_RUN_ID}"
echo "Testing: ${GITHUB_REPOSITORY}"
echo "Triggered by: ${GITHUB_EVENT_NAME}"
echo "Initiated by: ${GITHUB_ACTOR}"
echo "============================================================="
- name: Build HDTN
run: |
export HDTN_SOURCE_ROOT=/home/hdtn/HDTN_LATEST/HDTN
cd $HDTN_SOURCE_ROOT
git pull
cd $HDTN_SOURCE_ROOT/build
cmake ..
make -j8
- name: Unit Tests
run: |
export HDTN_SOURCE_ROOT=/home/hdtn/HDTN_LATEST/HDTN
cd $HDTN_SOURCE_ROOT/build
./tests/unit_tests/unit-tests
- name: Integration Tests
run: |
export HDTN_SOURCE_ROOT=/home/hdtn/HDTN_LATEST/HDTN
cd $HDTN_SOURCE_ROOT/build
./tests/integrated_tests/integrated-tests
coverity-test:
runs-on: [self-hosted, Linux, X64, cov-analysis]
steps:
- uses: actions/checkout@v3
- name: Coverity Scan
run: |
export PATH=/home/hdtn/cov-analysis-linux64-2022.6.1/bin:$PATH
export HDTN_SOURCE_ROOT=/home/hdtn/HDTN_LATEST/HDTN
cd $HDTN_SOURCE_ROOT
git pull
cd $HDTN_SOURCE_ROOT/build
rm -rf idir
make clean
cov-build --dir idir make -j8
cov-analyze --dir idir --all --enable-constraint-fpp --enable-fnptr --enable-virtual --strip-path $HDTN_SOURCE_ROOT
cov-commit-defects --dir idir --url ${{secrets.COVERITY_BUILD}} --stream HDTN-master --auth-key-file /home/hdtn/auth.key