From ba9a830a5fd36d0b0708f6dcc7c9678f6b41ba4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leander=20M=C3=BCller-Osten?= Date: Wed, 26 Jun 2024 14:17:41 +0200 Subject: [PATCH] testing pipeline --- .github/prepare_ubuntu.sh | 7 ---- .github/workflows/build.yml | 69 ++++++++++++++++++++++++++++++++++ .github/workflows/makefile.yml | 49 ------------------------ 3 files changed, 69 insertions(+), 56 deletions(-) delete mode 100755 .github/prepare_ubuntu.sh create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/makefile.yml diff --git a/.github/prepare_ubuntu.sh b/.github/prepare_ubuntu.sh deleted file mode 100755 index 944b1a1..0000000 --- a/.github/prepare_ubuntu.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -x -set -e - -apt-get update -apt-get -y install libsnmp-dev diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..76bc75f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,69 @@ +name: Build check_interfaces + +on: + pull_request: + branches: ["*"] + +jobs: + build: + runs-on: ubuntu-latest + env: + CFLAGS: "-Wall" + + steps: + - uses: actions/checkout@v4 + + - 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 + + - 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 diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml deleted file mode 100644 index ddfb28e..0000000 --- a/.github/workflows/makefile.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Makefile CI - -on: - push: - branches: [ "*" ] - pull_request: - branches: [ "*" ] - -jobs: - build: - runs-on: ubuntu-latest - env: - CFLAGS: "-Wall" - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo .github/prepare_ubuntu.sh - - - name: configure - run: | - autoreconf - ./configure - - - name: Make - run: make - - clang-build: - runs-on: ubuntu-latest - env: - CC: clang - CFLAGS: "-Wall" - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo .github/prepare_ubuntu.sh - - - name: configure - run: | - autoreconf - ./configure - - - name: Make - run: make