Skip to content

Commit

Permalink
parmexpr, and output build status
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Nov 1, 2021
1 parent b08e6a9 commit 8e23d61
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
25 changes: 22 additions & 3 deletions build/build-parmexpr.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -exuo pipefail

# Grab CE's GCC for its binutils
BINUTILS_GCC_VERSION=9.2.0
Expand All @@ -20,10 +20,27 @@ VERSION=parmexpr-trunk-$(date +%Y%m%d)

OUTPUT=/root/clang-${VERSION}.tar.xz
S3OUTPUT=""
if echo $2 | grep s3://; then
if [[ $2 =~ ^s3:// ]]; then
S3OUTPUT=$2
else
OUTPUT=${2-/root/clang-${VERSION}.tar.xz}
if [[ -d "${2}" ]]; then
OUTPUT=$2/${FULLNAME}.tar.xz
else
OUTPUT=${2-$OUTPUT}
fi
fi

# determine build revision
PARMEXPR_VERSION=$(sha256sum ./install_parmexpr_src.sh | awk '{print $1}')
REVISION="parmexpr-${PARMEXPR_VERSION}-gcc-${BINUTILS_GCC_VERSION}"
LAST_REVISION="${3}"

echo "ce-build-revision:${REVISION}"
echo "ce-build-output:${OUTPUT}"

if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
echo "ce-build-status:SKIPPED"
exit
fi

STAGING_DIR=$(pwd)/staging
Expand All @@ -47,3 +64,5 @@ tar Jcf ${OUTPUT} --transform "s,^./,./clang-${VERSION}/," -C ${STAGING_DIR} .
if [[ ! -z "${S3OUTPUT}" ]]; then
aws s3 cp --storage-class REDUCED_REDUNDANCY "${OUTPUT}" "${S3OUTPUT}"
fi

echo "ce-build-status:OK"
4 changes: 3 additions & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -ex
set -exuo pipefail

ROOT=$PWD
VERSION=$1
Expand Down Expand Up @@ -208,3 +208,5 @@ tar Jcf "${OUTPUT}" --transform "s,^./,./${FULLNAME}/," -C "${STAGING_DIR}" .
if [[ -n "${S3OUTPUT}" ]]; then
aws s3 cp --storage-class REDUCED_REDUNDANCY "${OUTPUT}" "${S3OUTPUT}"
fi

echo "ce-build-status:OK"

0 comments on commit 8e23d61

Please sign in to comment.