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:...@@ -57,29 +57,3 @@ jobs:
57 uses: actions/checkout@v357 uses: actions/checkout@v3
58 - name: Build and Test58 - name: Build and Test
59 run: ./ci/macos/build-aarch64.sh59 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"...@@ -12,7 +12,7 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.11.0-dev.256+271cc52a1"
12PREFIX="$HOME/deps/$CACHE_BASENAME"12PREFIX="$HOME/deps/$CACHE_BASENAME"
13ZIG="$PREFIX/bin/zig" 13ZIG="$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
17# Make the `zig version` number consistent.17# Make the `zig version` number consistent.
18# This will affect the cmake command below.18# This will affect the cmake command below.
...@@ -42,6 +42,14 @@ unset CXX...@@ -42,6 +42,14 @@ unset CXX
4242
43ninja install43ninja 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
45# TODO: add -fqemu back to this line53# TODO: add -fqemu back to this line
4654
47stage3-release/bin/zig build test docs \55stage3-release/bin/zig build test docs \
...@@ -51,15 +59,12 @@ stage3-release/bin/zig build test docs \...@@ -51,15 +59,12 @@ stage3-release/bin/zig build test docs \
51 --search-prefix "$PREFIX" \59 --search-prefix "$PREFIX" \
52 --zig-lib-dir "$(pwd)/../lib"60 --zig-lib-dir "$(pwd)/../lib"
5361
62# Look for HTML errors.
63tidy --drop-empty-elements no -qe zig-cache/langref.html
64
54# Produce the experimental std lib documentation.65# Produce the experimental std lib documentation.
55mkdir -p "stage3-release/doc/std"66mkdir -p "stage3-release/doc/std"
56stage3-release/bin/zig test ../lib/std/std.zig \67stage3-release/bin/zig test ../lib/std/std.zig \
57 -femit-docs=stage3-release/doc/std \68 -femit-docs=stage3-release/doc/std \
58 -fno-emit-bin \69 -fno-emit-bin \
59 --zig-lib-dir "$(pwd)/../lib"70 --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 @@...@@ -1,56 +1,70 @@
1#!/bin/sh1#!/bin/sh
22
3# Requires cmake ninja-build
4
3set -x5set -x
4set -e6set -e
57
6ZIGDIR="$(pwd)"
7ARCH="$(uname -m)"8ARCH="$(uname -m)"
8DEPS_LOCAL="$HOME/local"9TARGET="$ARCH-linux-musl"
9OLD_ZIG="$DEPS_LOCAL/bin/zig"10MCPU="baseline"
10TARGET="${ARCH}-linux-musl"11CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.11.0-dev.256+271cc52a1"
1112PREFIX="$HOME/deps/$CACHE_BASENAME"
12mkdir -p "$DEPS_LOCAL"13ZIG="$PREFIX/bin/zig"
13cd "$DEPS_LOCAL"
1414
15OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"15export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$HOME/deps/qemu-linux-x86_64-6.1.0.1/bin:$PATH"
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
1816
19wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz17# Make the `zig version` number consistent.
20tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz18# 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.xz23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
23tar x --strip-components=1 -f wasmtime-v2.0.2-x86_64-linux.tar.xz24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
24rm -f LICENSE README.md
25mv wasmtime bin/
2625
27export PATH=$DEPS_LOCAL/bin:$PATH26rm -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"38# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
30echo "building stage3-debug with zig version $($OLD_ZIG version)"39# so that installation and testing do not get affected by them.
40unset CC
41unset CXX
3142
32"$OLD_ZIG" build \43ninja install
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"
4144
42echo "Looking for non-conforming code formatting..."45echo "Looking for non-conforming code formatting..."
43stage3/bin/zig fmt --check . \46stage3-debug/bin/zig fmt --check .. \
44 --exclude test/cases/ \47 --exclude ../test/cases/ \
45 --exclude build48 --exclude ../build-debug \
49 --exclude ../build-release
4650
47# simultaneously test building self-hosted without LLVM and with 32-bit arm51# simultaneously test building self-hosted without LLVM and with 32-bit arm
48stage3/bin/zig build -Dtarget=arm-linux-musleabihf52stage3-debug/bin/zig build -Dtarget=arm-linux-musleabihf
4953
50stage3/bin/zig build test docs \54stage3-debug/bin/zig build test docs \
51 -fqemu \55 -fqemu \
52 -fwasmtime \56 -fwasmtime \
53 -Dstatic-llvm \57 -Dstatic-llvm \
54 -Dtarget=native-native-musl \58 -Dtarget=native-native-musl \
55 --search-prefix "$DEPS_LOCAL" \59 --search-prefix "$PREFIX" \
56 --zig-lib-dir lib60 --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 @@...@@ -1,75 +1,86 @@
1#!/bin/sh1#!/bin/sh
22
3# Requires cmake ninja-build
4
3set -x5set -x
4set -e6set -e
57
6ZIGDIR="$(pwd)"
7ARCH="$(uname -m)"8ARCH="$(uname -m)"
8DEPS_LOCAL="$HOME/local"9TARGET="$ARCH-linux-musl"
9OLD_ZIG="$DEPS_LOCAL/bin/zig"
10TARGET="${ARCH}-linux-musl"
11MCPU="baseline"10MCPU="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"15export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$HOME/deps/qemu-linux-x86_64-6.1.0.1/bin:$PATH"
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
2916
30cd "$ZIGDIR"17# Make the `zig version` number consistent.
31echo "building stage3-release with zig version $($OLD_ZIG version)"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"23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
34export CXX="$OLD_ZIG c++ -target $TARGET -mcpu=$MCPU"24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
3525
36mkdir build26rm -rf build-release
37cd build27mkdir build-release
28cd build-release
38cmake .. \29cmake .. \
39 -DCMAKE_INSTALL_PREFIX="$(pwd)/stage3" \30 -DCMAKE_INSTALL_PREFIX="stage3-release" \
40 -DCMAKE_PREFIX_PATH="$DEPS_LOCAL" \31 -DCMAKE_PREFIX_PATH="$PREFIX" \
41 -DCMAKE_BUILD_TYPE=Release \32 -DCMAKE_BUILD_TYPE=Release \
42 -DZIG_TARGET_TRIPLE="$TARGET" \33 -DZIG_TARGET_TRIPLE="$TARGET" \
43 -DZIG_TARGET_MCPU="$MCPU" \34 -DZIG_TARGET_MCPU="$MCPU" \
44 -DZIG_STATIC=ON35 -DZIG_STATIC=ON \
36 -GNinja
4537
46# Now cmake will use zig as the C/C++ compiler. We reset the environment variables38# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
47# so that installation and testing do not get affected by them.39# so that installation and testing do not get affected by them.
48unset CC40unset CC
49unset CXX41unset CXX
5042
51make -j2 install43ninja 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 \
54 -fqemu \55 -fqemu \
55 -fwasmtime \56 -fwasmtime \
56 -Dstatic-llvm \57 -Dstatic-llvm \
57 -Dtarget=native-native-musl \58 -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 \
59 --zig-lib-dir "$(pwd)/../lib"70 --zig-lib-dir "$(pwd)/../lib"
6071
61"stage3/bin/zig" build \72"stage3/bin/zig" build \
62 --prefix stage4 \73 --prefix stage4-release \
63 -Denable-llvm \74 -Denable-llvm \
64 -Denable-stage1 \75 -Denable-stage1 \
65 -Dno-lib \76 -Dno-lib \
66 -Drelease \77 -Drelease \
67 -Dstrip \78 -Dstrip \
68 -Dtarget=x86_64-linux-musl \79 -Dtarget=$TARGET \
69 -Duse-zig-libcxx \80 -Duse-zig-libcxx \
70 -Dversion-string="$(stage3/bin/zig version)"81 -Dversion-string="$(stage3-release/bin/zig version)"
7182
72# diff returns an error code if the files differ.83# diff returns an error code if the files differ.
73echo "If the following command fails, it means nondeterminism has been"84echo "If the following command fails, it means nondeterminism has been"
74echo "introduced, making stage3 and stage4 no longer byte-for-byte identical."85echo "introduced, making stage3 and stage4 no longer byte-for-byte identical."
75diff stage3/bin/zig stage4/bin/zig86diff stage3-release/bin/zig stage4-release/bin/zig