blob: a9abf6dcec85878b02cf701809fa7aa9d885aea4 [file] [log] [blame]
Junxiao Shi439d9722015-03-20 15:08:44 -07001#!/usr/bin/env bash
2set -e
Davide Pesaventod8398822020-03-29 18:46:19 -04003source .jenkins.d/util.sh
Junxiao Shi439d9722015-03-20 15:08:44 -07004
Davide Pesavento8c353902021-08-30 19:10:36 -04005if has Linux $NODE_LABELS; then
Davide Pesavento2c8ec072021-09-30 00:04:23 -04006 export PATH="${HOME}/.local/bin${PATH:+:}${PATH}"
Davide Pesavento423e58a2022-08-12 15:51:42 -04007elif [[ -x /opt/homebrew/bin/brew ]]; then
8 eval "$(/opt/homebrew/bin/brew shellenv)"
Davide Pesavento8c353902021-08-30 19:10:36 -04009fi
Davide Pesaventod8398822020-03-29 18:46:19 -040010export CACHE_DIR=${CACHE_DIR:-/tmp}
Davide Pesaventoa1a9d702020-03-29 00:58:15 -040011export WAF_JOBS=${WAF_JOBS:-1}
Davide Pesaventod5c24472020-04-01 17:46:18 -040012[[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes
Davide Pesaventoa1a9d702020-03-29 00:58:15 -040013
Davide Pesaventocbef7b82019-10-09 00:15:13 -040014for file in .jenkins.d/*; do
Junxiao Shi439d9722015-03-20 15:08:44 -070015 [[ -f $file && -x $file ]] || continue
Davide Pesaventocbef7b82019-10-09 00:15:13 -040016
Davide Pesaventoe8c82ef2021-07-28 02:38:51 -040017 if [[ -n $GITHUB_ACTIONS ]]; then
Davide Pesavento2c8ec072021-09-30 00:04:23 -040018 label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
Davide Pesaventoe8c82ef2021-07-28 02:38:51 -040019 echo "::group::${label}"
Davide Pesaventocbef7b82019-10-09 00:15:13 -040020 fi
21
22 echo "\$ $file"
Junxiao Shi439d9722015-03-20 15:08:44 -070023 "$file"
Davide Pesaventocbef7b82019-10-09 00:15:13 -040024
Davide Pesaventoe8c82ef2021-07-28 02:38:51 -040025 if [[ -n $GITHUB_ACTIONS ]]; then
26 echo "::endgroup::"
Davide Pesaventocbef7b82019-10-09 00:15:13 -040027 fi
Junxiao Shi439d9722015-03-20 15:08:44 -070028done