zig/ci/srht/on_master_success
Andrew Kelley ce5222d945 ci: rework linux script
* no longer depend on apt.llvm.org, instead we rely on a zig-bootstrap
   tarball with pre-built Zig, LLVM, LLD, and Clang. Similar to the
   Windows Dev Kit but for Linux. This also makes the script no longer
   depend on Docker, libxml2, or GCC.
 * remove bash retry logic; it was only needed for flaky apt.llvm.org
   and isn't needed for the other resources we download.
 * build and upload the experimental std lib automatically generated
   docs. langref.html is moved to docs/langref.html because the std lib
   docs are in docs/std/.
 * the superfluous "zig" directory in $prefix/lib/zig/std/std.zig is
   removed from the tarball.
 * update_download_page makes a commit in the www.ziglang.org repository
   updating data/releases.json so that repository can manage deploys.
2021-01-06 23:40:17 -07:00

41 lines
776 B
Bash
Executable File

#!/bin/sh
# This script must run on a lot of different platforms.
# It assumes that the following things are installed:
# * curl
# * jq
# * cat
# We do not set -x because this would leak the oauth access token.
set +x
set -e
VERSION="$1"
OAUTH_TOKEN="$2"
YML_FILE="tmp.yml"
cat <<EOF >"$YML_FILE"
image: alpine/latest
packages:
- py3-pip
- curl
- jq
- xz
secrets:
- 51bfddf5-86a6-4e01-8576-358c72a4a0a4
- 8d5f230b-78d9-4e7c-b583-8cbb1b15807c
sources:
- https://github.com/ziglang/zig
tasks:
- build: cd zig && ./ci/srht/update_download_page $VERSION
EOF
jq <$YML_FILE -sR '{
"manifest": .,
}' | curl \
-H Authorization:"token $OAUTH_TOKEN" \
-H Content-Type:application/json \
-X POST \
-d @- "https://builds.hut.lavatech.top/api/jobs"