137 lines
4.7 KiB
YAML
137 lines
4.7 KiB
YAML
---
|
|
name: Builder
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request: null
|
|
env:
|
|
DO_NOT_TRACK: 1
|
|
jobs:
|
|
static-build:
|
|
name: Static Build
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
arch:
|
|
- 'x86_64'
|
|
steps:
|
|
- name: Git clone repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
- name: Build
|
|
run: .github/scripts/build-static.sh ${{ matrix.arch }}
|
|
source-build:
|
|
name: Build & Install
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 8
|
|
matrix:
|
|
distro:
|
|
- 'alpine:edge'
|
|
- 'alpine:3.14'
|
|
- 'alpine:3.13'
|
|
- 'alpine:3.12'
|
|
- 'alpine:3.11'
|
|
- 'archlinux:latest'
|
|
- 'centos:8'
|
|
- 'centos:7'
|
|
- 'debian:bullseye' # 11
|
|
- 'debian:10'
|
|
- 'debian:9'
|
|
- 'fedora:34'
|
|
- 'fedora:33'
|
|
- 'opensuse/leap:15.2'
|
|
- 'opensuse/leap:15.3'
|
|
- 'opensuse/tumbleweed:latest'
|
|
- 'ubuntu:21.04'
|
|
- 'ubuntu:20.04'
|
|
- 'ubuntu:18.04'
|
|
include:
|
|
- distro: 'alpine:edge'
|
|
pre: 'apk add -U bash'
|
|
rmjsonc: 'apk del json-c-dev'
|
|
- distro: 'alpine:3.14'
|
|
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: 'archlinux:latest'
|
|
pre: 'pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi'
|
|
|
|
- distro: 'centos:8'
|
|
rmjsonc: 'dnf remove -y json-c-devel'
|
|
|
|
- distro: 'debian:bullseye' # 11
|
|
pre: 'apt-get update'
|
|
rmjsonc: 'apt-get remove -y libjson-c-dev'
|
|
- 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:34'
|
|
rmjsonc: 'dnf remove -y json-c-devel'
|
|
- distro: 'fedora:33'
|
|
rmjsonc: 'dnf remove -y json-c-devel'
|
|
|
|
- distro: 'opensuse/leap:15.2'
|
|
rmjsonc: 'zypper rm -y libjson-c-devel'
|
|
- distro: 'opensuse/leap:15.3'
|
|
rmjsonc: 'zypper rm -y libjson-c-devel'
|
|
- distro: 'opensuse/tumbleweed:latest'
|
|
rmjsonc: 'zypper rm -y libjson-c-devel'
|
|
|
|
- distro: 'ubuntu:21.04'
|
|
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'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Git clone repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- 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, require ACLK-NG
|
|
run: |
|
|
docker run -w /netdata -e NETDATA_CONFIGURE_OPTIONS='--with-aclk-ng' 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'
|