forked from NETWAYS/check_interfaces
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (64 loc) · 1.84 KB
/
build.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
name: Build check_interfaces
on:
pull_request:
branches: ["*"]
jobs:
build:
runs-on: ubuntu-latest
env:
CFLAGS: "-Wall"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- name: Install pip packages
run: pip install -r .github/requirements.txt
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libsnmp-dev
- name: Configure
run: |
autoreconf
./configure
- name: Make
run: make
- name: Start simmulation
run: |
setup-snmpsim-data /tmp/data
snmpsim-command-responder --daemonize --pid-file /tmp/snmp --data-dir=/tmp/data/network/switch --agent-udpv4-endpoint=127.0.0.1:1611
- name: Sleep
run: sleep 30s
shell: bash
- name: check_cisco_health
run: ./check_interfaces -h 127.0.0.1 --port=1611 -c cisco-c3560
clang-build:
runs-on: ubuntu-latest
env:
CC: clang
CFLAGS: "-Wall"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- name: Install pip packages
run: pip install -r .github/requirements.txt
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libsnmp-dev
- name: Configure
run: |
autoreconf
./configure
- name: Make
run: make
- name: Start simmulation
run: |
setup-snmpsim-data /tmp/data
snmpsim-command-responder --daemonize --pid-file /tmp/snmp --data-dir=/tmp/data/network/switch --agent-udpv4-endpoint=127.0.0.1:1611
- name: Sleep
run: sleep 30s
shell: bash
- name: check_cisco_health
run: ./check_interfaces -h 127.0.0.1 --port=1611 -c cisco-c3560