Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common_bench
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
common_bench
Commits
39cd1109
Commit
39cd1109
authored
7 months ago
by
Dmitry Kalinkin
Browse files
Options
Downloads
Patches
Plain Diff
Delete build_detector.sh
parent
46ec0ee7
Branches
features/env-dev-build-n-packages
No related tags found
1 merge request
!89
Delete build_detector.sh
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+0
-8
0 additions, 8 deletions
.gitlab-ci.yml
bin/build_detector.sh
+0
-118
0 additions, 118 deletions
bin/build_detector.sh
with
0 additions
and
126 deletions
.gitlab-ci.yml
+
0
−
8
View file @
39cd1109
...
@@ -62,14 +62,6 @@ common:setup:
...
@@ -62,14 +62,6 @@ common:setup:
script
:
script
:
-
git clone -b ${CI_COMMIT_REF_NAME} https://eicweb.phy.anl.gov/EIC/benchmarks/common_bench.git setup
-
git clone -b ${CI_COMMIT_REF_NAME} https://eicweb.phy.anl.gov/EIC/benchmarks/common_bench.git setup
-
source setup/bin/env.sh && ./setup/bin/install_common.sh
-
source setup/bin/env.sh && ./setup/bin/install_common.sh
common:detector
:
stage
:
initialize
needs
:
[
"
common:setup"
]
rules
:
-
if
:
'
$CI_SERVER_HOST
==
"eicweb.phy.anl.gov"'
script
:
-
source .local/bin/env.sh && build_detector.sh
-
bin/mkdir_local_data_link sim_output
-
bin/mkdir_local_data_link sim_output
-
print_env.sh
-
print_env.sh
-
ls -lrth
-
ls -lrth
...
...
This diff is collapsed.
Click to expand it.
bin/build_detector.sh
deleted
100755 → 0
+
0
−
118
View file @
46ec0ee7
#!/bin/bash
## =============================================================================
## Build and install the DETECTOR detector package into our local prefix
## =============================================================================
## =============================================================================
## Load the environment variables. To build the detector we need the following
## variables:
##
## - DETECTOR: the detector package we want to use for this benchmark
## - LOCAL_PREFIX: location where local packages should be installed
## - LOCAL_DATA_PATH: local storage for pipeline jobs
## - DETECTOR_PREFIX: prefix for the detector definition repositories
## - DETECTOR_PATH: full path for the detector definitions
## this is the same as ${LOCAL_PREFIX}/share/${DETECTOR}
if
[
-n
"
${
LOCAL_PREFIX
}
"
]
;
then
source
.local/bin/env.sh
else
source
${
LOCAL_PREFIX
}
/bin/env.sh
fi
./
${
LOCAL_PREFIX
}
/bin/print_env.sh
# this is like git clone, but allows to fetch any reference, including by git commit SHA
function
fetchgit
()
{
local
path
=
$1
local
ref
=
$2
local
uri
=
$3
mkdir
${
path
}
git
-C
"
${
path
}
"
init
git
-C
"
${
path
}
"
remote add origin
"
${
uri
}
"
git
-C
"
${
path
}
"
fetch origin
"
${
ref
}
"
git
-C
"
${
path
}
"
checkout
"
${
ref
}
"
}
## =============================================================================
## Step 1: download/update the detector definitions (if needed)
pushd
${
DETECTOR_PREFIX
}
## We need an up-to-date copy of the detector
## start clean to avoid issues...
if
[
-d
"
${
DETECTOR
}
"
]
;
then
echo
"cleaning up
${
DETECTOR
}
"
mv
"
${
DETECTOR
}
"
"
$(
mktemp
)
-
${
DETECTOR
}
"
fi
echo
"Fetching
${
DETECTOR
}
"
#if [ "${DETECTOR}" == "epic" ] ; then
if
[
-n
"
${
DETECTOR_DEPLOY_TOKEN_USERNAME
:-}
"
-a
-n
"
${
DETECTOR_DEPLOY_TOKEN_PASSWORD
:-}
"
]
;
then
DEPLOY_TOKEN
=
"
${
DETECTOR_DEPLOY_TOKEN_USERNAME
}
:
${
DETECTOR_DEPLOY_TOKEN_PASSWORD
}
@"
echo
"Deploy token for
${
DETECTOR_DEPLOY_TOKEN_USERNAME
}
is masked in the next line."
else
DEPLOY_TOKEN
=
""
fi
echo
"fetchgit
${
DETECTOR
}
${
DETECTOR_VERSION
}
${
DETECTOR_REPOSITORYURL
:-
https
://eicweb.phy.anl.gov/EIC/detectors/
${
DETECTOR
}
.git
}
"
fetchgit
${
DETECTOR
}
${
DETECTOR_VERSION
}
${
DETECTOR_REPOSITORYURL
:-
https
://
${
DEPLOY_TOKEN
}
eicweb
.phy.anl.gov/EIC/detectors/
${
DETECTOR
}
.git
}
if
[
-f
"
${
DETECTOR
}
/requirements.txt"
]
;
then
python
-m
pip
install
-r
${
DETECTOR
}
/requirements.txt
fi
rm
-rf
"
${
DETECTOR
}
/.git"
popd
if
[
"
${
BEAMLINE
}
"
]
;
then
pushd
${
DETECTOR_PREFIX
}
## We need an up-to-date copy of the detector
## start clean to avoid issues...
if
[
-d
"
${
BEAMLINE
}
"
]
;
then
echo
"cleaning up
${
BEAMLINE
}
"
mv
"
${
BEAMLINE
}
"
"
$(
mktemp
)
-
${
BEAMLINE
}
"
fi
echo
"Fetching
${
BEAMLINE
}
"
if
[
-n
"
${
BEAMLINE_DEPLOY_TOKEN_USERNAME
:-}
"
-a
-n
"
${
BEAMLINE_DEPLOY_TOKEN_PASSWORD
:-}
"
]
;
then
DEPLOY_TOKEN
=
"
${
BEAMLINE_DEPLOY_TOKEN_USERNAME
}
:
${
BEAMLINE_DEPLOY_TOKEN_PASSWORD
}
@"
echo
"Deploy token for
${
BEAMLINE_DEPLOY_TOKEN_USERNAME
}
is masked in the next line."
else
DEPLOY_TOKEN
=
""
fi
echo
"fetchgit
${
BEAMLINE
}
${
BEAMLINE_VERSION
}
${
BEAMLINE_REPOSITORYURL
:-
https
://eicweb.phy.anl.gov/EIC/detectors/
${
BEAMLINE
}
.git
}
"
fetchgit
${
BEAMLINE
}
${
BEAMLINE_VERSION
}
${
BEAMLINE_REPOSITORYURL
:-
https
://
${
DEPLOY_TOKEN
}
eicweb
.phy.anl.gov/EIC/detectors/
${
BEAMLINE
}
.git
}
[[
"
$?
"
==
"0"
]]
||
exit
1
rm
-rf
"
${
BEAMLINE
}
/.git"
popd
#echo "ln -s -f ${BEAMLINE} ${DETECTOR}/${BEAMLINE} "
#ln -s -f ${BEAMLINE} ${DETECTOR}/${BEAMLINE}
#[[ "$?" == "0" ]] || exit 1
mkdir
-p
${
DETECTOR_PREFIX
}
/
${
BEAMLINE
}
_build
pushd
${
DETECTOR_PREFIX
}
/
${
BEAMLINE
}
_build
cmake
${
DETECTOR_PREFIX
}
/
${
BEAMLINE
}
-DCMAKE_INSTALL_PREFIX
=
${
LOCAL_PREFIX
}
-DCMAKE_CXX_STANDARD
=
17
-DCENTRAL_DETECTOR
=
${
DETECTOR
}
&&
make
-j
$((
$(
nproc
)
/
4
+
1
))
install
||
exit
1
popd
rm
-rf
${
DETECTOR_PREFIX
}
/
${
BEAMLINE
}
_build
fi
## =============================================================================
## Step 2: Compile and install the detector definition
echo
"Building and installing the
${
DETECTOR
}
package"
mkdir
-p
${
DETECTOR_PREFIX
}
/
${
DETECTOR
}
_build
pushd
${
DETECTOR_PREFIX
}
/
${
DETECTOR
}
_build
cmake
${
DETECTOR_PREFIX
}
/
${
DETECTOR
}
-DCMAKE_INSTALL_PREFIX
=
${
LOCAL_PREFIX
}
-DCMAKE_CXX_STANDARD
=
17
&&
make
-j
$((
$(
nproc
)
/
4
+
1
))
install
||
exit
1
popd
rm
-rf
${
DETECTOR_PREFIX
}
/
${
DETECTOR
}
_build
## =============================================================================
## Step 3: That's all!
echo
"Detector build/install complete!"
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