diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-04-14 14:12:35 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2023-04-21 13:30:45 +0530 |
commit | c0c9f755a40a51889e73275578cb49296de84e43 (patch) | |
tree | 94f9e6272b8cbe2faf6f8ee70231b7968ec59d87 /.github/workflows | |
parent | 5eb55075baa2883170a3d0cf3c0621aae56a1632 (diff) | |
download | meson-c0c9f755a40a51889e73275578cb49296de84e43.zip meson-c0c9f755a40a51889e73275578cb49296de84e43.tar.gz meson-c0c9f755a40a51889e73275578cb49296de84e43.tar.bz2 |
ci: Move to the codecov github action
The pypi package was suddenly removed. Not the most
confidence-inspiring deprecation/migration:
https://about.codecov.io/blog/message-regarding-the-pypi-package/
Diffstat (limited to '.github/workflows')
-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 |
6 files changed, 95 insertions, 17 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 |