|
|
|
|
@ -1,6 +1,14 @@
|
|
|
|
|
version: 2.1 |
|
|
|
|
|
|
|
|
|
orbs: |
|
|
|
|
# Version 3.2.4 is the "new" uploader, but it's a 50 MB Node.js *binary* and |
|
|
|
|
# doesn't work on ARM64 Linux (or ARM Macs, or FreeBSD for that matter) and |
|
|
|
|
# nobody seems to care. Issues opened since Septembe 2021: |
|
|
|
|
# https://github.com/codecov/uploader/issues/347 |
|
|
|
|
# https://github.com/codecov/uploader/issues/523 |
|
|
|
|
# https://github.com/codecov/uploader/issues/849 |
|
|
|
|
# The old 1.1.1 still seems to work even though codecov got removed from pip |
|
|
|
|
# on 2023-04-14. |
|
|
|
|
codecov: codecov/codecov@1.1.1 |
|
|
|
|
|
|
|
|
|
executors: |
|
|
|
|
@ -151,8 +159,8 @@ commands:
|
|
|
|
|
type: string |
|
|
|
|
steps: |
|
|
|
|
- run: |
|
|
|
|
name: Install coverage and codecov |
|
|
|
|
command: pip3 install coverage codecov |
|
|
|
|
name: Install coverage |
|
|
|
|
command: pip3 install coverage |
|
|
|
|
- checkout |
|
|
|
|
- run: |
|
|
|
|
name: Build & test |
|
|
|
|
@ -161,6 +169,33 @@ commands:
|
|
|
|
|
if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi |
|
|
|
|
./package/ci/<< parameters.script >> |
|
|
|
|
|
|
|
|
|
# Official docs say "token not needed for public repos", in reality not using |
|
|
|
|
# the token is "extremely flakey". What's best is that if the upload fails, |
|
|
|
|
# the damn thing exits with a success error code, and nobody cares: |
|
|
|
|
# https://github.com/codecov/codecov-circleci-orb/issues/139 |
|
|
|
|
upload-codecov: |
|
|
|
|
parameters: |
|
|
|
|
file: |
|
|
|
|
type: string |
|
|
|
|
steps: |
|
|
|
|
# Second best thing is that the codecov/upload helper takes a `token` |
|
|
|
|
# parameter. But the token parameter is an ENVIRONMENT VARIABLE NAME!! So |
|
|
|
|
# one just *can't* pass the token there. It got changed arbitrarily in |
|
|
|
|
# https://github.com/codecov/codecov-circleci-orb/pull/93 "because |
|
|
|
|
# CircleCI docs suggested so", yet all codecov docs suggest just |
|
|
|
|
# commiting that token directly to the YML files because "it's fine". So |
|
|
|
|
# if it's fine, why do I have to suffer like this?! |
|
|
|
|
- run: |
|
|
|
|
name: Set codecov upload token because everything is a dumpster fire |
|
|
|
|
# An icing on the cake is that CircleCI commands don't allow setting |
|
|
|
|
# `environment` for `commands`, only for `jobs`, so I have to do that |
|
|
|
|
# via bash, and because the environment isn't passsed from a run to |
|
|
|
|
# run, use the BASH_ENV hack. Mmm. Technology. |
|
|
|
|
command: | |
|
|
|
|
echo 'export CODECOV_TOKEN=ade9e2f1-d6d7-45cb-a292-c5bb1ad45be9' >> "$BASH_ENV" |
|
|
|
|
- codecov/upload: |
|
|
|
|
file: << parameters.file >> |
|
|
|
|
|
|
|
|
|
lcov: |
|
|
|
|
steps: |
|
|
|
|
- run: |
|
|
|
|
@ -170,7 +205,7 @@ commands:
|
|
|
|
|
lcov $LCOV_EXTRA_OPTS --directory . --capture --output-file coverage.info > /dev/null |
|
|
|
|
lcov $LCOV_EXTRA_OPTS --extract coverage.info "*/src/python/*" "*/src/Corrade/*" "*/src/Magnum/*" --output-file coverage.info > /dev/null |
|
|
|
|
cd src/python && coverage combine |
|
|
|
|
- codecov/upload: |
|
|
|
|
- upload-codecov: |
|
|
|
|
file: coverage.info |
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
|
|