-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun-macOS.sh
executable file
·65 lines (48 loc) · 1.87 KB
/
run-macOS.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/zsh
set -e
echo "::group::Launching container"
if [ -z "${VIEW_PATH}" ]; then
echo "Checking if there is a working CVMFS mount"
if [ ! -d "/Users/Shared/cvmfs/sft.cern.ch/lcg/" ]; then
echo "The directory /Users/Shared/cvmfs/sft.cern.ch/lcg cannot be accessed!"
echo "Make sure you are using the cvmfs-contrib/github-action-cvmfs@v2 action"
echo "and that you have set cvmfs_repositories: 'sft.cern.ch,geant4.cern.ch'."
echo "There is no automout on macOS."
exit 1
fi
if [ ! -d "/Users/Shared/cvmfs/geant4.cern.ch/share/" ]; then
echo "The directory /Users/Shared/cvmfs/geant4.cern.ch/share/ cannot be accessed!"
echo "Make sure you are using the cvmfs-contrib/github-action-cvmfs@v2 action"
echo "and that you have set cvmfs_repositories: 'sft.cern.ch,geant4.cern.ch'."
echo "There is no automout on macOS."
exit 1
fi
echo "CVMFS mount present"
VIEW_PATH="/Users/Shared/cvmfs/sft.cern.ch/lcg/views/${LCG_RELEASE_PLATFORM}"
if [[ "${LCG_RELEASE}" == *"dev"* ]]; then
VIEW_PATH="/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/${LCG_RELEASE}/latest/${LCG_PLATFORM}"
fi
fi
echo "Installing view prerequisites:"
brew install ninja
brew install gfortran
brew install --cask xquartz
echo "Installation done."
echo "Full view path is ${VIEW_PATH}"
if [ ! -d "${VIEW_PATH}" ]; then
echo "Did not find a view under this path!"
exit 1
fi
echo "#!/bin/zsh
set -e
source ${VIEW_PATH}/${SETUP_SCRIPT}
cd ${GITHUB_WORKSPACE}
${RUN}
" > ${GITHUB_WORKSPACE}/action_payload.sh
chmod a+x ${GITHUB_WORKSPACE}/action_payload.sh
echo "::endgroup::" # Launch container
echo "####################################################################"
echo "###################### Executing user payload ######################"
echo "VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"
cd ${GITHUB_WORKSPACE}
./action_payload.sh