2
0

linux.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. name: linux
  2. # build on c/cpp changes or workflow changes
  3. on:
  4. push:
  5. paths:
  6. - 'lib/**.[ch]'
  7. - 'lib/**.cpp'
  8. - 'src/**.[ch]'
  9. - 'src/**.cpp'
  10. - 'irr/**.[ch]'
  11. - 'irr/**.cpp'
  12. - '**/CMakeLists.txt'
  13. - 'cmake/Modules/**'
  14. - 'po/**.po'
  15. - 'util/ci/**'
  16. - '.github/workflows/linux.yml'
  17. pull_request:
  18. paths:
  19. - 'lib/**.[ch]'
  20. - 'lib/**.cpp'
  21. - 'src/**.[ch]'
  22. - 'src/**.cpp'
  23. - 'irr/**.[ch]'
  24. - 'irr/**.cpp'
  25. - '**/CMakeLists.txt'
  26. - 'cmake/Modules/**'
  27. - 'po/**.po'
  28. - 'util/ci/**'
  29. - '.github/workflows/linux.yml'
  30. env:
  31. MINETEST_POSTGRESQL_CONNECT_STRING: 'host=localhost user=minetest password=minetest dbname=minetest'
  32. jobs:
  33. # Older gcc version (should be close to our minimum supported version)
  34. gcc_7:
  35. runs-on: ubuntu-20.04
  36. steps:
  37. - uses: actions/checkout@v4
  38. - name: Install deps
  39. run: |
  40. source ./util/ci/common.sh
  41. install_linux_deps g++-7
  42. - name: Build
  43. run: |
  44. ./util/ci/build.sh
  45. env:
  46. CC: gcc-7
  47. CXX: g++-7
  48. # Test fallback SHA implementations
  49. CMAKE_FLAGS: '-DENABLE_OPENSSL=0'
  50. - name: Test
  51. run: |
  52. ./bin/luanti --run-unittests
  53. # Current gcc version
  54. gcc_14:
  55. runs-on: ubuntu-24.04
  56. steps:
  57. - uses: actions/checkout@v4
  58. - name: Install deps
  59. run: |
  60. source ./util/ci/common.sh
  61. install_linux_deps g++-14 libluajit-5.1-dev
  62. - name: Build
  63. run: |
  64. ./util/ci/build.sh
  65. env:
  66. CC: gcc-14
  67. CXX: g++-14
  68. - name: Test
  69. run: |
  70. mkdir nowrite
  71. chmod a-w nowrite
  72. cd nowrite
  73. ../bin/luanti --run-unittests
  74. # Older clang version (should be close to our minimum supported version)
  75. clang_7:
  76. runs-on: ubuntu-20.04
  77. steps:
  78. - uses: actions/checkout@v4
  79. - name: Install deps
  80. run: |
  81. source ./util/ci/common.sh
  82. install_linux_deps clang-7 llvm-7
  83. - name: Build
  84. run: |
  85. ./util/ci/build.sh
  86. env:
  87. CC: clang-7
  88. CXX: clang++-7
  89. CMAKE_FLAGS: '-DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address"'
  90. - name: Unittest
  91. run: |
  92. ./bin/luanti --run-unittests
  93. # Do this here because we have ASan and error paths are sensitive to dangling pointers
  94. - name: Test error cases
  95. run: |
  96. ./util/test_error_cases.sh
  97. # Current clang version
  98. clang_18:
  99. runs-on: ubuntu-24.04
  100. steps:
  101. - uses: actions/checkout@v4
  102. - name: Install deps
  103. run: |
  104. source ./util/ci/common.sh
  105. install_linux_deps clang-18 lldb
  106. - name: Build
  107. run: |
  108. ./util/ci/build.sh
  109. env:
  110. CC: clang-18
  111. CXX: clang++-18
  112. - name: Test
  113. run: |
  114. ./bin/luanti --run-unittests
  115. - name: Integration test + devtest
  116. run: |
  117. ./util/test_multiplayer.sh
  118. # Build with prometheus-cpp (server-only)
  119. clang_11_prometheus:
  120. name: "clang_11 (PROMETHEUS=1)"
  121. runs-on: ubuntu-22.04
  122. steps:
  123. - uses: actions/checkout@v4
  124. - name: Install deps
  125. run: |
  126. source ./util/ci/common.sh
  127. install_linux_deps clang-11
  128. - name: Build prometheus-cpp
  129. run: ./util/ci/build_prometheus_cpp.sh
  130. - name: Build
  131. run: |
  132. ./util/ci/build.sh
  133. env:
  134. CC: clang-11
  135. CXX: clang++-11
  136. CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0 -DENABLE_CURSES=0"
  137. - name: Test
  138. run: |
  139. ./bin/luantiserver --run-unittests