2
0

linux.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. - 'util/ci/**'
  15. - 'Dockerfile'
  16. - '.dockerignore'
  17. - '.github/workflows/linux.yml'
  18. pull_request:
  19. paths:
  20. - 'lib/**.[ch]'
  21. - 'lib/**.cpp'
  22. - 'src/**.[ch]'
  23. - 'src/**.cpp'
  24. - 'irr/**.[ch]'
  25. - 'irr/**.cpp'
  26. - '**/CMakeLists.txt'
  27. - 'cmake/Modules/**'
  28. - 'util/ci/**'
  29. - 'Dockerfile'
  30. - '.dockerignore'
  31. - '.github/workflows/linux.yml'
  32. env:
  33. MINETEST_POSTGRESQL_CONNECT_STRING: 'host=localhost user=minetest password=minetest dbname=minetest'
  34. jobs:
  35. # Older gcc version (should be close to our minimum supported version)
  36. gcc_7:
  37. runs-on: ubuntu-20.04
  38. steps:
  39. - uses: actions/checkout@v4
  40. - name: Install deps
  41. run: |
  42. source ./util/ci/common.sh
  43. install_linux_deps g++-7
  44. - name: Build
  45. run: |
  46. ./util/ci/build.sh
  47. env:
  48. CC: gcc-7
  49. CXX: g++-7
  50. - name: Test
  51. run: |
  52. ./bin/minetest --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/minetest --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
  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/minetest --run-unittests
  93. # Current clang version
  94. clang_18:
  95. runs-on: ubuntu-24.04
  96. steps:
  97. - uses: actions/checkout@v4
  98. - name: Install deps
  99. run: |
  100. source ./util/ci/common.sh
  101. install_linux_deps clang-18 lldb
  102. - name: Build
  103. run: |
  104. ./util/ci/build.sh
  105. env:
  106. CC: clang-18
  107. CXX: clang++-18
  108. - name: Test
  109. run: |
  110. ./bin/minetest --run-unittests
  111. - name: Integration test + devtest
  112. run: |
  113. ./util/test_multiplayer.sh
  114. # Build with prometheus-cpp (server-only)
  115. clang_11_prometheus:
  116. name: "clang_11 (PROMETHEUS=1)"
  117. runs-on: ubuntu-22.04
  118. steps:
  119. - uses: actions/checkout@v4
  120. - name: Install deps
  121. run: |
  122. source ./util/ci/common.sh
  123. install_linux_deps clang-11
  124. - name: Build prometheus-cpp
  125. run: ./util/ci/build_prometheus_cpp.sh
  126. - name: Build
  127. run: |
  128. ./util/ci/build.sh
  129. env:
  130. CC: clang-11
  131. CXX: clang++-11
  132. CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0 -DENABLE_CURSES=0"
  133. - name: Test
  134. run: |
  135. ./bin/minetestserver --run-unittests