regular_ci.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. name: Dinit Regular CI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - '.github/workflows/regular_ci.yml'
  8. - 'build/**'
  9. - 'configs/**'
  10. - 'dasynq/**'
  11. - 'src/**'
  12. - '**/Makefile'
  13. - '!build/mconfig.mesontemplate'
  14. - '!build/includes/README'
  15. - '!**/meson.build'
  16. pull_request:
  17. branches:
  18. - master
  19. paths:
  20. - '.github/workflows/regular_ci.yml'
  21. - 'build/**'
  22. - 'configs/**'
  23. - 'dasynq/**'
  24. - 'src/**'
  25. - '**/Makefile'
  26. - '!build/mconfig.mesontemplate'
  27. - '!build/includes/README'
  28. - '!**/meson.build'
  29. workflow_dispatch:
  30. jobs:
  31. Debian-bullseye_build:
  32. runs-on: ubuntu-20.04
  33. container:
  34. image: debian:bullseye
  35. strategy:
  36. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  37. matrix:
  38. include:
  39. - arch: 'amd64'
  40. - arch: 'i386'
  41. steps:
  42. - uses: actions/checkout@v4
  43. - name: Add i386 repos
  44. if: ${{ matrix.arch == 'i386' }}
  45. run: dpkg --add-architecture i386
  46. - name: Getting depends (amd64)
  47. if: ${{ matrix.arch == 'amd64' }}
  48. run: |
  49. apt-get update
  50. DEBIAN_FRONTEND=noninteractive apt-get install g++ make m4 file -y
  51. - name: Getting depends (i386)
  52. if: ${{ matrix.arch == 'i386' }}
  53. run: |
  54. apt-get update
  55. DEBIAN_FRONTEND=noninteractive apt-get install gcc:i386 make:i386 m4:i386 g++:i386 file -y
  56. - name: Print g++ architecture
  57. run: g++ -dumpmachine
  58. - name: Build
  59. run: make
  60. - name: Print dinit executive file architecture
  61. run: file ./src/dinit
  62. - name: Unit tests
  63. run: make check
  64. - name: Integration tests
  65. run: make check-igr DEBUG=1
  66. - name: Upload igr-tests output file(s) on failure
  67. uses: actions/upload-artifact@v4.3.2
  68. if: failure()
  69. with:
  70. name: igr-tests_output
  71. path: src/igr-tests/*/output/*
  72. MacOS-latest_build:
  73. runs-on: macos-latest
  74. strategy:
  75. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  76. matrix:
  77. include:
  78. - arch: 'amd64'
  79. steps:
  80. - uses: actions/checkout@v4
  81. # on MacOS, g++ symlinked to clang++
  82. # We must verify that
  83. - name: Verify g++ (it is g++ or clang++?)
  84. run: g++ --version
  85. - name: Print g++ architecture
  86. run: g++ -dumpmachine
  87. - name: Build
  88. run: make
  89. - name: Print dinit executive file architecture
  90. run: file ./src/dinit
  91. - name: Unit tests
  92. run: make check
  93. - name: Integration tests
  94. run: make check-igr DEBUG=1
  95. - name: Upload igr-tests output file(s) on failure
  96. uses: actions/upload-artifact@v4.3.2
  97. if: failure()
  98. with:
  99. name: igr-tests_output
  100. path: src/igr-tests/*/output/*
  101. Alpine-latest_build:
  102. runs-on: ubuntu-20.04
  103. strategy:
  104. fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
  105. matrix:
  106. include:
  107. - arch: 'armv6'
  108. - arch: 'armv7'
  109. - arch: 'aarch64'
  110. steps:
  111. - uses: actions/checkout@v4
  112. - uses: uraimo/run-on-arch-action@v2.7.2
  113. name: Getting depends & build & unit tests & integration tests
  114. with:
  115. arch: ${{ matrix.arch }}
  116. distro: alpine_latest
  117. run: |
  118. apk add ncurses
  119. echo "$(tput bold) !---- ${{ matrix.arch }} BUILD ----!$(tput sgr0)"
  120. echo "$(tput bold) ----Getting depends---- :$(tput sgr0) apk update && apk add make g++ m4 file"
  121. apk update
  122. apk add make g++ m4 file
  123. echo "$(tput bold) ----Print g++ arch---- :$(tput sgr0) g++ -dumpmachine"
  124. g++ -dumpmachine
  125. echo "$(tput bold) ----Build---- :$(tput sgr0) make"
  126. make
  127. echo "$(tput bold) ----Print dinit executive file architecture---- :$(tput sgr0) file ./src/dinit"
  128. file ./src/dinit
  129. echo "$(tput bold) ----Unit tests---- :$(tput sgr0) make check"
  130. make check
  131. echo "$(tput bold) ----Integration tests---- :$(tput sgr0) make check-igr DEBUG=1"
  132. make check-igr DEBUG=1
  133. - name: Upload igr-tests output file(s) on failure
  134. uses: actions/upload-artifact@v4.3.2
  135. if: failure()
  136. with:
  137. name: igr-tests_output
  138. path: src/igr-tests/*/output/*