authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-11-22 14:13:58-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-11-22 14:13:58-07:00
logb3b507ad8fa9af02b76e2ba2f46d55a771c00895
treeaed05b6925497dd6f1dce752c41af73a81a9a844
parent942a1044576a84dd337df575ae5b742366fc104f

CI: disable building tarballs; x86 self-hosted


4 files changed, 108 insertions(+), 104 deletions(-)

.github/workflows/ci.yaml-26
......@@ -57,29 +57,3 @@ jobs:
5757 uses: actions/checkout@v3
5858 - name: Build and Test
5959 run: ./ci/macos/build-aarch64.sh
60 build-tarballs:
61 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
62 runs-on: ubuntu-latest
63 needs:
64 - x86_64-linux-debug
65 - x86_64-linux-release
66 - x86_64-macos
67 - x86_64-windows
68 - aarch64-linux
69 - aarch64-macos
70 env:
71 ZIG_VERSION: "${{ needs.x86_64-linux-debug.outputs.version }}"
72 steps:
73 - name: Checkout
74 uses: actions/checkout@v3
75 - uses: webfactory/ssh-agent@v0.6.0
76 with:
77 ssh-private-key: ${{ secrets.WEBSITE_CI_PUSH_SSH_KEY }}
78 - name: Set AWS credentials
79 uses: aws-actions/configure-aws-credentials@v1
80 with:
81 aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
82 aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
83 aws-region: eu-west-1
84 - name: Build Tarballs
85 run: sh ./ci/linux/build-tarballs.sh
ci/linux/build-aarch64.sh+12-7
......@@ -12,7 +12,7 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.11.0-dev.256+271cc52a1"
1212PREFIX="$HOME/deps/$CACHE_BASENAME"
1313ZIG="$PREFIX/bin/zig"
1414
15export PATH="$HOME/deps/wasmtime-v2.0.2-aarch64-linux:$PATH"
15export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$PATH"
1616
1717# Make the `zig version` number consistent.
1818# This will affect the cmake command below.
......@@ -42,6 +42,14 @@ unset CXX
4242
4343ninja install
4444
45echo "Looking for non-conforming code formatting..."
46stage3-release/bin/zig fmt --check .. \
47 --exclude ../test/cases/ \
48 --exclude ../build-release
49
50# simultaneously test building self-hosted without LLVM and with 32-bit arm
51stage3-release/bin/zig build -Dtarget=arm-linux-musleabihf
52
4553# TODO: add -fqemu back to this line
4654
4755stage3-release/bin/zig build test docs \
......@@ -51,15 +59,12 @@ stage3-release/bin/zig build test docs \
5159 --search-prefix "$PREFIX" \
5260 --zig-lib-dir "$(pwd)/../lib"
5361
62# Look for HTML errors.
63tidy --drop-empty-elements no -qe zig-cache/langref.html
64
5465# Produce the experimental std lib documentation.
5566mkdir -p "stage3-release/doc/std"
5667stage3-release/bin/zig test ../lib/std/std.zig \
5768 -femit-docs=stage3-release/doc/std \
5869 -fno-emit-bin \
5970 --zig-lib-dir "$(pwd)/../lib"
60
61# cp ../LICENSE $RELEASE_STAGING/
62# cp ../zig-cache/langref.html $RELEASE_STAGING/doc/
63
64# # Look for HTML errors.
65# tidy --drop-empty-elements no -qe $RELEASE_STAGING/doc/langref.html
ci/linux/build-x86_64-debug.sh+49-35
......@@ -1,56 +1,70 @@
11#!/bin/sh
22
3# Requires cmake ninja-build
4
35set -x
46set -e
57
6ZIGDIR="$(pwd)"
78ARCH="$(uname -m)"
8DEPS_LOCAL="$HOME/local"
9OLD_ZIG="$DEPS_LOCAL/bin/zig"
10TARGET="${ARCH}-linux-musl"
11
12mkdir -p "$DEPS_LOCAL"
13cd "$DEPS_LOCAL"
9TARGET="$ARCH-linux-musl"
10MCPU="baseline"
11CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.11.0-dev.256+271cc52a1"
12PREFIX="$HOME/deps/$CACHE_BASENAME"
13ZIG="$PREFIX/bin/zig"
1414
15OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"
16wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
17tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
15export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$HOME/deps/qemu-linux-x86_64-6.1.0.1/bin:$PATH"
1816
19wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz
20tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz
17# Make the `zig version` number consistent.
18# This will affect the cmake command below.
19git config core.abbrev 9
20git fetch --unshallow || true
21git fetch --tags
2122
22wget https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.2/wasmtime-v2.0.2-x86_64-linux.tar.xz
23tar x --strip-components=1 -f wasmtime-v2.0.2-x86_64-linux.tar.xz
24rm -f LICENSE README.md
25mv wasmtime bin/
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
2625
27export PATH=$DEPS_LOCAL/bin:$PATH
26rm -rf build-debug
27mkdir build-debug
28cd build-debug
29cmake .. \
30 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
31 -DCMAKE_PREFIX_PATH="$PREFIX" \
32 -DCMAKE_BUILD_TYPE=Debug \
33 -DZIG_TARGET_TRIPLE="$TARGET" \
34 -DZIG_TARGET_MCPU="$MCPU" \
35 -DZIG_STATIC=ON \
36 -GNinja
2837
29cd "$ZIGDIR"
30echo "building stage3-debug with zig version $($OLD_ZIG version)"
38# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
39# so that installation and testing do not get affected by them.
40unset CC
41unset CXX
3142
32"$OLD_ZIG" build \
33 --prefix stage3 \
34 --search-prefix "$DEPS_LOCAL" \
35 --zig-lib-dir lib \
36 -Denable-stage1 \
37 -Dstatic-llvm \
38 -Drelease \
39 -Duse-zig-libcxx \
40 -Dtarget="$TARGET"
43ninja install
4144
4245echo "Looking for non-conforming code formatting..."
43stage3/bin/zig fmt --check . \
44 --exclude test/cases/ \
45 --exclude build
46stage3-debug/bin/zig fmt --check .. \
47 --exclude ../test/cases/ \
48 --exclude ../build-debug \
49 --exclude ../build-release
4650
4751# simultaneously test building self-hosted without LLVM and with 32-bit arm
48stage3/bin/zig build -Dtarget=arm-linux-musleabihf
52stage3-debug/bin/zig build -Dtarget=arm-linux-musleabihf
4953
50stage3/bin/zig build test docs \
54stage3-debug/bin/zig build test docs \
5155 -fqemu \
5256 -fwasmtime \
5357 -Dstatic-llvm \
5458 -Dtarget=native-native-musl \
55 --search-prefix "$DEPS_LOCAL" \
56 --zig-lib-dir lib
59 --search-prefix "$PREFIX" \
60 --zig-lib-dir "$(pwd)/../lib"
61
62# Look for HTML errors.
63tidy --drop-empty-elements no -qe zig-cache/langref.html
64
65# Produce the experimental std lib documentation.
66mkdir -p "stage3-debug/doc/std"
67stage3-debug/bin/zig test ../lib/std/std.zig \
68 -femit-docs=stage3-debug/doc/std \
69 -fno-emit-bin \
70 --zig-lib-dir "$(pwd)/../lib"
ci/linux/build-x86_64-release.sh+47-36
......@@ -1,75 +1,86 @@
11#!/bin/sh
22
3# Requires cmake ninja-build
4
35set -x
46set -e
57
6ZIGDIR="$(pwd)"
78ARCH="$(uname -m)"
8DEPS_LOCAL="$HOME/local"
9OLD_ZIG="$DEPS_LOCAL/bin/zig"
10TARGET="${ARCH}-linux-musl"
9TARGET="$ARCH-linux-musl"
1110MCPU="baseline"
11CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.11.0-dev.256+271cc52a1"
12PREFIX="$HOME/deps/$CACHE_BASENAME"
13ZIG="$PREFIX/bin/zig"
1214
13mkdir -p "$DEPS_LOCAL"
14cd "$DEPS_LOCAL"
15
16OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"
17wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
18tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
19
20wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz
21tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz
22
23wget https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.2/wasmtime-v2.0.2-x86_64-linux.tar.xz
24tar x --strip-components=1 -f wasmtime-v2.0.2-x86_64-linux.tar.xz
25rm -f LICENSE README.md
26mv wasmtime bin/
27
28export PATH=$DEPS_LOCAL/bin:$PATH
15export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$HOME/deps/qemu-linux-x86_64-6.1.0.1/bin:$PATH"
2916
30cd "$ZIGDIR"
31echo "building stage3-release with zig version $($OLD_ZIG version)"
17# Make the `zig version` number consistent.
18# This will affect the cmake command below.
19git config core.abbrev 9
20git fetch --unshallow || true
21git fetch --tags
3222
33export CC="$OLD_ZIG cc -target $TARGET -mcpu=$MCPU"
34export CXX="$OLD_ZIG c++ -target $TARGET -mcpu=$MCPU"
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
3525
36mkdir build
37cd build
26rm -rf build-release
27mkdir build-release
28cd build-release
3829cmake .. \
39 -DCMAKE_INSTALL_PREFIX="$(pwd)/stage3" \
40 -DCMAKE_PREFIX_PATH="$DEPS_LOCAL" \
30 -DCMAKE_INSTALL_PREFIX="stage3-release" \
31 -DCMAKE_PREFIX_PATH="$PREFIX" \
4132 -DCMAKE_BUILD_TYPE=Release \
4233 -DZIG_TARGET_TRIPLE="$TARGET" \
4334 -DZIG_TARGET_MCPU="$MCPU" \
44 -DZIG_STATIC=ON
35 -DZIG_STATIC=ON \
36 -GNinja
4537
4638# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
4739# so that installation and testing do not get affected by them.
4840unset CC
4941unset CXX
5042
51make -j2 install
43ninja install
5244
53"stage3/bin/zig" build test \
45echo "Looking for non-conforming code formatting..."
46stage3-release/bin/zig fmt --check .. \
47 --exclude ../test/cases/ \
48 --exclude ../build-debug \
49 --exclude ../build-release
50
51# simultaneously test building self-hosted without LLVM and with 32-bit arm
52stage3-release/bin/zig build -Dtarget=arm-linux-musleabihf
53
54stage3-release/bin/zig build test docs \
5455 -fqemu \
5556 -fwasmtime \
5657 -Dstatic-llvm \
5758 -Dtarget=native-native-musl \
58 --search-prefix "$DEPS_LOCAL" \
59 --search-prefix "$PREFIX" \
60 --zig-lib-dir "$(pwd)/../lib"
61
62# Look for HTML errors.
63tidy --drop-empty-elements no -qe zig-cache/langref.html
64
65# Produce the experimental std lib documentation.
66mkdir -p "stage3-release/doc/std"
67stage3-release/bin/zig test ../lib/std/std.zig \
68 -femit-docs=stage3-release/doc/std \
69 -fno-emit-bin \
5970 --zig-lib-dir "$(pwd)/../lib"
6071
6172"stage3/bin/zig" build \
62 --prefix stage4 \
73 --prefix stage4-release \
6374 -Denable-llvm \
6475 -Denable-stage1 \
6576 -Dno-lib \
6677 -Drelease \
6778 -Dstrip \
68 -Dtarget=x86_64-linux-musl \
79 -Dtarget=$TARGET \
6980 -Duse-zig-libcxx \
70 -Dversion-string="$(stage3/bin/zig version)"
81 -Dversion-string="$(stage3-release/bin/zig version)"
7182
7283# diff returns an error code if the files differ.
7384echo "If the following command fails, it means nondeterminism has been"
7485echo "introduced, making stage3 and stage4 no longer byte-for-byte identical."
75diff stage3/bin/zig stage4/bin/zig
86diff stage3-release/bin/zig stage4-release/bin/zig