os_comp.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. name: linux
  2. concurrency:
  3. group: linux-${{ github.head_ref || github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. push:
  7. branches:
  8. - master
  9. # Stable branches such as 0.56 or the eventual 1.0
  10. - '[0-9]+.[0-9]+'
  11. paths:
  12. - "mesonbuild/**"
  13. - "test cases/**"
  14. - "unittests/**"
  15. - ".github/workflows/images.yml"
  16. - ".github/workflows/os_comp.yml"
  17. - "run_unittests.py"
  18. pull_request:
  19. paths:
  20. - "mesonbuild/**"
  21. - "test cases/**"
  22. - "unittests/**"
  23. - ".github/workflows/images.yml"
  24. - ".github/workflows/os_comp.yml"
  25. - "run_unittests.py"
  26. permissions:
  27. contents: read
  28. jobs:
  29. arch:
  30. name: ${{ matrix.cfg.name }}
  31. runs-on: ubuntu-latest
  32. strategy:
  33. fail-fast: false
  34. matrix:
  35. cfg:
  36. - { name: Arch Linux, id: arch }
  37. - { name: CUDA (on Arch), id: cuda }
  38. - { name: Fedora, id: fedora }
  39. - { name: OpenSUSE, id: opensuse }
  40. - { name: Ubuntu Bionic, id: bionic }
  41. container: mesonbuild/${{ matrix.cfg.id }}:latest
  42. env:
  43. MESON_CI_JOBNAME: linux-${{ matrix.cfg.id }}-gcc
  44. steps:
  45. - uses: actions/checkout@v3
  46. - name: Run tests
  47. # All environment variables are stored inside the docker image in /ci/env_vars.sh
  48. # They are defined in the `env` section in each image.json. CI_ARGS should be set
  49. # via the `args` array ub the image.json
  50. run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./tools/run_with_cov.py ./run_tests.py $CI_ARGS'
  51. - name: Upload coverage report
  52. run: ./ci/upload_cov.sh "OS Comp [${{ matrix.cfg.name }}]"
  53. ubuntu-rolling:
  54. name: 'Ubuntu Rolling'
  55. runs-on: ubuntu-latest
  56. strategy:
  57. fail-fast: false
  58. matrix:
  59. cfg:
  60. - CC: 'gcc'
  61. CXX: 'g++'
  62. - MESON_ARGS: '--unity=on -Ddefault_library=static'
  63. RUN_TESTS_ARGS: '--no-unittests'
  64. CC: 'gcc'
  65. CXX: 'g++'
  66. - MESON_ARGS: '-Ddefault_library=both'
  67. RUN_TESTS_ARGS: '--no-unittests'
  68. CC: 'gcc'
  69. CXX: 'g++'
  70. - CC: 'clang'
  71. CXX: 'clang++'
  72. - MESON_ARGS: '--unity=on'
  73. RUN_TESTS_ARGS: '--no-unittests'
  74. CC: 'clang'
  75. CXX: 'clang++'
  76. - RUN_TESTS_ARGS: '--cross ubuntu-armhf.json --cross linux-mingw-w64-64bit.json'
  77. MESON_RSP_THRESHOLD: '0'
  78. CC: 'gcc'
  79. CXX: 'g++'
  80. - RUN_TESTS_ARGS: '--cross ubuntu-armhf.json --cross linux-mingw-w64-64bit.json'
  81. MESON_ARGS: '--unity=on'
  82. CC: 'gcc'
  83. CXX: 'g++'
  84. env:
  85. MESON_CI_JOBNAME_UPDATE: linux-${{ github.job }}-${{ matrix.cfg.CC }}
  86. container:
  87. image: mesonbuild/ubuntu-rolling
  88. env:
  89. MESON_RSP_THRESHOLD: ${{ matrix.cfg.MESON_RSP_THRESHOLD }}
  90. MESON_ARGS: ${{ matrix.cfg.MESON_ARGS }}
  91. RUN_TESTS_ARGS: ${{ matrix.cfg.RUN_TESTS_ARGS }}
  92. CC: ${{ matrix.cfg.CC }}
  93. CXX: ${{ matrix.cfg.CXX }}
  94. steps:
  95. - name: Checkout code
  96. uses: actions/checkout@v3
  97. - name: Run tests
  98. shell: bash
  99. run: |
  100. export HOME=/root
  101. export CC=$CC
  102. export CXX=$CXX
  103. export OBJC=$CC
  104. export OBJCXX=$CXX
  105. export PATH=$(pwd)/tools:$PATH
  106. if test "$MESON_RSP_THRESHOLD" != ""
  107. then
  108. export MESON_RSP_THRESHOLD=$MESON_RSP_THRESHOLD
  109. fi
  110. source /ci/env_vars.sh
  111. export MESON_CI_JOBNAME=$MESON_CI_JOBNAME_UPDATE
  112. update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
  113. update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
  114. update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
  115. update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
  116. ./tools/run_with_cov.py ./run_tests.py $RUN_TESTS_ARGS -- $MESON_ARGS
  117. - name: Upload coverage report
  118. run: ./ci/upload_cov.sh "Ubuntu [${{ matrix.cfg.CC }} ${{ matrix.cfg.RUN_TESTS_ARGS }} ${{ matrix.cfg.MESON_ARGS }}]"