Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
2 | set -e | ||||
Davide Pesavento | d839882 | 2020-03-29 18:46:19 -0400 | [diff] [blame] | 3 | source .jenkins.d/util.sh |
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 4 | |
Davide Pesavento | 8c35390 | 2021-08-30 19:10:36 -0400 | [diff] [blame] | 5 | if has Linux $NODE_LABELS; then |
Davide Pesavento | 2c8ec07 | 2021-09-30 00:04:23 -0400 | [diff] [blame] | 6 | export PATH="${HOME}/.local/bin${PATH:+:}${PATH}" |
Davide Pesavento | 423e58a | 2022-08-12 15:51:42 -0400 | [diff] [blame^] | 7 | elif [[ -x /opt/homebrew/bin/brew ]]; then |
8 | eval "$(/opt/homebrew/bin/brew shellenv)" | ||||
Davide Pesavento | 8c35390 | 2021-08-30 19:10:36 -0400 | [diff] [blame] | 9 | fi |
Davide Pesavento | d839882 | 2020-03-29 18:46:19 -0400 | [diff] [blame] | 10 | export CACHE_DIR=${CACHE_DIR:-/tmp} |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame] | 11 | export WAF_JOBS=${WAF_JOBS:-1} |
Davide Pesavento | d5c2447 | 2020-04-01 17:46:18 -0400 | [diff] [blame] | 12 | [[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame] | 13 | |
Davide Pesavento | cbef7b8 | 2019-10-09 00:15:13 -0400 | [diff] [blame] | 14 | for file in .jenkins.d/*; do |
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 15 | [[ -f $file && -x $file ]] || continue |
Davide Pesavento | cbef7b8 | 2019-10-09 00:15:13 -0400 | [diff] [blame] | 16 | |
Davide Pesavento | e8c82ef | 2021-07-28 02:38:51 -0400 | [diff] [blame] | 17 | if [[ -n $GITHUB_ACTIONS ]]; then |
Davide Pesavento | 2c8ec07 | 2021-09-30 00:04:23 -0400 | [diff] [blame] | 18 | label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/') |
Davide Pesavento | e8c82ef | 2021-07-28 02:38:51 -0400 | [diff] [blame] | 19 | echo "::group::${label}" |
Davide Pesavento | cbef7b8 | 2019-10-09 00:15:13 -0400 | [diff] [blame] | 20 | fi |
21 | |||||
22 | echo "\$ $file" | ||||
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 23 | "$file" |
Davide Pesavento | cbef7b8 | 2019-10-09 00:15:13 -0400 | [diff] [blame] | 24 | |
Davide Pesavento | e8c82ef | 2021-07-28 02:38:51 -0400 | [diff] [blame] | 25 | if [[ -n $GITHUB_ACTIONS ]]; then |
26 | echo "::endgroup::" | ||||
Davide Pesavento | cbef7b8 | 2019-10-09 00:15:13 -0400 | [diff] [blame] | 27 | fi |
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 28 | done |