summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build-and-install.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build-and-install.yml')
-rw-r--r--.github/workflows/build-and-install.yml201
1 files changed, 201 insertions, 0 deletions
diff --git a/.github/workflows/build-and-install.yml b/.github/workflows/build-and-install.yml
new file mode 100644
index 0000000..26a144a
--- /dev/null
+++ b/.github/workflows/build-and-install.yml
@@ -0,0 +1,201 @@
+---
+name: Builder
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+jobs:
+ static-build:
+ name: Build (x86_64)
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git clone repository
+ uses: actions/checkout@v2
+ - run: |
+ git fetch --prune --unshallow --tags
+ - name: Build
+ run: |
+ .github/scripts/build-static-x86_64.sh
+ source-build:
+ name: Build & Install
+ strategy:
+ fail-fast: false
+ matrix:
+ distro:
+ - 'alpine:edge'
+ - 'alpine:3.13'
+ - 'alpine:3.12'
+ - 'alpine:3.11'
+ - 'alpine:3.10'
+ - 'archlinux:latest'
+ - 'centos:8'
+ - 'centos:7'
+ - 'clearlinux:latest'
+ - 'debian:10'
+ - 'debian:9'
+ - 'fedora:33'
+ - 'fedora:32'
+ - 'opensuse/leap:15.2'
+ - 'opensuse/tumbleweed:latest'
+ - 'ubuntu:20.10'
+ - 'ubuntu:20.04'
+ - 'ubuntu:18.04'
+ - 'ubuntu:16.04'
+ include:
+ - distro: 'alpine:edge'
+ pre: 'apk add -U bash'
+ rmjsonc: 'apk del json-c-dev'
+ - distro: 'alpine:3.13'
+ pre: 'apk add -U bash'
+ rmjsonc: 'apk del json-c-dev'
+ - distro: 'alpine:3.12'
+ pre: 'apk add -U bash'
+ rmjsonc: 'apk del json-c-dev'
+ - distro: 'alpine:3.11'
+ pre: 'apk add -U bash'
+ rmjsonc: 'apk del json-c-dev'
+ - distro: 'alpine:3.10'
+ pre: 'apk add -U bash'
+ rmjsonc: 'apk del json-c-dev'
+
+ - distro: 'archlinux:latest'
+ pre: 'pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi'
+
+ - distro: 'centos:8'
+ rmjsonc: 'dnf remove -y json-c-devel'
+
+ - distro: 'debian:10'
+ pre: 'apt-get update'
+ rmjsonc: 'apt-get remove -y libjson-c-dev'
+ - distro: 'debian:9'
+ pre: 'apt-get update'
+ rmjsonc: 'apt-get remove -y libjson-c-dev'
+
+ - distro: 'fedora:33'
+ rmjsonc: 'dnf remove -y json-c-devel'
+ - distro: 'fedora:32'
+ rmjsonc: 'dnf remove -y json-c-devel'
+
+ - distro: 'opensuse/leap:15.2'
+ rmjsonc: 'zypper rm -y libjson-c-devel'
+ - distro: 'opensuse/tumbleweed:latest'
+ rmjsonc: 'zypper rm -y libjson-c-devel'
+
+ - distro: 'ubuntu:20.10'
+ pre: 'apt-get update'
+ rmjsonc: 'apt-get remove -y libjson-c-dev'
+ - distro: 'ubuntu:20.04'
+ pre: 'apt-get update'
+ rmjsonc: 'apt-get remove -y libjson-c-dev'
+ - distro: 'ubuntu:18.04'
+ pre: 'apt-get update'
+ rmjsonc: 'apt-get remove -y libjson-c-dev'
+ - distro: 'ubuntu:16.04'
+ pre: 'apt-get update'
+ rmjsonc: 'apt-get remove -y libjson-c-dev'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git clone repository
+ uses: actions/checkout@v2
+ - name: install-required-packages.sh on ${{ matrix.distro }}
+ env:
+ PRE: ${{ matrix.pre }}
+ RMJSONC: ${{ matrix.rmjsonc }}
+ run: |
+ echo $PRE > ./prep-cmd.sh
+ echo $RMJSONC > ./rmjsonc.sh && chmod +x ./rmjsonc.sh
+ docker build . -f .github/dockerfiles/Dockerfile.build_test -t test --build-arg BASE=${{ matrix.distro }}
+ - name: Regular build on ${{ matrix.distro }}
+ run: |
+ docker run -w /netdata test /bin/sh -c 'autoreconf -ivf && ./configure && make -j2'
+ - name: netdata-installer on ${{ matrix.distro }}, disable cloud
+ run: |
+ docker run -w /netdata test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --disable-cloud'
+ - name: netdata-installer on ${{ matrix.distro }}, require cloud
+ run: |
+ docker run -w /netdata test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
+ - name: netdata-installer on ${{ matrix.distro }}, require cloud, no JSON-C
+ if: matrix.rmjsonc != ''
+ run: |
+ docker run -w /netdata test \
+ /bin/sh -c '/netdata/rmjsonc.sh && ./netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
+ aws-kinesis-build:
+ name: With AWS Kinesis SDK
+ strategy:
+ fail-fast: false
+ matrix:
+ distro:
+ - 'centos:8'
+ - 'debian:buster'
+ - 'fedora:32'
+ - 'ubuntu:20.04'
+ include:
+ - distro: 'centos:8'
+ pre: >-
+ yum -y update &&
+ yum -y groupinstall 'Development Tools' &&
+ yum -y install libcurl-devel openssl-devel libuuid-devel
+ build_kinesis: >-
+ git clone https://github.com/aws/aws-sdk-cpp.git &&
+ cmake -DCMAKE_INSTALL_PREFIX=/usr
+ -DBUILD_ONLY=kinesis
+ ./aws-sdk-cpp &&
+ make &&
+ make install
+ - distro: 'debian:buster'
+ pre: >-
+ apt-get update &&
+ DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential &&
+ DEBIAN_FRONTEND=noninteractive apt-get install -y libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev libpulse-dev
+ build_kinesis: >-
+ git clone https://github.com/aws/aws-sdk-cpp.git &&
+ cmake -DCMAKE_INSTALL_PREFIX=/usr
+ -DBUILD_ONLY=kinesis
+ ./aws-sdk-cpp &&
+ make &&
+ make install
+ - distro: 'fedora:32'
+ pre: >-
+ dnf -y update &&
+ dnf -y groupinstall 'Development Tools' &&
+ dnf -y install libcurl-devel openssl-devel libuuid-devel
+ build_kinesis: >-
+ git clone https://github.com/aws/aws-sdk-cpp.git &&
+ cmake -DCMAKE_INSTALL_PREFIX=/usr
+ -DBUILD_ONLY=kinesis
+ ./aws-sdk-cpp &&
+ make &&
+ make install
+ - distro: 'ubuntu:20.04'
+ pre: >-
+ apt-get update &&
+ DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential &&
+ DEBIAN_FRONTEND=noninteractive apt-get install -y libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev libpulse-dev
+ build_kinesis: >-
+ git clone https://github.com/aws/aws-sdk-cpp.git &&
+ cmake -DCMAKE_INSTALL_PREFIX=/usr
+ -DBUILD_ONLY=kinesis
+ ./aws-sdk-cpp &&
+ make &&
+ make install
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git clone repository
+ uses: actions/checkout@v2
+ - name: install-required-packages.sh on ${{ matrix.distro }}
+ env:
+ PRE: ${{ matrix.pre }}
+ BUILD_KINESIS: ${{ matrix.build_kinesis }}
+ run: |
+ echo $PRE > ./prep-cmd.sh
+ echo $BUILD_KINESIS > ./build-kinesis.sh && chmod +x ./build-kinesis.sh
+ docker build . -f .github/dockerfiles/Dockerfile.build_test -t test --build-arg BASE=${{ matrix.distro }}
+ - name: Build on ${{ matrix.distro }}
+ env:
+ RUNCMD: >-
+ ./build-kinesis.sh &&
+ ./netdata-installer.sh --dont-wait --dont-start-it --enable-backend-kinesis
+ run: |
+ docker run -w /netdata test \
+ /bin/sh -c "$RUNCMD"