2
0

meson_ci.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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' || github.event_name == 'workflow_dispatch' ||
  39. contains(github.event.pull_request.labels.*.name, 'meson') }}
  40. runs-on: ubuntu-latest
  41. container:
  42. image: debian:bookworm
  43. strategy:
  44. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  45. matrix:
  46. include:
  47. - arch: 'amd64'
  48. - arch: 'i386'
  49. steps:
  50. - uses: actions/checkout@v4
  51. - name: Add i386 repos
  52. if: ${{ matrix.arch == 'i386' }}
  53. run: dpkg --add-architecture i386
  54. - name: Getting depends (amd64)
  55. if: ${{ matrix.arch == 'amd64' }}
  56. run: |
  57. apt-get update
  58. DEBIAN_FRONTEND=noninteractive apt-get install g++ meson m4 -y
  59. - name: Getting depends (i386)
  60. if: ${{ matrix.arch == 'i386' }}
  61. run: |
  62. apt-get update
  63. DEBIAN_FRONTEND=noninteractive apt-get install meson m4:i386 g++:i386 -y
  64. - name: Setup
  65. run: meson setup -Dunit-tests=true -Digr-tests=true dirbuild
  66. - name: Build
  67. run: meson compile -C dirbuild
  68. - name: Unit tests
  69. run: meson test -v --suite=unit_tests -C dirbuild
  70. - name: Integration tests
  71. run: meson test -v --suite=igr_tests -C dirbuild
  72. - name: Upload igr-tests output file(s) on failure
  73. uses: actions/upload-artifact@v4.3.2
  74. if: failure()
  75. with:
  76. name: igr-tests_output
  77. path: dirbuild/src/igr-tests/*/output/*
  78. MacOS-latest_build:
  79. if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' ||
  80. contains(github.event.pull_request.labels.*.name, 'meson') }}
  81. runs-on: macos-latest
  82. strategy:
  83. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  84. matrix:
  85. include:
  86. - arch: 'aarch64'
  87. steps:
  88. - uses: actions/checkout@v4
  89. - name: Install meson
  90. run: brew install meson
  91. - name: Setup
  92. run: meson setup -Dunit-tests=true -Digr-tests=true dirbuild
  93. - name: Build
  94. run: meson compile -C dirbuild
  95. - name: Unit tests
  96. run: meson test -v --suite=unit_tests -C dirbuild
  97. - name: Integration tests
  98. run: meson test -v --suite=igr_tests -C dirbuild
  99. - name: Upload igr-tests output file(s) on failure
  100. uses: actions/upload-artifact@v4.3.2
  101. if: failure()
  102. with:
  103. name: igr-tests_output
  104. path: dirbuild/src/igr-tests/*/output/*
  105. Alpine-latest_build:
  106. if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' ||
  107. contains(github.event.pull_request.labels.*.name, 'meson') }}
  108. runs-on: ubuntu-latest
  109. container:
  110. image: alpine:latest
  111. strategy:
  112. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  113. matrix:
  114. include:
  115. - arch: 'amd64'
  116. steps:
  117. - uses: actions/checkout@v4
  118. - name: Getting depends
  119. run: |
  120. apk update
  121. apk add meson g++ m4
  122. - name: Setup
  123. run: meson setup -Dunit-tests=true -Digr-tests=true dirbuild
  124. - name: Build
  125. run: meson compile -C dirbuild
  126. - name: Unit tests
  127. run: meson test -v --suite=unit_tests -C dirbuild
  128. - name: Integration tests
  129. run: meson test -v --suite=igr_tests -C dirbuild
  130. - name: Upload igr-tests output file(s) on failure
  131. uses: actions/upload-artifact@v4.3.2
  132. if: failure()
  133. with:
  134. name: igr-tests_output
  135. path: dirbuild/src/igr-tests/*/output/*