zig/ci/drone/linux_script_finalize
Michael Dusan 4e590fadb5 ci drone: enable more testsuite
Upstream LLVM fixes #8597, no longer need `-Dskip-debug` and others.

Additionally, due to the nature of drone.io server pool, it is
beneficial to know which aarch64 CPU brand is in use.

- drop `-Dskip-debug` and others
- invoke `lscpu` prior to build
- enable more testsuite consistent with ci azure
- remove workaround for (already closed) #6830

closes #8597
2021-10-04 19:18:19 -04:00

46 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
. ./ci/drone/linux_script_base
if [ -n "$DRONE_PULL_REQUEST" ]; then
exit 0
fi
apk update
apk add py3-pip perl-utils jq curl
pip3 install s3cmd
cd build
mv ../LICENSE "$DISTDIR/"
mv ../zig-cache/langref.html "$DISTDIR/"
mv "$DISTDIR/bin/zig" "$DISTDIR/"
rmdir "$DISTDIR/bin"
GITBRANCH="$DRONE_BRANCH"
VERSION="$("$DISTDIR/zig" version)"
DIRNAME="zig-linux-$TRIPLEARCH-$VERSION"
TARBALL="$DIRNAME.tar.xz"
mv "$DISTDIR" "$DIRNAME"
tar cfJ "$TARBALL" "$DIRNAME"
s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "$TARBALL" s3://ziglang.org/builds/
SHASUM=$(shasum -a 256 $TARBALL | cut '-d ' -f1)
BYTESIZE=$(wc -c < $TARBALL)
JSONFILE="tarball.json"
touch $JSONFILE
echo "{\"tarball\": \"$TARBALL\"," >>$JSONFILE
echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE
echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$TRIPLEARCH-linux-$VERSION.json"
if [ "$GITBRANCH" = "master" ]; then
# avoid leaking oauth token
set +x
cd "$DRONE_WORKSPACE"
./ci/srht/on_master_success "$VERSION" "$SRHT_OAUTH_TOKEN"
fi