summaryrefslogtreecommitdiffstats
path: root/.github/workflows/checks.yml
blob: 4c892ffce80898ec6afc858a3c7fca8fc4ab2919 (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
---
name: Checks
on:
  push:
    paths:
      - '**.c'
      - '**.cc'
      - '**.h'
      - '**.hh'
      - '**.in'
      - '!netdata.spec.in'
      - 'configure.ac'
      - '**/Makefile*'
      - 'Makefile*'
      - '.gitignore'
      - '.github/workflows/checks.yml'
      - 'build/**'
      - 'aclk/aclk-schemas/'
      - 'ml/dlib/'
      - 'mqtt_websockets'
      - 'web/server/h2o/libh2o'
    branches:
      - master
  pull_request:
    paths: # This MUST be kept in-sync with the paths-ignore key for the checks-dummy.yml workflow.
      - '**.c'
      - '**.cc'
      - '**.h'
      - '**.hh'
      - '**.in'
      - '!netdata.spec.in'
      - 'configure.ac'
      - '**/Makefile*'
      - 'Makefile*'
      - '.gitignore'
      - '.github/workflows/checks.yml'
      - 'build/**'
      - 'aclk/aclk-schemas/'
      - 'ml/dlib/'
      - 'mqtt_websockets'
      - 'web/server/h2o/libh2o'
env:
  DISABLE_TELEMETRY: 1
concurrency:
  group: checks-${{ github.ref }}
  cancel-in-progress: true
jobs:
  libressl-checks:
    name: LibreSSL
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          submodules: recursive
      - 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 --disable-dependency-tracking;
          make;'
  clang-checks:
    name: Clang
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          submodules: recursive
      - name: Build
        run: |
          docker build -f .github/dockerfiles/Dockerfile.clang .
  gitignore-check:
    name: .gitignore
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          submodules: recursive
      - 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-prefix /tmp/install --one-time-build
      - name: Check that repo is clean
        run: |
          git status --porcelain=v1 > /tmp/porcelain
          if [ -s /tmp/porcelain ]; then
            cat /tmp/porcelain
            exit 1
          fi