11#! /usr/bin/env zsh
22
3-
4- DetectorDirNotExisting () {
5- echo " System directory: $system not existing"
6- exit 3
3+ # enable git describe --tags, needed by meson
4+ function enable_git_describe {
5+ is_shallow=$( git rev-parse --is-shallow-repository)
6+ if [ " $is_shallow " = " true" ]; then
7+ echo " Repository is_shallow: $is_shallow "
8+ echo " > Fetching all tags"
9+ git fetch --tags --unshallow
10+ fi
711}
812
9- function show_installation {
13+ function show_gemc_installation {
1014 echo
1115 echo " - Content of \$ GEMC=$GEMC "
1216 ls -lrt $GEMC
@@ -20,8 +24,9 @@ function show_installation {
2024 fi
2125}
2226
23- function meson_options {
27+ function meson_setup_options {
2428 # valid options: address, thread, undefined, memory, leak
29+ local install_dir=" ${GEMC:? GEMC not set} "
2530
2631 meson_options=" "
2732 buildtype=" -Dbuildtype=debug "
@@ -55,35 +60,45 @@ function meson_options {
5560 ;;
5661 esac
5762
58- echo $meson_options $buildtype
59- }
63+ additional_args=(
64+ " --native-file=core.ini"
65+ " -Di_test=true"
66+ " -Droot=enabled"
67+ " -Dprefix=${install_dir} "
68+ " -Dpkg_config_path=$PKG_CONFIG_PATH :${install_dir} /lib/pkgconfig"
69+ )
6070
71+ echo $meson_options $buildtype " ${additional_args[@]} "
72+ }
6173
62- # recent versions of Git refuse to touch a repository whose on-disk owner
63- # doesn’t match the UID that is running the command
64- # mark the workspace (and any nested path) as safe
65- echo " Marking workspace as safe for Git"
66- git config --global --add safe.directory ' *'
6774
68- is_shallow=$( git rev-parse --is-shallow-repository)
75+ # recent versions of Git refuse to touch a repository whose on-disk owner
76+ # doesn’t match the UID that is running the command
77+ # mark the workspace (and any nested path) as safe
78+ echo " Marking workspace as safe for Git"
79+ git config --global --add safe.directory ' *'
6980
70- if [ " $is_shallow " = " true" ]; then
71- echo " Repository is_shallow: $is_shallow "
72- echo " > Fetching all tags"
73- git fetch --tags --unshallow
74- fi
81+ enable_git_describe
82+ log_dir=$SIM_HOME /logs
7583
7684# if we are in the docker container, we need to load the modules
7785if [[ -z " ${AUTOBUILD} " ]]; then
7886 echo " \nNot in container"
7987else
8088 echo " \nIn docker container."
81- if [[ -n " ${GITHUB_WORKFLOW} " ]]; then
82- echo " GITHUB_WORKFLOW: ${GITHUB_WORKFLOW} "
83- fi
84- source /etc/profile.d/local_g4setup.sh
85- echo
89+ log_dir=/root/src/logs
8690fi
8791
88- export ARTIFACT_DIR=$RUNNER_TEMP /artifacts
89- mkdir -p $ARTIFACT_DIR
92+ export $GEMC =$SIM_HOME /gemc/dev
93+
94+ setup_log=/root/src/logs/setup.log
95+ compile_log=/root/src/logs/build.log
96+ test_log=/root/src/logs/test.log
97+
98+ touch $setup_log $compile_log $test_log
99+
100+ echo Logs:
101+
102+ ls -l $setup_log
103+ ls -l $compile_log
104+ ls -l $test_log
0 commit comments