build-and-install.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ---
  2. name: Builder
  3. on:
  4. push:
  5. branches:
  6. - master
  7. pull_request: null
  8. env:
  9. DO_NOT_TRACK: 1
  10. jobs:
  11. static-build:
  12. name: Static Build
  13. runs-on: ubuntu-latest
  14. strategy:
  15. matrix:
  16. arch:
  17. - x86_64
  18. - armv7l
  19. - aarch64
  20. steps:
  21. - name: Git clone repository
  22. uses: actions/checkout@v2
  23. with:
  24. fetch-depth: 0
  25. submodules: recursive
  26. - name: Build
  27. run: .github/scripts/build-static.sh ${{ matrix.arch }}
  28. - name: Save Packages
  29. uses: actions/upload-artifact@v2
  30. with:
  31. name: ${{ matrix.arch }}-static-builds
  32. path: ${{ github.workspace }}/artifacts/*
  33. source-build:
  34. name: Build & Install
  35. strategy:
  36. fail-fast: false
  37. max-parallel: 8
  38. matrix:
  39. distro:
  40. - 'alpine:edge'
  41. - 'alpine:3.14'
  42. - 'alpine:3.13'
  43. - 'alpine:3.12'
  44. - 'alpine:3.11'
  45. - 'archlinux:latest'
  46. - 'centos:8'
  47. - 'centos:7'
  48. - 'debian:bullseye' # 11
  49. - 'debian:10'
  50. - 'debian:9'
  51. - 'fedora:34'
  52. - 'fedora:33'
  53. - 'opensuse/leap:15.2'
  54. - 'opensuse/leap:15.3'
  55. - 'ubuntu:21.04'
  56. - 'ubuntu:20.04'
  57. - 'ubuntu:18.04'
  58. include:
  59. - distro: 'alpine:edge'
  60. pre: 'apk add -U bash'
  61. rmjsonc: 'apk del json-c-dev'
  62. - distro: 'alpine:3.14'
  63. pre: 'apk add -U bash'
  64. rmjsonc: 'apk del json-c-dev'
  65. - distro: 'alpine:3.13'
  66. pre: 'apk add -U bash'
  67. rmjsonc: 'apk del json-c-dev'
  68. - distro: 'alpine:3.12'
  69. pre: 'apk add -U bash'
  70. rmjsonc: 'apk del json-c-dev'
  71. - distro: 'alpine:3.11'
  72. pre: 'apk add -U bash'
  73. rmjsonc: 'apk del json-c-dev'
  74. - distro: 'archlinux:latest'
  75. pre: 'pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi'
  76. - distro: 'centos:8'
  77. rmjsonc: 'dnf remove -y json-c-devel'
  78. - distro: 'debian:bullseye' # 11
  79. pre: 'apt-get update'
  80. rmjsonc: 'apt-get remove -y libjson-c-dev'
  81. - distro: 'debian:10'
  82. pre: 'apt-get update'
  83. rmjsonc: 'apt-get remove -y libjson-c-dev'
  84. - distro: 'debian:9'
  85. pre: 'apt-get update'
  86. rmjsonc: 'apt-get remove -y libjson-c-dev'
  87. - distro: 'fedora:34'
  88. rmjsonc: 'dnf remove -y json-c-devel'
  89. - distro: 'fedora:33'
  90. rmjsonc: 'dnf remove -y json-c-devel'
  91. - distro: 'opensuse/leap:15.2'
  92. rmjsonc: 'zypper rm -y libjson-c-devel'
  93. - distro: 'opensuse/leap:15.3'
  94. rmjsonc: 'zypper rm -y libjson-c-devel'
  95. - distro: 'ubuntu:21.04'
  96. pre: 'apt-get update'
  97. rmjsonc: 'apt-get remove -y libjson-c-dev'
  98. - distro: 'ubuntu:20.04'
  99. pre: 'apt-get update'
  100. rmjsonc: 'apt-get remove -y libjson-c-dev'
  101. - distro: 'ubuntu:18.04'
  102. pre: 'apt-get update'
  103. rmjsonc: 'apt-get remove -y libjson-c-dev'
  104. runs-on: ubuntu-latest
  105. steps:
  106. - name: Git clone repository
  107. uses: actions/checkout@v2
  108. with:
  109. submodules: recursive
  110. - name: install-required-packages.sh on ${{ matrix.distro }}
  111. env:
  112. PRE: ${{ matrix.pre }}
  113. RMJSONC: ${{ matrix.rmjsonc }}
  114. run: |
  115. echo $PRE > ./prep-cmd.sh
  116. echo $RMJSONC > ./rmjsonc.sh && chmod +x ./rmjsonc.sh
  117. docker build . -f .github/dockerfiles/Dockerfile.build_test -t test --build-arg BASE=${{ matrix.distro }}
  118. - name: Regular build on ${{ matrix.distro }}
  119. run: |
  120. docker run -w /netdata test /bin/sh -c 'autoreconf -ivf && ./configure && make -j2'
  121. - name: netdata-installer on ${{ matrix.distro }}, disable cloud
  122. run: |
  123. docker run -w /netdata test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --disable-cloud'
  124. - name: netdata-installer on ${{ matrix.distro }}, require cloud
  125. run: |
  126. docker run -w /netdata test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
  127. - name: netdata-installer on ${{ matrix.distro }}, require cloud, require ACLK-NG
  128. run: |
  129. 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'
  130. - name: netdata-installer on ${{ matrix.distro }}, require cloud, no JSON-C
  131. if: matrix.rmjsonc != ''
  132. run: |
  133. docker run -w /netdata test \
  134. /bin/sh -c '/netdata/rmjsonc.sh && ./netdata-installer.sh --dont-wait --dont-start-it --require-cloud'