| author | |
| committer | |
| log | aa2607a109750177c761bee421468525405b9d93 |
| tree | 1e1124aee0ddc5834ebc04361e6f3d57f39dbfb1 |
| parent | 695a746aa09ac68e0ece8def2d5c7ce6d71f3000 |
| parent | 6eba65bd7f4af9187667bbd1b1d948bcbeafe03f |
| signature |
6 files changed, 79 insertions(+), 3 deletions(-)
ci/azure/update_download_page+6| ... | ... | @@ -22,6 +22,12 @@ tar cfJ "$SRC_TARBALL" "$SRCTARBALLDIR" |
| 22 | 22 | export SRC_SHASUM=$(sha256sum $SRC_TARBALL | cut '-d ' -f1) |
| 23 | 23 | export SRC_BYTESIZE=$(wc -c < $SRC_TARBALL) |
| 24 | 24 | |
| 25 | # the aarch64 build has to be there too | |
| 26 | AARCH64_LINUX_JSON=$(curl --fail "https://ziglang.org/builds/aarch64-linux-$VERSION.json" || exit 1) | |
| 27 | export AARCH64_LINUX_TARBALL="$(echo "$AARCH64_LINUX_JSON" | jq .tarball -r)" | |
| 28 | export AARCH64_LINUX_BYTESIZE="$(echo "$AARCH64_LINUX_JSON" | jq .size -r)" | |
| 29 | export AARCH64_LINUX_SHASUM="$(echo "$AARCH64_LINUX_JSON" | jq .shasum -r)" | |
| 30 | ||
| 25 | 31 | # the freebsd build has to be there too |
| 26 | 32 | FREEBSD_JSON=$(curl --fail "https://ziglang.org/builds/freebsd-$VERSION.json" || exit 1) |
| 27 | 33 | export FREEBSD_TARBALL="$(echo "$FREEBSD_JSON" | jq .tarball -r)" |
ci/drone/drone.yml created+17| ... | ... | @@ -0,0 +1,17 @@ |
| 1 | --- | |
| 2 | kind: pipeline | |
| 3 | name: test-aarch64-linux-musl | |
| 4 | ||
| 5 | platform: | |
| 6 | arch: arm64 | |
| 7 | ||
| 8 | steps: | |
| 9 | - name: build-and-test | |
| 10 | image: ziglang/static-base:llvm9-1 | |
| 11 | environment: | |
| 12 | AWS_ACCESS_KEY_ID: | |
| 13 | from_secret: AWS_ACCESS_KEY_ID | |
| 14 | AWS_SECRET_ACCESS_KEY: | |
| 15 | from_secret: AWS_SECRET_ACCESS_KEY | |
| 16 | commands: | |
| 17 | - ./ci/drone/linux_script |
ci/drone/linux_script created+52| ... | ... | @@ -0,0 +1,52 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | set -x | |
| 4 | set -e | |
| 5 | ||
| 6 | TRIPLEARCH="$(uname -m)" | |
| 7 | BUILDDIR="$(pwd)" | |
| 8 | DISTDIR="$(pwd)/dist" | |
| 9 | ||
| 10 | apk update | |
| 11 | apk add py3-pip xz perl-utils | |
| 12 | pip3 install s3cmd | |
| 13 | ||
| 14 | mkdir build | |
| 15 | cd build | |
| 16 | cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$DISTDIR" -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local | |
| 17 | ||
| 18 | make -j$(nproc) install | |
| 19 | ./zig build test-behavior | |
| 20 | # TODO figure out why running docs is causing EBADF on dup2 in the child | |
| 21 | # ./zig build docs | |
| 22 | # TODO full test suite: | |
| 23 | #./zig build test | |
| 24 | ||
| 25 | if [ -z "$DRONE_PULL_REQUEST" ]; then | |
| 26 | mv ../LICENSE "$DISTDIR/" | |
| 27 | # TODO uncomment when the docs are generated | |
| 28 | # mv ../zig-cache/langref.html "$DISTDIR/" | |
| 29 | mv "$DISTDIR/bin/zig" "$DISTDIR/" | |
| 30 | rmdir "$DISTDIR/bin" | |
| 31 | ||
| 32 | GITBRANCH="$DRONE_BRANCH" | |
| 33 | VERSION="$("$DISTDIR/zig" version)" | |
| 34 | DIRNAME="zig-linux-$TRIPLEARCH-$VERSION" | |
| 35 | TARBALL="$DIRNAME.tar.xz" | |
| 36 | mv "$DISTDIR" "$DIRNAME" | |
| 37 | tar cfJ "$TARBALL" "$DIRNAME" | |
| 38 | ||
| 39 | s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "$TARBALL" s3://ziglang.org/builds/ | |
| 40 | ||
| 41 | SHASUM=$(shasum -a 256 $TARBALL | cut '-d ' -f1) | |
| 42 | BYTESIZE=$(wc -c < $TARBALL) | |
| 43 | ||
| 44 | JSONFILE="$TRIPLEARCH-linux-$GITBRANCH.json" | |
| 45 | touch $JSONFILE | |
| 46 | echo "{\"tarball\": \"$TARBALL\"," >>$JSONFILE | |
| 47 | echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE | |
| 48 | echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE | |
| 49 | ||
| 50 | s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" | |
| 51 | s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$TRIPLEARCH-linux-$VERSION.json" | |
| 52 | fi |
ci/srht/freebsd_script+1-1| ... | ... | @@ -15,7 +15,7 @@ tar xf "$CACHE_BASENAME.tar.xz" |
| 15 | 15 | cd $ZIGDIR |
| 16 | 16 | mkdir build |
| 17 | 17 | cd build |
| 18 | cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON | |
| 18 | cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX "-DCMAKE_INSTALL_PREFIX=$(pwd)/release" -DZIG_STATIC=ON | |
| 19 | 19 | make $JOBS install |
| 20 | 20 | |
| 21 | 21 | release/bin/zig build test-fmt |
lib/std/os.zig+2-1| ... | ... | @@ -663,7 +663,8 @@ pub fn dup2(old_fd: fd_t, new_fd: fd_t) !void { |
| 663 | 663 | 0 => return, |
| 664 | 664 | EBUSY, EINTR => continue, |
| 665 | 665 | EMFILE => return error.ProcessFdQuotaExceeded, |
| 666 | EINVAL => unreachable, | |
| 666 | EINVAL => unreachable, // invalid parameters passed to dup2 | |
| 667 | EBADF => unreachable, // always a race condition | |
| 667 | 668 | else => |err| return unexpectedErrno(err), |
| 668 | 669 | } |
| 669 | 670 | } |
src-self-hosted/translate_c.zig+1-1| ... | ... | @@ -1123,7 +1123,7 @@ fn transCreateNodeAPInt(c: *Context, int: ?*const ZigClangAPSInt) !*ast.Node { |
| 1123 | 1123 | var big = try std.math.big.Int.initCapacity(c.a(), num_limbs); |
| 1124 | 1124 | defer big.deinit(); |
| 1125 | 1125 | const data = ZigClangAPSInt_getRawData(int.?); |
| 1126 | var i: usize = 0; | |
| 1126 | var i: @typeOf(num_limbs) = 0; | |
| 1127 | 1127 | while (i < num_limbs) : (i += 1) big.limbs[i] = data[i]; |
| 1128 | 1128 | const str = big.toString(c.a(), 10) catch |err| switch (err) { |
| 1129 | 1129 | error.OutOfMemory => return error.OutOfMemory, |