diff options
-rw-r--r-- | .github/workflows/cygwin.yml | 14 | ||||
-rw-r--r-- | .github/workflows/macos.yml | 26 | ||||
-rw-r--r-- | .github/workflows/msys2.yml | 12 | ||||
-rw-r--r-- | .github/workflows/nonnative.yml | 13 | ||||
-rw-r--r-- | .github/workflows/os_comp.yml | 21 | ||||
-rw-r--r-- | .github/workflows/unusedargs_missingreturn.yml | 26 | ||||
-rw-r--r-- | ci/ciimage/common.sh | 1 | ||||
-rwxr-xr-x | ci/combine_cov.sh (renamed from ci/upload_cov.sh) | 3 |
8 files changed, 95 insertions, 21 deletions
diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index aaad1f0..9406051 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -76,7 +76,7 @@ jobs: - name: Run pip run: | export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage codecov + python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' - uses: actions/cache/save@v3 @@ -102,8 +102,16 @@ jobs: # test log should be saved on failure if: ${{ !cancelled() }} - - name: Upload coverage report + - name: Aggregate coverage reports run: | export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - ./ci/upload_cov.sh "${{ matrix.NAME }}" + ./ci/combine_cov.sh shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' + + - name: Upload coverage report + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "${{ matrix.NAME }}" + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 66e84be..9a25fa1 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,7 +33,7 @@ jobs: python-version: '3.x' - run: | python -m pip install --upgrade pip - python -m pip install pytest pytest-xdist pytest-subtests jsonschema coverage codecov + python -m pip install pytest pytest-xdist pytest-subtests jsonschema coverage - run: brew install pkg-config ninja llvm qt@5 - env: CPPFLAGS: "-I/usr/local/include" @@ -46,8 +46,17 @@ jobs: export PATH="$HOME/tools:/usr/local/opt/qt@5/bin:$PATH:$(brew --prefix llvm)/bin" export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH" ./tools/run_with_cov.py ./run_unittests.py + + - name: Aggregate coverage reports + run: ./ci/combine_cov.sh + - name: Upload coverage report - run: ./ci/upload_cov.sh "appleclang [unit tests]" + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "appleclang [unit tests]" + fail_ci_if_error: true + verbose: true project-tests-appleclang: @@ -81,7 +90,7 @@ jobs: - run: | python3 -m pip install --upgrade setuptools python3 -m pip install --upgrade pip - python3 -m pip install cython coverage codecov + python3 -m pip install cython coverage - env: CPPFLAGS: "-I/usr/local/include" LDFLAGS: "-L/usr/local/lib" @@ -94,8 +103,17 @@ jobs: export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH" export XML_CATALOG_FILES="/usr/local/etc/xml/catalog" ./tools/run_with_cov.py ./run_project_tests.py --backend=ninja + + - name: Aggregate coverage reports + run: ./ci/combine_cov.sh + - name: Upload coverage report - run: ./ci/upload_cov.sh "appleclang [project tests; unity=${{ matrix.unity }}]" + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "appleclang [project tests; unity=${{ matrix.unity }}]" + fail_ci_if_error: true + verbose: true Qt4macos: runs-on: macos-latest diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml index 4f05983..6ee91ef 100644 --- a/.github/workflows/msys2.yml +++ b/.github/workflows/msys2.yml @@ -87,7 +87,7 @@ jobs: - name: Install dependencies run: | - python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage codecov + python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage - name: Install pypy3 on x86_64 run: | @@ -129,5 +129,13 @@ jobs: name: ${{ matrix.NAME }} path: meson-test-run.* + - name: Aggregate coverage reports + run: ./ci/combine_cov.sh + - name: Upload coverage report - run: ./ci/upload_cov.sh "${{ matrix.NAME }}" + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "${{ matrix.NAME }}" + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/nonnative.yml b/.github/workflows/nonnative.yml index 2848fe6..8a4cb8e 100644 --- a/.github/workflows/nonnative.yml +++ b/.github/workflows/nonnative.yml @@ -36,9 +36,18 @@ jobs: - run: | apt-get -y purge clang gcc gdc apt-get -y autoremove - python3 -m pip install coverage codecov + python3 -m pip install coverage - uses: actions/checkout@v3 - name: Run tests run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./tools/run_with_cov.py ./run_tests.py $CI_ARGS --cross ubuntu-armhf.json --cross-only' + + - name: Aggregate coverage reports + run: ./ci/combine_cov.sh + - name: Upload coverage report - run: ./ci/upload_cov.sh "Ubuntu nonnative" + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "Ubuntu nonnative" + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml index bbaff85..46cbf0d 100644 --- a/.github/workflows/os_comp.yml +++ b/.github/workflows/os_comp.yml @@ -53,8 +53,17 @@ jobs: # They are defined in the `env` section in each image.json. CI_ARGS should be set # via the `args` array ub the image.json run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./tools/run_with_cov.py ./run_tests.py $CI_ARGS' + + - name: Aggregate coverage reports + run: ./ci/combine_cov.sh + - name: Upload coverage report - run: ./ci/upload_cov.sh "OS Comp [${{ matrix.cfg.name }}]" + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "OS Comp [${{ matrix.cfg.name }}]" + fail_ci_if_error: true + verbose: true pypy: name: 'Arch / PyPy' @@ -145,5 +154,13 @@ jobs: ./tools/run_with_cov.py ./run_tests.py $RUN_TESTS_ARGS -- $MESON_ARGS + - name: Aggregate coverage reports + run: ./ci/combine_cov.sh + - name: Upload coverage report - run: ./ci/upload_cov.sh "Ubuntu [${{ matrix.cfg.CC }} ${{ matrix.cfg.RUN_TESTS_ARGS }} ${{ matrix.cfg.MESON_ARGS }}]" + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "Ubuntu [${{ matrix.cfg.CC }} ${{ matrix.cfg.RUN_TESTS_ARGS }} ${{ matrix.cfg.MESON_ARGS }}]" + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/unusedargs_missingreturn.yml b/.github/workflows/unusedargs_missingreturn.yml index 07f87cd..a0e6f90 100644 --- a/.github/workflows/unusedargs_missingreturn.yml +++ b/.github/workflows/unusedargs_missingreturn.yml @@ -52,12 +52,21 @@ jobs: run: | sudo apt update -yq sudo apt install -yq --no-install-recommends g++ gfortran ninja-build gobjc gobjc++ - python -m pip install coverage codecov + python -m pip install coverage - run: ./tools/run_with_cov.py run_project_tests.py --only cmake common fortran platform-linux "objective c" "objective c++" env: MESON_CI_JOBNAME: linux-ubuntu-gcc-werror + + - name: Aggregate coverage reports + run: ./ci/combine_cov.sh + - name: Upload coverage report - run: ./ci/upload_cov.sh "UnusedMissingReturn" + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "UnusedMissingReturn" + fail_ci_if_error: true + verbose: true windows: runs-on: windows-latest @@ -67,7 +76,7 @@ jobs: with: python-version: '3.x' - - run: pip install ninja pefile coverage codecov + - run: pip install ninja pefile coverage - run: python ./tools/run_with_cov.py run_project_tests.py --only platform-windows env: @@ -76,5 +85,14 @@ jobs: FC: gfortran MESON_CI_JOBNAME: msys2-gcc-werror + - name: Aggregate coverage reports + run: ./ci/combine_cov.sh + shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' + - name: Upload coverage report - run: ./ci/upload_cov.sh "UnusedMissingReturn Windows" + uses: codecov/codecov-action@v3 + with: + files: .coverage/coverage.xml + name: "UnusedMissingReturn Windows" + fail_ci_if_error: true + verbose: true diff --git a/ci/ciimage/common.sh b/ci/ciimage/common.sh index 68a4dae..f6a52ae 100644 --- a/ci/ciimage/common.sh +++ b/ci/ciimage/common.sh @@ -15,7 +15,6 @@ base_python_pkgs=( pytest-xdist pytest-subtests coverage - codecov jsonschema ) diff --git a/ci/upload_cov.sh b/ci/combine_cov.sh index 089641b..99a503b 100755 --- a/ci/upload_cov.sh +++ b/ci/combine_cov.sh @@ -8,6 +8,3 @@ coverage xml echo "Printing report" coverage report - -echo "Uploading to codecov..." -codecov -f .coverage/coverage.xml -n "$1" |