Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
physics_benchmarks
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
Container 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
EIC
benchmarks
physics_benchmarks
Merge requests
!1
Refactor CI setup
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Refactor CI setup
refactor_ci
into
master
Overview
0
Commits
1
Pipelines
0
Changes
17
Merged
Sylvester Joosten
requested to merge
refactor_ci
into
master
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
17
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
1443e856
1 commit,
4 years ago
17 files
+
167
−
156
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
17
Search (e.g. *.vue) (Ctrl+P)
bin/gen_ci_config deleted
100755 → 0
+
0
−
101
Options
#!/bin/bash
set
-o
nounset
set
-o
errexit
BENCHMARK_SCRIPT_DIR
=
./dummy
CI_TAG
=
sodium
CI_JOB_PREFIX
=
test_
CI_FAILURE
=
"true"
function
print_the_help
{
echo
"USAGE:
$0
[-t <runner_tag>] "
echo
" OPTIONS: "
echo
" -i,--input Input scripts directory "
echo
" -t,--tag Gitlab Runner tag"
echo
" -p,--prefix job name prefix"
echo
" --no-failure do not allow failures"
exit
}
POSITIONAL
=()
while
[[
$#
-gt
0
]]
do
key
=
"
$1
"
case
$key
in
-h
|
--help
)
shift
# past argument
print_the_help
;;
-i
|
--input
)
BENCHMARK_SCRIPT_DIR
=
"
$2
"
shift
# past argument
shift
# past value
;;
-t
|
--tag
)
CI_TAG
=
"
$2
"
shift
# past argument
shift
# past value
;;
-p
|
--prefix
)
CI_JOB_PREFIX
=
"
$2
"
shift
# past argument
shift
# past value
;;
--no-failure
)
CI_FAILURE
=
"false"
shift
# past argument
;;
*
)
# unknown option
#POSITIONAL+=("$1") # save it in an array for later
echo
"unknown option
$1
"
print_the_help
shift
# past argument
;;
esac
done
set
--
"
${
POSITIONAL
[@]
}
"
# restore positional parameters
shopt
-s
nullglob
ifile
=
0
cat
<<
EOF
stages:
#- simulate
- benchmarks
EOF
for
script_name
in
${
BENCHMARK_SCRIPT_DIR
}
/
*
.sh
do
filename
=
$(
basename
${
script_name
}
)
filename_noext
=
"
${
filename
%%.*
}
"
ifile
=
$((
ifile+1
))
cat
<<
EOF
${
CI_JOB_PREFIX
}${
ifile
}
_
${
filename_noext
}
:
tags:
-
${
CI_TAG
}
stage: benchmarks
script:
- bash
${
script_name
}
allow_failure:
${
CI_FAILURE
}
EOF
done
for
script_name
in
${
BENCHMARK_SCRIPT_DIR
}
/
*
.cxx
do
filename
=
$(
basename
${
script_name
}
)
filename_noext
=
"
${
filename
%%.*
}
"
ifile
=
$((
ifile+1
))
cat
<<
EOF
${
CI_JOB_PREFIX
}${
ifile
}
_
${
filename_noext
}
:
tags:
-
${
CI_TAG
}
stage: benchmarks
script:
- root -b -q
${
script_name
}
allow_failure:
${
CI_FAILURE
}
EOF
done
Loading