summaryrefslogtreecommitdiffstats
path: root/.github/workflows/checks.yml
blob: cf494e95c3403be68da68fccae6fa90263e0ee5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
name: Checks
on:
  push:
    branches:
      - master
  pull_request:
jobs:
  checksum-checks:
    name: Checksums
    runs-on: ubuntu-latest
    steps:
      - name: Git clone repository
        uses: actions/checkout@v2
      - name: Run checksum checks on kickstart files
        env:
          LOCAL_ONLY: "true"
        run: |
          ./tests/installer/checksums.sh
  dashboard-checks:
    name: Dashboard
    runs-on: ubuntu-latest
    steps:
      - name: Git clone repository
        uses: actions/checkout@v2
      - name: Install required packages
        run: |
          ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata
      - name: Backup dashboard.js
        run: |
          cp web/gui/dashboard.js /tmp/dashboard.js
      - name: Regenerate dashboard.js
        run: |
          autoreconf -ivf
          ./configure --enable-maintainer-mode
          make dist
      - name: Compare generated Dashboard vs. Backed up Dashboard
        run: |
          diff -sNrdu /tmp/dashboard.js web/gui/dashboard.js
  libressl-checks:
    name: LibreSSL
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build
        run: >
          docker run -v "$PWD":/netdata -w /netdata alpine:latest /bin/sh -c
          'apk add bash;
          ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata;
          apk del openssl openssl-dev;
          apk add libressl libressl-dev;
          autoreconf -ivf;
          ./configure;
          make;'
  clang-checks:
    name: Clang
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build
        run: |
          docker build -f .github/dockerfiles/Dockerfile.clang .
  dist-checks:
    name: Dist
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Prepare environment
        run: |
          ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata
          sudo apt-get install -y libjson-c-dev libipmimonitoring-dev libcups2-dev libsnappy-dev \
                                  libprotobuf-dev libprotoc-dev libssl-dev protobuf-compiler \
                                  libnetfilter-acct-dev
      - name: Configure
        run: |
          autoreconf -ivf
          ./configure \
            --with-zlib \
            --with-math \
            --with-user=netdata \
            CFLAGS=-O2
      - name: Make dist
        run: |
          make dist
      - name: Verify & Set distfile
        run: |
          ls -lah netdata-*.tar.gz
          echo "DISTFILE=$(ls netdata-*.tar.gz)" >> $GITHUB_ENV
      - name: Run run_install_with_dist_file.sh
        run: |
          ./.github/scripts/run_install_with_dist_file.sh "${DISTFILE}"
  gitignore-check:
    name: .gitignore
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Prepare environment
        run: ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata
      - name: Build netdata
        run: ./netdata-installer.sh --dont-start-it --disable-telemetry --dont-wait --install /tmp/install
      - name: Check that repo is clean
        run: if [ "$(git status --porcelain=v1 | wc -l)" -gt 0 ] ; then exit 1 ; fi