]> granicus.if.org Git - icinga2/commitdiff
Actions: Add Ubuntu builds
authorMichael Friedrich <michael.friedrich@icinga.com>
Fri, 25 Oct 2019 11:16:55 +0000 (13:16 +0200)
committerGitHub <noreply@github.com>
Fri, 25 Oct 2019 11:16:55 +0000 (13:16 +0200)
.github/workflows/main-ubuntu.yml [new file with mode: 0644]

diff --git a/.github/workflows/main-ubuntu.yml b/.github/workflows/main-ubuntu.yml
new file mode 100644 (file)
index 0000000..2618c60
--- /dev/null
@@ -0,0 +1,44 @@
+name: CI
+
+on: [push]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Dependencies
+      run: |
+        apt-get -y install apt-transport-https wget gnupg
+        wget -O - https://packages.icinga.com/icinga.key | apt-key add -
+        . /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
+        echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
+        /etc/apt/sources.list.d/${DIST}-icinga.list
+        echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
+        /etc/apt/sources.list.d/${DIST}-icinga.list
+        apt-get update
+        apt-get -y install gdb vim git cmake make ccache build-essential libssl-dev bison flex default-libmysqlclient-dev libpq-dev libedit-dev libboost1.67-icinga-all-dev
+        ln -s /usr/bin/ccache /usr/local/bin/gcc
+        ln -s /usr/bin/ccache /usr/local/bin/g++
+    - name: Before Script
+      run: |
+        arch=$(uname -m)
+        mkdir debug && cd debug
+        >
+        cmake ..
+        -DCMAKE_BUILD_TYPE=Debug
+        -DICINGA2_UNITY_BUILD=Off
+        -DCMAKE_INSTALL_PREFIX=/tmp/icinga2
+        -DICINGA2_PLUGINDIR=/tmp/icinga2/sbin
+        -DBoost_NO_BOOST_CMAKE=TRUE
+        -DBoost_NO_SYSTEM_PATHS=TRUE
+        -DBOOST_LIBRARYDIR=/usr/lib/${arch}-linux-gnu/icinga-boost
+        -DBOOST_INCLUDEDIR=/usr/include/icinga-boost
+        -DCMAKE_INSTALL_RPATH=/usr/lib/${arch}-linux-gnu/icinga-boost
+    - name: Build
+      run: |
+         make
+         make test
+         make install