Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Corryvreckan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Fabian Simon Lex
Corryvreckan
Commits
df1e1d2b
Commit
df1e1d2b
authored
3 years ago
by
Simon Spannagel
Browse files
Options
Downloads
Patches
Plain Diff
CI: corectly pick up macOS
parent
65b49a59
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab/ci/init_x86_64.sh
+38
-29
38 additions, 29 deletions
.gitlab/ci/init_x86_64.sh
with
38 additions
and
29 deletions
.gitlab/ci/init_x86_64.sh
+
38
−
29
View file @
df1e1d2b
#!/bin/bash
#!/bin/bash
# Determine which OS you are using
# Determine which OS you are using
if
[
"
$(
uname
)
"
==
"Linux"
]
;
then
if
[
"
$(
uname
)
"
=
"Linux"
]
;
then
if
[
"
$(
cat
/etc/
*
-release
|
grep
Scientific
)
"
]
;
then
if
[
"
$(
cat
/etc/
*
-release
|
grep
"CentOS Linux 7"
)
"
]
;
then
OS
=
slc6
echo
"Detected CentOS Linux 7"
elif
[
"
$(
cat
/etc/
*
-release
|
grep
CentOS
)
"
]
;
then
OS
=
centos7
OS
=
centos7
elif
[
"
$(
cat
/etc/
*
-release
|
grep
"CentOS Linux 8"
)
"
]
;
then
echo
"Detected CentOS Linux 8"
OS
=
centos8
else
else
echo
"Cannot detect OS, falling back to CentOS7"
echo
"Cannot detect OS, falling back to CentOS7"
OS
=
centos7
OS
=
centos7
fi
fi
elif
[
"
$(
uname
)
"
==
"Darwin"
]
;
then
elif
[
"
$(
uname
)
"
=
"Darwin"
]
;
then
if
[
$(
sw_vers
-productVersion
|
awk
-F
'.'
'{print $1 "." $2}'
)
==
"10.15"
]
;
then
MACOS_MAJOR
=
$(
sw_vers
-productVersion
|
awk
-F
'.'
'{print $1}'
)
MACOS_MINOR
=
$(
sw_vers
-productVersion
|
awk
-F
'.'
'{print $2}'
)
if
[
$MACOS_MAJOR
=
"11"
]
||
[
"
${
MACOS_MAJOR
}
.
${
MACOS_MINOR
}
"
=
"10.15"
]
;
then
OS
=
mac1015
OS
=
mac1015
else
else
echo
"
Bootstrap only works
o
n
macOS
Catalina (10.15)
"
echo
"
Unsupported version
o
f
macOS
${
MACOS_MAJOR
}
.
${
MACOS_MINOR
}
"
exit
1
exit
1
fi
fi
else
else
...
@@ -23,32 +27,37 @@ else
...
@@ -23,32 +27,37 @@ else
fi
fi
# Determine is you have CVMFS installed
# Determine is you have CVMFS installed
if
[
!
-d
"/cvmfs"
]
;
then
CVMFS_MOUNT
=
""
echo
"No CVMFS detected, please install it."
if
[
"
$OS
"
=
mac1015
]
;
then
CVMFS_MOUNT
=
"/Users/Shared"
fi
if
[
!
-d
"
${
CVMFS_MOUNT
}
/cvmfs"
]
;
then
echo
"No CVMFS detected, please install it. Looking at
${
CVMFS_MOUNT
}
/cvmfs"
exit
1
exit
1
fi
fi
if
[
!
-d
"/cvmfs/sft.cern.ch"
]
;
then
if
[
!
-d
"
${
CVMFS_MOUNT
}
/cvmfs/sft.cern.ch"
]
;
then
echo
"No SFT CVMFS repository detected, please make sure it is available."
echo
"No SFT CVMFS repository detected, please make sure it is available."
exit
1
exit
1
fi
fi
if
[
!
-d
"/cvmfs/geant4.cern.ch"
]
;
then
if
[
!
-d
"
${
CVMFS_MOUNT
}
/cvmfs/geant4.cern.ch"
]
;
then
echo
"No Geant4 CVMFS repository detected, please make sure it is available."
echo
"No Geant4 CVMFS repository detected, please make sure it is available."
exit
1
exit
1
fi
fi
# Determine which LCG version to use
# Determine which LCG version to use
DEFAULT_LCG
=
"LCG_9
8python3
"
DEFAULT_LCG
=
"LCG_9
9
"
if
[
-z
${
CORRY
_LCG_VERSION
}
]
;
then
if
[
-z
${
ALLPIX
_LCG_VERSION
}
]
;
then
echo
"No explicit LCG version set, using
${
DEFAULT_LCG
}
."
echo
"No explicit LCG version set, using
${
DEFAULT_LCG
}
."
CORRY
_LCG_VERSION
=
${
DEFAULT_LCG
}
ALLPIX
_LCG_VERSION
=
${
DEFAULT_LCG
}
fi
fi
# Determine which compiler to use
# Determine which compiler to use
if
[
-z
${
COMPILER_TYPE
}
]
;
then
if
[
-z
${
COMPILER_TYPE
}
]
;
then
if
[
"
$(
uname
)
"
=
=
"Darwin"
]
;
then
if
[
"
$(
uname
)
"
=
"Darwin"
]
;
then
COMPILER_TYPE
=
"llvm"
COMPILER_TYPE
=
"llvm"
echo
"No compiler type set, falling back to AppleClang."
echo
"No compiler type set, falling back to AppleClang."
else
else
...
@@ -56,17 +65,13 @@ if [ -z ${COMPILER_TYPE} ]; then
...
@@ -56,17 +65,13 @@ if [ -z ${COMPILER_TYPE} ]; then
COMPILER_TYPE
=
"gcc"
COMPILER_TYPE
=
"gcc"
fi
fi
fi
fi
if
[
${
COMPILER_TYPE
}
==
"gcc"
]
;
then
if
[
${
COMPILER_TYPE
}
=
"gcc"
]
;
then
if
[
${
OS
}
==
"slc6"
]
;
then
COMPILER_VERSION
=
"gcc10"
COMPILER_VERSION
=
"gcc8"
else
COMPILER_VERSION
=
"gcc10"
fi
echo
"Compiler type set to GCC, version
${
COMPILER_VERSION
}
."
echo
"Compiler type set to GCC, version
${
COMPILER_VERSION
}
."
fi
fi
if
[
${
COMPILER_TYPE
}
=
=
"llvm"
]
;
then
if
[
${
COMPILER_TYPE
}
=
"llvm"
]
;
then
if
[
"
$(
uname
)
"
=
=
"Darwin"
]
;
then
if
[
"
$(
uname
)
"
=
"Darwin"
]
;
then
COMPILER_VERSION
=
"clang1
1
0"
COMPILER_VERSION
=
"clang1
2
0"
else
else
COMPILER_VERSION
=
"clang10"
COMPILER_VERSION
=
"clang10"
fi
fi
...
@@ -79,15 +84,19 @@ if [ -z ${BUILD_TYPE} ]; then
...
@@ -79,15 +84,19 @@ if [ -z ${BUILD_TYPE} ]; then
fi
fi
# General variables
# General variables
SFTREPO
=
/cvmfs/sft.cern.ch
SFTREPO
=
${
CVMFS_MOUNT
}
/cvmfs/sft.cern.ch
export
BUILD_FLAVOUR
=
x86_64-
${
OS
}
-
${
COMPILER_VERSION
}
-
${
BUILD_TYPE
}
export
BUILD_FLAVOUR
=
x86_64-
${
OS
}
-
${
COMPILER_VERSION
}
-
${
BUILD_TYPE
}
#--------------------------------------------------------------------------------
#--------------------------------------------------------------------------------
# Source
full LCG v
ie
w
# Source
dependenc
ie
s
#--------------------------------------------------------------------------------
#--------------------------------------------------------------------------------
export
LCG_VIEW
=
${
SFTREPO
}
/lcg/views/
${
CORRY
_LCG_VERSION
}
/
${
BUILD_FLAVOUR
}
/setup.sh
export
LCG_VIEW
=
${
SFTREPO
}
/lcg/views/
${
ALLPIX
_LCG_VERSION
}
/
${
BUILD_FLAVOUR
}
/setup.sh
source
${
LCG_VIEW
}
||
echo
"yes"
source
${
LCG_VIEW
}
||
echo
"yes"
# Fix LCIO path for LCG_96, cmake configs are not properly placed:
if
[
-n
"
${
CI
}
"
]
&&
[
"
$(
uname
)
"
=
"Darwin"
]
;
then
export
LCIO_DIR
=
$(
dirname
$(
dirname
$(
readlink
$(
which lcio_event_counter
))))
source
$ROOTSYS
/bin/thisroot.sh
cd
$G4INSTALL
/bin/
source
geant4.sh
cd
-
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