2
0

linux.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. - name: Test
  49. run: |
  50. ./bin/luanti --run-unittests
  51. # Current gcc version
  52. gcc_14:
  53. runs-on: ubuntu-24.04
  54. steps:
  55. - uses: actions/checkout@v4
  56. - name: Install deps
  57. run: |
  58. source ./util/ci/common.sh
  59. install_linux_deps g++-14 libluajit-5.1-dev
  60. - name: Build
  61. run: |
  62. ./util/ci/build.sh
  63. env:
  64. CC: gcc-14
  65. CXX: g++-14
  66. - name: Test
  67. run: |
  68. mkdir nowrite
  69. chmod a-w nowrite
  70. cd nowrite
  71. ../bin/luanti --run-unittests
  72. # Older clang version (should be close to our minimum supported version)
  73. clang_7:
  74. runs-on: ubuntu-20.04
  75. steps:
  76. - uses: actions/checkout@v4
  77. - name: Install deps
  78. run: |
  79. source ./util/ci/common.sh
  80. install_linux_deps clang-7 llvm-7
  81. - name: Build
  82. run: |
  83. ./util/ci/build.sh
  84. env:
  85. CC: clang-7
  86. CXX: clang++-7
  87. CMAKE_FLAGS: '-DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address"'
  88. - name: Unittest
  89. run: |
  90. ./bin/luanti --run-unittests
  91. # Do this here because we have ASan and error paths are sensitive to dangling pointers
  92. - name: Test error cases
  93. run: |
  94. ./util/test_error_cases.sh
  95. # Current clang version
  96. clang_18:
  97. runs-on: ubuntu-24.04
  98. steps:
  99. - uses: actions/checkout@v4
  100. - name: Install deps
  101. run: |
  102. source ./util/ci/common.sh
  103. install_linux_deps clang-18 lldb
  104. - name: Build
  105. run: |
  106. ./util/ci/build.sh
  107. env:
  108. CC: clang-18
  109. CXX: clang++-18
  110. - name: Test
  111. run: |
  112. ./bin/luanti --run-unittests
  113. - name: Integration test + devtest
  114. run: |
  115. ./util/test_multiplayer.sh
  116. # Build with prometheus-cpp (server-only)
  117. clang_11_prometheus:
  118. name: "clang_11 (PROMETHEUS=1)"
  119. runs-on: ubuntu-22.04
  120. steps:
  121. - uses: actions/checkout@v4
  122. - name: Install deps
  123. run: |
  124. source ./util/ci/common.sh
  125. install_linux_deps clang-11
  126. - name: Build prometheus-cpp
  127. run: ./util/ci/build_prometheus_cpp.sh
  128. - name: Build
  129. run: |
  130. ./util/ci/build.sh
  131. env:
  132. CC: clang-11
  133. CXX: clang++-11
  134. CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0 -DENABLE_CURSES=0"
  135. - name: Test
  136. run: |
  137. ./bin/luantiserver --run-unittests