Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Alexander Afanasyev | 33ce4c3 | 2014-10-24 11:19:45 -0700 | [diff] [blame] | 2 | set -e |
Davide Pesavento | 2349e28 | 2020-03-24 14:28:03 -0400 | [diff] [blame] | 3 | source .jenkins.d/util.sh |
| 4 | |
Davide Pesavento | 09d5662 | 2021-08-23 17:44:25 -0400 | [diff] [blame] | 5 | if has Linux $NODE_LABELS; then |
Davide Pesavento | 83f8d16 | 2021-09-26 21:58:36 -0400 | [diff] [blame] | 6 | export PATH="${HOME}/.local/bin${PATH:+:}${PATH}" |
Davide Pesavento | f662500 | 2022-07-31 17:15:02 -0400 | [diff] [blame^] | 7 | elif [[ -x /opt/homebrew/bin/brew ]]; then |
| 8 | eval "$(/opt/homebrew/bin/brew shellenv)" |
Davide Pesavento | 09d5662 | 2021-08-23 17:44:25 -0400 | [diff] [blame] | 9 | fi |
Davide Pesavento | ab7300b | 2020-04-09 00:51:41 -0400 | [diff] [blame] | 10 | export CACHE_DIR=${CACHE_DIR:-/tmp} |
Davide Pesavento | 2349e28 | 2020-03-24 14:28:03 -0400 | [diff] [blame] | 11 | export WAF_JOBS=${WAF_JOBS:-1} |
Davide Pesavento | ab7300b | 2020-04-09 00:51:41 -0400 | [diff] [blame] | 12 | [[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 13 | |
Davide Pesavento | e6e125e | 2019-10-08 18:08:36 -0400 | [diff] [blame] | 14 | for file in .jenkins.d/*; do |
Alexander Afanasyev | e749003 | 2014-12-11 12:40:53 -0800 | [diff] [blame] | 15 | [[ -f $file && -x $file ]] || continue |
Davide Pesavento | e6e125e | 2019-10-08 18:08:36 -0400 | [diff] [blame] | 16 | |
Davide Pesavento | 30ed628 | 2021-07-25 20:05:06 -0400 | [diff] [blame] | 17 | if [[ -n $GITHUB_ACTIONS ]]; then |
Davide Pesavento | 83f8d16 | 2021-09-26 21:58:36 -0400 | [diff] [blame] | 18 | label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/') |
Davide Pesavento | 30ed628 | 2021-07-25 20:05:06 -0400 | [diff] [blame] | 19 | echo "::group::${label}" |
Davide Pesavento | e6e125e | 2019-10-08 18:08:36 -0400 | [diff] [blame] | 20 | fi |
| 21 | |
| 22 | echo "\$ $file" |
Alexander Afanasyev | e749003 | 2014-12-11 12:40:53 -0800 | [diff] [blame] | 23 | "$file" |
Davide Pesavento | e6e125e | 2019-10-08 18:08:36 -0400 | [diff] [blame] | 24 | |
Davide Pesavento | 30ed628 | 2021-07-25 20:05:06 -0400 | [diff] [blame] | 25 | if [[ -n $GITHUB_ACTIONS ]]; then |
| 26 | echo "::endgroup::" |
Davide Pesavento | e6e125e | 2019-10-08 18:08:36 -0400 | [diff] [blame] | 27 | fi |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 28 | done |