diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-09-05 14:41:33 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-11-17 13:24:42 +0200 |
commit | 1baa1c92220d23a91337e8aa1e174c66f7fd0531 (patch) | |
tree | e46796919bce6bbc5408bbca0b23d5bf7d3d2fc0 /.github | |
parent | c6f93b6bf67500c963cdaa33b0500ea1a15232b0 (diff) | |
download | meson-1baa1c92220d23a91337e8aa1e174c66f7fd0531.zip meson-1baa1c92220d23a91337e8aa1e174c66f7fd0531.tar.gz meson-1baa1c92220d23a91337e8aa1e174c66f7fd0531.tar.bz2 |
use '-Werror=unused-parameter' for gcc/clang on project tests and -fimplicit-none on fortran
Fortran: check for undeclared variables by forcing implicit none everywhere
C/C++: check for unused parameters and return types
removed unused variables from test cases
ci: do missing return and unused arg check with Github Actions
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/unusedargs_missingreturn.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/unusedargs_missingreturn.yml b/.github/workflows/unusedargs_missingreturn.yml new file mode 100644 index 0000000..303a8d1 --- /dev/null +++ b/.github/workflows/unusedargs_missingreturn.yml @@ -0,0 +1,38 @@ +name: UnusedMissingReturn +# this workflow checks for usused input arguments or missing return values in test cases. +# some users have default configs that will needlessly fail Meson self-tests due to these syntax. + +on: + push: + paths: + - "**.yml" + - "test cases/cmake/**" + - "test cases/common/**" + - "test cases/fortran/**" + - "test cases/platform-linux/**" + pull_request: + paths: + - "**.yml" + - "test cases/cmake/**" + - "test cases/common/**" + - "test cases/fortran/**" + - "test cases/platform-linux/**" + +jobs: + + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install Compilers + run: | + sudo apt update -yq + sudo apt install -yq --no-install-recommends g++ gfortran ninja-build + - run: python run_project_tests.py --only cmake common fortran platform-linux + env: + CFLAGS: "-Werror=unused-parameter -Werror=return-type" + CPPFLAGS: "-Werror=unused-parameter -Werror=return-type" + FFLAGS: "-fimplicit-none" |