meson_ci.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. ## This Workflow will run when a PR has "meson" label or when something pushed to master.
  2. name: Dinit Meson based CI
  3. on:
  4. push:
  5. branches:
  6. - master
  7. paths:
  8. - '.github/workflows/meson_ci.yml'
  9. - 'build/version.conf'
  10. - 'build/mconfig.mesontemplate'
  11. - 'configs/**'
  12. - 'dasynq/**'
  13. - 'src/**'
  14. - '**/meson.build'
  15. - 'meson_options.txt'
  16. - '!**/Makefile'
  17. pull_request:
  18. types:
  19. - labeled
  20. - opened
  21. - reopened
  22. - synchronize
  23. branches:
  24. - master
  25. paths:
  26. - '.github/workflows/meson_ci.yml'
  27. - 'build/version.conf'
  28. - 'build/mconfig.mesontemplate'
  29. - 'configs/**'
  30. - 'dasynq/**'
  31. - 'src/**'
  32. - '**/meson.build'
  33. - 'meson_options.txt'
  34. - '!**/Makefile'
  35. workflow_dispatch:
  36. jobs:
  37. Debian-bookworm_build:
  38. if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'meson') }}
  39. runs-on: ubuntu-latest
  40. container:
  41. image: debian:bookworm
  42. strategy:
  43. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  44. matrix:
  45. include:
  46. - arch: 'amd64'
  47. - arch: 'i386'
  48. steps:
  49. - uses: actions/checkout@v4
  50. - name: Add i386 repos
  51. if: ${{ matrix.arch == 'i386' }}
  52. run: dpkg --add-architecture i386
  53. - name: Getting depends (amd64)
  54. if: ${{ matrix.arch == 'amd64' }}
  55. run: |
  56. apt-get update
  57. DEBIAN_FRONTEND=noninteractive apt-get install g++ meson m4 -y
  58. - name: Getting depends (i386)
  59. if: ${{ matrix.arch == 'i386' }}
  60. run: |
  61. apt-get update
  62. DEBIAN_FRONTEND=noninteractive apt-get install meson m4:i386 g++:i386 -y
  63. - name: Setup
  64. run: meson setup -Dunit-tests=true -Digr-tests=true dirbuild
  65. - name: Build
  66. run: meson compile -C dirbuild
  67. - name: Unit tests
  68. run: meson test -v --suite=unit_tests -C dirbuild
  69. - name: Integration tests
  70. run: meson test -v --suite=igr_tests -C dirbuild
  71. - name: Upload igr-tests output file(s) on failure
  72. uses: actions/upload-artifact@v4.3.2
  73. if: failure()
  74. with:
  75. name: igr-tests_output
  76. path: dirbuild/src/igr-tests/*/output/*
  77. MacOS-latest_build:
  78. if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'meson') }}
  79. runs-on: macos-latest
  80. strategy:
  81. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  82. matrix:
  83. include:
  84. - arch: 'amd64'
  85. steps:
  86. - uses: actions/checkout@v4
  87. - name: Install meson
  88. run: brew install meson
  89. - name: Setup
  90. run: meson setup -Dunit-tests=true -Digr-tests=true dirbuild
  91. - name: Build
  92. run: meson compile -C dirbuild
  93. - name: Unit tests
  94. run: meson test -v --suite=unit_tests -C dirbuild
  95. - name: Integration tests
  96. run: meson test -v --suite=igr_tests -C dirbuild
  97. - name: Upload igr-tests output file(s) on failure
  98. uses: actions/upload-artifact@v4.3.2
  99. if: failure()
  100. with:
  101. name: igr-tests_output
  102. path: dirbuild/src/igr-tests/*/output/*
  103. Alpine-latest_build:
  104. if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'meson') }}
  105. runs-on: ubuntu-latest
  106. strategy:
  107. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  108. matrix:
  109. include:
  110. - arch: 'armv6'
  111. - arch: 'armv7'
  112. - arch: 'aarch64'
  113. steps:
  114. - uses: actions/checkout@v4
  115. - uses: uraimo/run-on-arch-action@v2.7.2
  116. name: Getting depends & setup & build & unit & integration tests
  117. with:
  118. arch: ${{ matrix.arch }}
  119. distro: alpine_latest
  120. run: |
  121. apk add ncurses
  122. echo "$(tput bold) !---- ${{ matrix.arch }} BUILD ----!$(tput sgr0)"
  123. echo "$(tput bold) ----Getting depends---- :$(tput sgr0) apk update && apk add meson g++ m4"
  124. apk update
  125. apk add meson g++ m4
  126. echo "$(tput bold) ----Setup---- :$(tput sgr0) meson setup -Dunit-tests=true -Digr-tests=true dirbuild"
  127. meson setup -Dunit-tests=true -Digr-tests=true dirbuild
  128. echo "$(tput bold) ----Build---- :$(tput sgr0) meson compile -C dirbuild"
  129. meson compile -C dirbuild
  130. echo "$(tput bold) ----Unit tests---- :$(tput sgr0) meson test -v --suite=unit_tests -C dirbuild"
  131. meson test -v --suite=unit_tests -C dirbuild
  132. echo "$(tput bold) ----Integration tests---- :$(tput sgr0) meson test -v --suite=igr_tests -C dirbuild"
  133. meson test -v --suite=igr_tests -C dirbuild
  134. - name: Upload igr-tests output file(s) on failure
  135. uses: actions/upload-artifact@v4.3.2
  136. if: failure()
  137. with:
  138. name: igr-tests_output
  139. path: dirbuild/src/igr-tests/*/output/*