@cryptotaxi247 / netdata-1 / commits / 449f09bdf

General cleanup of GitHub Actions workflows. (#8383)

* Consolidate GHA workflows. This removes the installer workflow, which is duplicating checks that are already implicitly done in the build workflow, and then updates the build workflow so that it is appropriately named and does both a plain build and one using the installer. * Fix handling of Debian Jessie. * Split install-required-packages to a separate chekc step. This uses a new Dockerfile to build a base docker image for testing and check the install-required-packages.sh script at the same time. This should speed up the multiple build tests significantly. * Reenable CentOS 8 build checks. * Create dedicated directory for GHA dockerfiles. * Re-enable OpenSUSE build tests. * Remove build checks for distros that have no upstream support. * Rename workflow file.

Austin S. Hemmelgarn committed Mar 17, 2020 at 07:15 UTC 449f09bdf64a95a238cc43a110beb49c38930049
3 files changed +34 -87
.github/dockerfiles/Dockerfile.build_test new
+11
@@ -0,0 +1,11 @@
1 +ARG BASE
2 +
3 +FROM ${BASE}
4 +
5 +ARG PRE
6 +ENV PRE=${PRE}
7 +
8 +COPY . /netdata
9 +
10 +RUN /bin/sh /netdata/prep-cmd.sh
11 +RUN /netdata/packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata-all
.github/workflows/build-and-install.yml renamed
+23 -15
@@ -1,20 +1,17 @@
1 ---
2 -name: Installer
2 +name: Builder
3 on:
4 push:
5 branches:
6 - master
7 - paths:
8 - - 'packaging/installer/install-required-packages.sh'
7 pull_request:
10 - paths:
11 - - 'packaging/installer/install-required-packages.sh'
8 jobs:
13 - install-required-packages:
14 - name: Required Packages
9 + build:
10 + name: Build & Install
11 strategy:
12 matrix:
13 distro:
14 + - 'alpine:edge'
15 - 'alpine:3.11'
16 - 'alpine:3.10'
17 - 'alpine:3.9'
@@ -22,22 +19,22 @@ jobs:
19 - 'centos:8'
20 - 'centos:7'
21 - 'centos:6'
22 + - 'debian:bullseye'
23 - 'debian:buster'
26 - - 'debian:jessie'
24 - 'debian:stretch'
25 + - 'debian:jessie'
26 - 'fedora:31'
27 - 'fedora:30'
30 - - 'fedora:29'
28 - 'opensuse/leap:15.2'
29 - 'opensuse/leap:15.1'
33 - - 'opensuse/leap:15.0'
30 - 'opensuse/tumbleweed:latest'
31 - 'ubuntu:20.04'
32 - 'ubuntu:19.10'
37 - - 'ubuntu:19.04'
33 - 'ubuntu:18.04'
34 - 'ubuntu:16.04'
35 include:
36 + - distro: 'alpine:edge'
37 + pre: 'apk add -U bash'
38 - distro: 'alpine:3.11'
39 pre: 'apk add -U bash'
40 - distro: 'alpine:3.10'
@@ -48,12 +45,16 @@ jobs:
45 - distro: 'archlinux:latest'
46 pre: 'pacman --noconfirm -Sy grep'
47
51 - - distro: 'debian:buster'
48 + - distro: 'debian:bullseye'
49 pre: 'apt-get update'
53 - - distro: 'debian:jessie'
50 + - distro: 'debian:buster'
51 pre: 'apt-get update'
52 - distro: 'debian:stretch'
53 pre: 'apt-get update'
54 + - distro: 'debian:jessie'
55 + pre: >
56 + echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list.d/99-archived.list &&
57 + apt-get update -o Acquire::Check-Valid-Until=false
58
59 - distro: 'ubuntu:20.04'
60 pre: 'apt-get update'
@@ -69,8 +70,15 @@ jobs:
70 steps:
71 - name: Git clone repository
72 uses: actions/checkout@v2
72 - - name: Test installed-required-packages.sh on ${{ matrix.distro }}
73 + - name: install-required-packages.sh on ${{ matrix.distro }}
74 env:
75 PRE: ${{ matrix.pre }}
76 run: |
76 - docker run --rm -e PRE -v $PWD:/netdata -w /netdata ${{ matrix.distro }} /bin/sh -c '[ -n "${PRE}" ] && ${PRE}; ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive'
77 + echo $PRE > ./prep-cmd.sh
78 + docker build . -f .github/dockerfiles/Dockerfile.build_test -t build_test --build-arg BASE=${{ matrix.distro }}
79 + - name: Regular build on ${{ matrix.distro }}
80 + run: |
81 + docker run --rm -e PRE -w /netdata build_test /bin/sh -c 'autoreconf -ivf && ./configure && make -j2'
82 + - name: netdata-installer on ${{ matrix.distro }}
83 + run: |
84 + docker run --rm -e PRE -w /netdata build_test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it'
.github/workflows/build.yml deleted
-72
@@ -1,72 +0,0 @@
1 ----
2 -name: Builder
3 -on:
4 - push:
5 - branches:
6 - - master
7 - pull_request:
8 -jobs:
9 - build:
10 - name: Build
11 - strategy:
12 - matrix:
13 - distro:
14 - - 'alpine:3.11'
15 - - 'alpine:3.10'
16 - - 'alpine:3.9'
17 - - 'archlinux:latest'
18 - #- 'centos:8'
19 - - 'centos:7'
20 - - 'centos:6'
21 - - 'debian:bullseye'
22 - - 'debian:buster'
23 - - 'debian:stretch'
24 - - 'fedora:31'
25 - - 'fedora:30'
26 - - 'fedora:29'
27 - #- 'opensuse/leap:15.2'
28 - #- 'opensuse/leap:15.1'
29 - #- 'opensuse/leap:15.0'
30 - #- 'opensuse/tumbleweed:latest'
31 - - 'ubuntu:20.04'
32 - - 'ubuntu:19.10'
33 - - 'ubuntu:19.04'
34 - - 'ubuntu:18.04'
35 - - 'ubuntu:16.04'
36 - include:
37 - - distro: 'alpine:3.11'
38 - pre: 'apk add -U bash'
39 - - distro: 'alpine:3.10'
40 - pre: 'apk add -U bash'
41 - - distro: 'alpine:3.9'
42 - pre: 'apk add -U bash'
43 -
44 - - distro: 'archlinux:latest'
45 - pre: 'pacman --noconfirm -Sy grep'
46 -
47 - - distro: 'debian:bullseye'
48 - pre: 'apt-get update'
49 - - distro: 'debian:buster'
50 - pre: 'apt-get update'
51 - - distro: 'debian:stretch'
52 - pre: 'apt-get update'
53 -
54 - - distro: 'ubuntu:20.04'
55 - pre: 'apt-get update'
56 - - distro: 'ubuntu:19.10'
57 - pre: 'apt-get update'
58 - - distro: 'ubuntu:19.04'
59 - pre: 'apt-get update'
60 - - distro: 'ubuntu:18.04'
61 - pre: 'apt-get update'
62 - - distro: 'ubuntu:16.04'
63 - pre: 'apt-get update'
64 - runs-on: ubuntu-latest
65 - steps:
66 - - name: Git clone repository
67 - uses: actions/checkout@v2
68 - - name: Build on ${{ matrix.distro }}
69 - env:
70 - PRE: ${{ matrix.pre }}
71 - run: |
72 - docker run --rm -e PRE -v $PWD:/netdata -w /netdata ${{ matrix.distro }} /bin/sh -c '[ -n "${PRE}" ] && ${PRE}; ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive all && ./netdata-installer.sh -u --dont-wait --dont-start-it --disable-go'