unusedargs_missingreturn.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. name: UnusedMissingReturn
  2. # this workflow checks for
  3. # * unused input arguments
  4. # * missing return values
  5. # * strict prototypes
  6. # some users have default configs that will needlessly fail Meson self-tests due to these syntax.
  7. env:
  8. CFLAGS: "-Werror=unused-parameter -Werror=return-type -Werror=strict-prototypes"
  9. CPPFLAGS: "-Werror=unused-parameter -Werror=return-type"
  10. FFLAGS: "-fimplicit-none"
  11. concurrency:
  12. group: unusedargs-${{ github.head_ref || github.ref }}
  13. cancel-in-progress: true
  14. on:
  15. push:
  16. paths:
  17. - ".github/workflows/unusedargs_missingreturn.yml"
  18. - "test cases/cmake/**"
  19. - "test cases/common/**"
  20. - "test cases/fortran/**"
  21. - "test cases/linuxlike/**"
  22. - "test cases/objc/**"
  23. - "test cases/objcpp/**"
  24. - "test caes/windows/**"
  25. pull_request:
  26. paths:
  27. - ".github/workflows/unusedargs_missingreturn.yml"
  28. - "test cases/cmake/**"
  29. - "test cases/common/**"
  30. - "test cases/fortran/**"
  31. - "test cases/linuxlike/**"
  32. - "test cases/objc/**"
  33. - "test cases/objcpp/**"
  34. - "test caes/windows/**"
  35. permissions:
  36. contents: read
  37. jobs:
  38. linux:
  39. runs-on: ubuntu-20.04
  40. steps:
  41. - uses: actions/checkout@v3
  42. - uses: actions/setup-python@v4
  43. with:
  44. python-version: '3.x'
  45. - name: Install Compilers
  46. run: |
  47. sudo apt update -yq
  48. sudo apt install -yq --no-install-recommends g++ gfortran ninja-build gobjc gobjc++
  49. python -m pip install coverage codecov
  50. - run: ./tools/run_with_cov.py run_project_tests.py --only cmake common fortran platform-linux "objective c" "objective c++"
  51. env:
  52. MESON_CI_JOBNAME: linux-ubuntu-gcc-werror
  53. - name: Upload coverage report
  54. run: ./ci/upload_cov.sh "UnusedMissingReturn"
  55. windows:
  56. runs-on: windows-latest
  57. steps:
  58. - uses: actions/checkout@v3
  59. - uses: actions/setup-python@v4
  60. with:
  61. python-version: '3.x'
  62. - run: pip install ninja pefile coverage codecov
  63. - run: python ./tools/run_with_cov.py run_project_tests.py --only platform-windows
  64. env:
  65. CC: gcc
  66. CXX: g++
  67. FC: gfortran
  68. MESON_CI_JOBNAME: msys2-gcc-werror
  69. - name: Upload coverage report
  70. run: ./ci/upload_cov.sh "UnusedMissingReturn Windows"