Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batsched
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
poquet
millian
batsched
Commits
313a49a9
Commit
313a49a9
authored
5 years ago
by
Millian Poquet
Browse files
Options
Downloads
Patches
Plain Diff
[ci] compute coverage and send it to codecov
parent
ec65bfd2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+9
-25
9 additions, 25 deletions
.gitlab-ci.yml
with
9 additions
and
25 deletions
.gitlab-ci.yml
+
9
−
25
View file @
313a49a9
...
@@ -15,38 +15,22 @@ build_and_test:
...
@@ -15,38 +15,22 @@ build_and_test:
script
:
script
:
# Build batsched
# Build batsched
-
nix-shell --pure ./release.nix -A batsched --command ${CI_PROJECT_DIR}/ci/list-store-paths-for-cachix.bash | cachix push batsim
-
nix-shell --pure ./release.nix -A batsched --command ${CI_PROJECT_DIR}/ci/list-store-paths-for-cachix.bash | cachix push batsim
-
nix-build ./release.nix -A batsched
-
nix-build ./release.nix -A batsched
&& cp -rL result ./batsched
# Test against pinned batsim
# Test against pinned batsim
-
nix-shell --pure ./release.nix -A integration_tests --command ${CI_PROJECT_DIR}/ci/list-store-paths-for-cachix.bash | cachix push batsim
-
nix-shell --pure ./release.nix -A integration_tests --command ${CI_PROJECT_DIR}/ci/list-store-paths-for-cachix.bash | cachix push batsim
-
nix-build ./release.nix -A integration_tests && cp -rL result ./integration_tests
-
nix-build ./release.nix -A integration_tests && cp -rL result ./integration_tests
# Test against up-to-date batsim
# Test against up-to-date batsim
-
nix-shell --pure ./release.nix -A integration_tests_batlatest --command ${CI_PROJECT_DIR}/ci/list-store-paths-for-cachix.bash | cachix push batsim
-
nix-shell --pure ./release.nix -A integration_tests_batlatest --command ${CI_PROJECT_DIR}/ci/list-store-paths-for-cachix.bash | cachix push batsim
-
nix-build ./release.nix -A integration_tests_batlatest &&
cp -rL
result
./integration_tests_batlatest
-
nix-build ./release.nix -A integration_tests_batlatest &&
rm
result
# Fail job if tests failed
# Fail job if tests failed
-
if [[ "$(cat ./integration_tests/pytest_returncode)" -ne 0 ]] ; then echo "pytest returned non-zero (against pinned batsim), aborting" ; exit 1 ; fi
-
if [[ "$(cat ./integration_tests/pytest_returncode)" -ne 0 ]] ; then echo "pytest returned non-zero (against pinned batsim), aborting" ; exit 1 ; fi
-
if [[ "$(cat ./integration_tests_batlatest/pytest_returncode)" -ne 0 ]] ; then echo "pytest returned non-zero (against latest batsim), aborting" ; exit 1 ; fi
-
if [[ "$(cat ./integration_tests_batlatest/pytest_returncode)" -ne 0 ]] ; then echo "pytest returned non-zero (against latest batsim), aborting" ; exit 1 ; fi
# Send coverage results to codecov.io
-
nix-env -i gcc
-
mkdir -p merged
-
cp ./batsched/gcno/* ./integration_tests/gcda/* merged/
-
bash <(curl -s https://codecov.io/bash)
artifacts
:
artifacts
:
when
:
always
paths
:
paths
:
-
/builds/batsim/batsched/cover
-
/builds/batsim/batsched/integration_tests
###############################################################################
# Deploy stage
###############################################################################
deploy_coverage
:
stage
:
deploy
script
:
-
echo "Disabled for now."
-
exit
1
# Pushes Batsim's code doc (doxygen) onto the gforge website.
# SSH setup (do NOT run these commands on your machine)
-
eval $(ssh-agent -s)
-
echo "$SSH_PRIVATE_KEY" | tr -d ' ' | base64 --decode | ssh-add -
-
mkdir -p ~/.ssh
-
'
[[
-f
/.dockerenv
]]
&&
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>>
~/.ssh/config'
# Finally push the code documentation on the gforge website
-
rsync -rlgoDz --delete cover/html/ mpoquet@scm.gforge.inria.fr:/home/groups/batsim/htdocs/batsched/coverage
dependencies
:
-
build_and_test
only
:
-
master
allow_failure
:
true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment