build-dummy.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. ---
  2. # Ci code for building release artifacts.
  3. #
  4. # This workflow exists so we can require these checks to pass, but skip
  5. # them on PRs that have nothing to do with the source code.
  6. name: Build
  7. on:
  8. pull_request: # PR checks only validate the build and generate artifacts for testing.
  9. paths-ignore: # This MUST be kept in-sync with the paths-ignore key for the build-dummy.yml workflow.
  10. - '**.c'
  11. - '**.cc'
  12. - '**.h'
  13. - '**.hh'
  14. - '**.in'
  15. - '!netdata.spec.in'
  16. - 'configure.ac'
  17. - 'netdata-installer.sh'
  18. - '**/Makefile*'
  19. - 'Makefile*'
  20. - '.github/workflows/build.yml'
  21. - '.github/scripts/build-static.sh'
  22. - '.github/scripts/get-static-cache-key.sh'
  23. - '.github/scripts/gen-matrix-build.py'
  24. - '.github/scripts/run-updater-check.sh'
  25. - 'build/**'
  26. - 'packaging/makeself/**'
  27. - 'packaging/installer/**'
  28. - 'aclk/aclk-schemas/'
  29. - 'ml/dlib/'
  30. - 'mqtt_websockets'
  31. - 'web/server/h2o/libh2o'
  32. - '!**.md'
  33. concurrency: # This keeps multiple instances of the job from running concurrently for the same ref and event type.
  34. group: build-${{ github.ref }}-${{ github.event_name }}
  35. cancel-in-progress: true
  36. jobs:
  37. build-dist: # Build the distribution tarball and store it as an artifact.
  38. name: Build Distribution Tarball
  39. runs-on: ubuntu-latest
  40. steps:
  41. - run: echo 'NOT REQUIRED'
  42. build-static: # Build the static binary archives, and store them as artifacts.
  43. name: Build Static
  44. runs-on: ubuntu-latest
  45. strategy:
  46. matrix:
  47. arch:
  48. - x86_64
  49. - armv7l
  50. - aarch64
  51. - ppc64le
  52. steps:
  53. - run: echo 'NOT REQUIRED'
  54. matrix: # Generate the shared build matrix for our build tests.
  55. name: Prepare Build Matrix
  56. runs-on: ubuntu-latest
  57. outputs:
  58. matrix: ${{ steps.set-matrix.outputs.matrix }}
  59. steps:
  60. - name: Checkout
  61. id: checkout
  62. uses: actions/checkout@v3
  63. - name: Prepare tools
  64. id: prepare
  65. run: |
  66. sudo apt-get update && sudo apt-get install -y python3-ruamel.yaml
  67. - name: Read build matrix
  68. id: set-matrix
  69. run: |
  70. matrix="$(.github/scripts/gen-matrix-build.py)"
  71. echo "Generated matrix: ${matrix}"
  72. echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}"
  73. prepare-test-images: # Prepare the test environments for our build checks. This also checks dependency handling code for each tested environment.
  74. name: Prepare Test Environments
  75. runs-on: ubuntu-latest
  76. needs:
  77. - matrix
  78. env:
  79. RETRY_DELAY: 300
  80. strategy:
  81. fail-fast: false
  82. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  83. steps:
  84. - run: echo 'NOT REQUIRED'
  85. source-build: # Test various source build arrangements.
  86. name: Test Source Build
  87. runs-on: ubuntu-latest
  88. needs:
  89. - matrix
  90. strategy:
  91. fail-fast: false
  92. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  93. steps:
  94. - run: echo 'NOT REQUIRED'
  95. updater-check: # Test the generated dist archive using the updater code.
  96. name: Test Generated Distfile and Updater Code
  97. runs-on: ubuntu-latest
  98. needs:
  99. - matrix
  100. strategy:
  101. fail-fast: false
  102. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  103. steps:
  104. - run: echo 'NOT REQUIRED'
  105. prepare-upload: # Consolidate the artifacts for uploading or releasing.
  106. name: Prepare Artifacts
  107. runs-on: ubuntu-latest
  108. steps:
  109. - run: echo 'NOT REQUIRED'
  110. artifact-verification-dist: # Verify the regular installer works with the consolidated artifacts.
  111. name: Test Consolidated Artifacts (Source)
  112. runs-on: ubuntu-latest
  113. steps:
  114. - run: echo 'NOT REQUIRED'
  115. artifact-verification-static: # Verify the static installer works with the consolidated artifacts.
  116. name: Test Consolidated Artifacts (Static)
  117. runs-on: ubuntu-latest
  118. steps:
  119. - run: echo 'NOT REQUIRED'