mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
4e590fadb5
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
46 lines
1.1 KiB
Bash
Executable File
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
|