Skip to content

Commit

Permalink
fix uploading build metrics on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed May 22, 2022
1 parent 1c009e7 commit 836b2d2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/ci/scripts/upload-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"

upload_dir="$(mktemp -d)"

build_dir=build
if isLinux; then
build_dir=obj/build
fi

# Release tarballs produced by a dist builder.
if [[ "${DEPLOY-0}" -eq "1" ]] || [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then
dist_dir=build/dist
if isLinux; then
dist_dir=obj/build/dist
fi
dist_dir="${build_dir}/dist"
rm -rf "${dist_dir}/doc"
cp -r "${dist_dir}"/* "${upload_dir}"
fi
Expand All @@ -24,7 +26,7 @@ fi
cp cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv"

# Build metrics generated by x.py.
cp "${dist_dir}/../metrics.json" "${upload_dir}/metrics-${CI_JOB_NAME}.json"
cp "${build_dir}/metrics.json" "${upload_dir}/metrics-${CI_JOB_NAME}.json"

# Toolstate data.
if [[ -n "${DEPLOY_TOOLSTATES_JSON+x}" ]]; then
Expand Down

0 comments on commit 836b2d2

Please sign in to comment.