build-and-install.yml 4.8 KB

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