Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hqr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
solverstack
hqr
Commits
64c33858
Commit
64c33858
authored
4 months ago
by
PRUVOST Florent
Browse files
Options
Downloads
Patches
Plain Diff
Update docker environmnent
parent
0f85e4de
No related branches found
No related tags found
1 merge request
!26
Update docker environment
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+20
-18
20 additions, 18 deletions
.gitlab-ci.yml
.gitlab/analysis.sh
+3
-2
3 additions, 2 deletions
.gitlab/analysis.sh
.gitlab/build.sh
+5
-10
5 additions, 10 deletions
.gitlab/build.sh
.gitlab/test.sh
+4
-9
4 additions, 9 deletions
.gitlab/test.sh
with
32 additions
and
39 deletions
.gitlab-ci.yml
+
20
−
18
View file @
64c33858
image
:
registry.gitlab.inria.fr/solverstack/docker/distrib
stages
:
-
pre
-
build
-
test
-
analyze
default
:
image
:
registry.gitlab.inria.fr/solverstack/docker/base
tags
:
[
'
ci.inria.fr'
,
'
linux'
,
'
small'
]
# gitlab instance runner (i.e. docker on linux)
interruptible
:
true
before_script
:
-
git config --global --add safe.directory $CI_PROJECT_DIR
-
git submodule update --init --recursive
.only-master-mr
:
interruptible
:
true
rules
:
-
if
:
($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /^ci-.*$/)
-
if
:
($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !~ /^notest-.*$/)
.only-mr
:
interruptible
:
true
rules
:
-
if
:
($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !~ /^notest-.*$/)
preliminary_checks
:
stage
:
pre
tags
:
[
"
docker"
,
"
large"
]
interruptible
:
true
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
parallel
:
...
...
@@ -35,7 +34,6 @@ preliminary_checks:
hqr_build_linux
:
stage
:
build
tags
:
[
"
docker"
,
"
large"
]
extends
:
.only-master-mr
variables
:
SYSTEM
:
linux
...
...
@@ -43,7 +41,7 @@ hqr_build_linux:
-
bash .gitlab/build.sh | tee hqr-build-linux.log
artifacts
:
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in
:
1
80 minutes
expire_in
:
1
week
untracked
:
true
hqr_build_macosx
:
...
...
@@ -56,7 +54,7 @@ hqr_build_macosx:
-
bash .gitlab/build.sh | tee hqr-build-linux.log
artifacts
:
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in
:
1
80 minutes
expire_in
:
1
week
paths
:
-
hqr-build-linux.log
cache
:
...
...
@@ -76,7 +74,7 @@ hqr_build_windows:
-
bash -lc .gitlab/build.sh | tee hqr-build-linux.log
artifacts
:
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in
:
1
80 minutes
expire_in
:
1
week
paths
:
-
hqr-build-linux.log
cache
:
...
...
@@ -86,7 +84,6 @@ hqr_build_windows:
hqr_test_linux
:
stage
:
test
tags
:
[
"
docker"
,
"
large"
]
extends
:
.only-master-mr
needs
:
[
hqr_build_linux
]
variables
:
...
...
@@ -96,14 +93,18 @@ hqr_test_linux:
coverage
:
/^\s*lines......:\s*\d+.\d+\%/
artifacts
:
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in
:
180 minutes
when
:
always
expire_in
:
1 week
paths
:
-
hqr-test-linux.log
-
junit.xml
-
hqr.lcov
-
hqr-
coverage.xml
-
coverage.xml
reports
:
junit
:
junit.xml
coverage_report
:
coverage_format
:
cobertura
path
:
coverage.xml
hqr_test_macosx
:
stage
:
test
...
...
@@ -116,7 +117,8 @@ hqr_test_macosx:
-
bash .gitlab/test.sh | tee hqr-test-macosx.log
artifacts
:
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in
:
180 minutes
when
:
always
expire_in
:
1 week
paths
:
-
hqr-test-macosx.log
reports
:
...
...
@@ -139,7 +141,8 @@ hqr_test_windows:
-
bash .gitlab/test.sh | tee hqr-test-windows.log
artifacts
:
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in
:
180 minutes
when
:
always
expire_in
:
1 week
paths
:
-
hqr-test-windows.log
reports
:
...
...
@@ -151,8 +154,7 @@ hqr_test_windows:
sonarqube
:
stage
:
analyze
tags
:
[
"
docker"
,
"
large"
]
interruptible
:
true
image
:
registry.gitlab.inria.fr/solverstack/docker/analysis
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /^ci-.*$/
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !~ /^notest-.*$/
...
...
@@ -165,7 +167,7 @@ sonarqube:
-
./.gitlab/analysis.sh
artifacts
:
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in
:
1
80 minutes
expire_in
:
1
week
paths
:
-
filelist.txt
-
hqr-cppcheck.xml
...
...
This diff is collapsed.
Click to expand it.
.gitlab/analysis.sh
+
3
−
2
View file @
64c33858
...
...
@@ -15,7 +15,8 @@
# - we consider to be in HQR's source code root
# - we consider having the junit.xml file and the coverage file hqr-coverage.xml in the root directory
# - we consider having cppcheck, rats, sonar-scanner programs available in the environment
set
-e
set
-x
if
[
$#
-gt
0
]
then
BUILDDIR
=
$1
...
...
@@ -30,7 +31,7 @@ git ls-files | grep "\.[ch]$" > filelist.txt
export
UNDEFINITIONS
=
"-UWIN32 -UWIN64 -U_MSC_EXTENSIONS -U_MSC_VER -U__SUNPRO_C -U__SUNPRO_CC -U__sun -Usun -U__cplusplus"
# run cppcheck analysis
cppcheck
-v
-f
--project
=
build/compile_commands.json
--language
=
c
--platform
=
unix64
--enable
=
all
--xml
--xml-version
=
2
--suppress
=
missingInclude
${
UNDEFINITIONS
}
${
DEFINITIONS
}
--file-list
=
./filelist.txt
2> hqr-cppcheck.xml
cppcheck
-v
-f
--project
=
build/compile_commands.json
--language
=
c
--platform
=
unix64
--enable
=
all
--xml
--xml-version
=
2
--suppress
=
missingInclude
${
UNDEFINITIONS
}
${
DEFINITIONS
}
2> hqr-cppcheck.xml
# run rats analysis
rats
-w
3
--xml
`
cat
filelist.txt
`
>
hqr-rats.xml
...
...
This diff is collapsed.
Click to expand it.
.gitlab/build.sh
+
5
−
10
View file @
64c33858
#!/usr/bin/env bash
fatal
()
{
echo
"
$0
: error occurred, exit"
exit
1
}
set
-e
set
-x
if
[[
"
$SYSTEM
"
==
"linux"
]]
;
then
...
...
@@ -13,14 +8,14 @@ if [[ "$SYSTEM" == "linux" ]]; then
cmake
-B
build
-S
.
-DCMAKE_INSTALL_PREFIX
=
$PWD
/install
\
-DBUILD_SHARED_LIBS
=
ON
-DCMAKE_VERBOSE_MAKEFILE
=
ON
\
-DCMAKE_C_FLAGS
=
"-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option -fno-inline"
\
-DCMAKE_EXE_LINKER_FLAGS
=
"--coverage"
-DCMAKE_EXPORT_COMPILE_COMMANDS
=
ON
||
fatal
-DCMAKE_EXE_LINKER_FLAGS
=
"--coverage"
-DCMAKE_EXPORT_COMPILE_COMMANDS
=
ON
else
# no coverage analysis on other platforms
cmake
-B
build
-S
.
-DCMAKE_INSTALL_PREFIX
=
$PWD
/install
\
-DBUILD_SHARED_LIBS
=
ON
-DCMAKE_VERBOSE_MAKEFILE
=
ON
||
fatal
-DBUILD_SHARED_LIBS
=
ON
-DCMAKE_VERBOSE_MAKEFILE
=
ON
fi
cmake
--build
build
-j
4
||
fatal
cmake
--install
build
||
fatal
cmake
--build
build
-j
4
cmake
--install
build
This diff is collapsed.
Click to expand it.
.gitlab/test.sh
+
4
−
9
View file @
64c33858
#!/usr/bin/env bash
fatal
()
{
echo
"
$0
: error occurred, exit"
exit
1
}
set
-e
set
-x
if
[[
"
$SYSTEM
"
==
"linux"
]]
;
then
source install
/bin/hqr_env.sh
||
fatal
source install
/bin/hqr_env.sh
fi
cd
build
if
[[
"
$SYSTEM
"
==
"windows"
]]
;
then
...
...
@@ -16,12 +11,12 @@ if [[ "$SYSTEM" == "windows" ]]; then
export
PATH
=
"/c/Windows/WinSxS/x86_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_10.0.19041.1_none_21374cb0681a6320"
:
$PATH
export
PATH
=
$PWD
/src:
$PATH
fi
ctest
--output-on-failure
--no-compress-output
-T
Test
--output-junit
../junit.xml
||
fatal
ctest
--output-on-failure
--no-compress-output
-T
Test
--output-junit
../junit.xml
if
[[
"
$SYSTEM
"
==
"linux"
]]
;
then
# clang is used on macosx and it is not compatible with --coverage option
# so that we can only make the coverage report on the linux runner with gcc
cd
..
lcov
--capture
--directory
build
-q
--output-file
hqr.lcov
lcov
--summary
hqr.lcov
lcov_cobertura hqr.lcov
--output
hqr-
coverage.xml
lcov_cobertura hqr.lcov
--output
coverage.xml
fi
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