Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 92fe81fa authored by hhakim's avatar hhakim
Browse files

Move coverage computation ci jobs to nightly schedule pipeline (for cpp it is...

Move coverage computation ci jobs to nightly schedule pipeline (for cpp it is still enabled for revision git-pushes).
parent 7e97e658
Branches
Tags
No related merge requests found
Pipeline #859505 passed
......@@ -33,7 +33,7 @@ stages:
- test
- pkg_purepy
- pkg
- code_cov
# - code_cov # no need this stage anymore because coverage computation ci jobs download the needed packages by themselves
- pkg_test
- pkg_pub
- gitlab_pages
......@@ -53,8 +53,8 @@ ctest:
- if [[ ! -r "$REPORT_PATH" ]]; then exit 1; fi
- if grep -B 1 'Outcome:.*Failed' "$REPORT_PATH" | sed -ne 's%.*Test case:.*<b>\(.*\)</b>.*%\1%p'; then exit 1; else echo "all tests passed"; exit 0; fi
except:
- schedules
- tags
# - schedules # ran on schedule too to keep track of coverage (badge are based on last successful pipeline)
stage: test
tags:
- linux
......@@ -132,13 +132,15 @@ ctest_matlab:
<<: *ctest_script
variables: {BUILD_WRAPPER_MATLAB: "ON", BUILD_WRAPPER_PYTHON: "ON", SLOW_TESTS: "ON", DONT_PYPLOT_FAUST_TIME: "ON", NOPY2: "ON", BUILD_MULTITHREAD: "ON"}
only:
- schedules
- schedules
except:
- tags
ctest_nightly_linux:
<<: *ctest_nightly_script
tags:
- linux
- matlab
<<: *ctest_nightly_script
tags:
- linux
- matlab
ctest_nightly_macos:
<<: *ctest_nightly_script
......@@ -219,8 +221,21 @@ doctest_matfaust:
- tags
- schedules
.download_job_artifacts:
before_script:
- if [[ -z "$ARTIFACT_JOB_NAME" ]]; then echo "variable ARTIFACT_JOB_NAME must be set"; exit 1; fi
- 'JOB_ID=$(curl -s --header "PRIVATE-TOKEN: $GITLAB_API_READ_TOKEN" "https://gitlab.inria.fr/api/v4/projects/6960/jobs?scope=success&per_page=10000" 2>&1 | tee -a /tmp/log_curl_doctest_matfaust | sed -e "s/}/}\n/g" | grep "\"${ARTIFACT_JOB_NAME}\"" | head -1 | sed -ne "s/.*{\"id\":\([[:digit:]]\+\).*${ARTIFACT_JOB_NAME}.*/\1/p") || echo JOB_ID=$JOB_ID'
# download artifact archive
- 'curl --header "PRIVATE-TOKEN: $GITLAB_API_READ_TOKEN" https://gitlab.inria.fr/api/v4/projects/6960/jobs/$JOB_ID/artifacts > artifacts.zip'
# what's in this archive? test it.
- zip -Tv artifacts
- unzip artifacts.zip
- rm artifacts.zip
matfaust_test_code_coverage:
stage: code_cov
variables: {ARTIFACT_JOB_NAME: 'pkg_linux'}
extends: .download_job_artifacts
#stage: code_cov
coverage: '/Coverage: \d+\.\d+\%/'
script:
- rm -Rf ~gitlab-runner/matlab # avoid interference with rpm installed faust
......@@ -243,15 +258,18 @@ matfaust_test_code_coverage:
tags:
- linux
- matlab
only:
- schedules
except:
- tags
- schedules
pyfaust_test_code_coverage:
stage: code_cov
variables: {ARTIFACT_JOB_NAME: 'pkg_linux_purepy_rev'}
extends: .download_job_artifacts
#stage: code_cov
coverage: '/Coverage:.*\%/'
script:
- misc/continuous_integration/jobs/linux/pyfaust_coverage.sh
- misc/continuous_integration/jobs/linux/pyfaust_coverage.sh build/wrapper/python/dist/*.whl
after_script:
- conda-env remove -n test_coverage_pyfaust
except:
......@@ -264,9 +282,13 @@ pyfaust_test_code_coverage:
- htmlcov
when: always
expire_in: '6 months'
needs:
- job: pkg_linux_purepy_rev
artifacts: true
# needs: # it was valid when this job was in the same pipeline as pkg_linux_purepy_rev, now we use download_job_artifacts
# - job: pkg_linux_purepy_rev
# artifacts: true
only:
- schedules
except:
- tags
pkg_macos:
stage: pkg
......
......@@ -131,8 +131,8 @@ It really matters to keep a metric of how much code is covered by the tests in t
![matfaust test coverage](https://gitlab.inria.fr/faustgrp/faust/badges/hakim_branch/coverage.svg?job=matfaust_test_code_coverage&key_text=matfaustcov&key_width=90)
- C++ test coverage: the calculation of the coverage for C++ tests is
integrated directly in the ``ctest`` CI job (see the badge in the next to know
the coverage rate).
integrated directly in the ``ctest``/``ctest_nightly_linux`` CI job
(see the badge in the next to know the coverage rate).
- About GPU code: GPU code is tested mainly in C++ tests but ``pyfaust.tests``
submodule provides the same tests on GPU and CPU (except for the CPU only API).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment