| author | |
| committer | |
| log | f3f2a56859f96cee6f9bc8e8fe14b99ec653abaf |
| tree | 4e59c3563c8347378b7b01a1aa77234e98c3da42 |
| parent | d66f13c90d4767cce3fc1e3fa94380a27f2a09b2 |
The idea is to have 2 runners per machine, since a lot of time is spent building
stage3 and stage4, both of which are largely single-core affairs. This will make
the test steps take longer, however, so the timeouts have been bumped a bit, and
max RSS for the test step has been lowered from 64G to 32G to prevent OOM.
Finally, we now only run a single ReleaseSafe job on PRs; Debug and Release jobs
are limited to pushes.4 files changed, 91 insertions(+), 4 deletions(-)
.github/workflows/ci.yaml+13-2| ... | @@ -51,7 +51,8 @@ jobs: | ... | @@ -51,7 +51,8 @@ jobs: |
| 51 | - name: Build and Test | 51 | - name: Build and Test |
| 52 | run: sh ci/aarch64-linux-release.sh | 52 | run: sh ci/aarch64-linux-release.sh |
| 53 | riscv64-linux-debug: | 53 | riscv64-linux-debug: |
| 54 | timeout-minutes: 900 | 54 | if: ${{ github.event_name == 'push' }} |
| 55 | timeout-minutes: 1020 | ||
| 55 | runs-on: [self-hosted, Linux, riscv64] | 56 | runs-on: [self-hosted, Linux, riscv64] |
| 56 | steps: | 57 | steps: |
| 57 | - name: Checkout | 58 | - name: Checkout |
| ... | @@ -59,13 +60,23 @@ jobs: | ... | @@ -59,13 +60,23 @@ jobs: |
| 59 | - name: Build and Test | 60 | - name: Build and Test |
| 60 | run: sh ci/riscv64-linux-debug.sh | 61 | run: sh ci/riscv64-linux-debug.sh |
| 61 | riscv64-linux-release: | 62 | riscv64-linux-release: |
| 62 | timeout-minutes: 780 | 63 | if: ${{ github.event_name == 'push' }} |
| 64 | timeout-minutes: 900 | ||
| 63 | runs-on: [self-hosted, Linux, riscv64] | 65 | runs-on: [self-hosted, Linux, riscv64] |
| 64 | steps: | 66 | steps: |
| 65 | - name: Checkout | 67 | - name: Checkout |
| 66 | uses: actions/checkout@v4 | 68 | uses: actions/checkout@v4 |
| 67 | - name: Build and Test | 69 | - name: Build and Test |
| 68 | run: sh ci/riscv64-linux-release.sh | 70 | run: sh ci/riscv64-linux-release.sh |
| 71 | riscv64-linux-releasesafe: | ||
| 72 | if: ${{ github.event_name == 'pull_request' }} | ||
| 73 | timeout-minutes: 900 | ||
| 74 | runs-on: [self-hosted, Linux, riscv64] | ||
| 75 | steps: | ||
| 76 | - name: Checkout | ||
| 77 | uses: actions/checkout@v4 | ||
| 78 | - name: Build and Test | ||
| 79 | run: sh ci/riscv64-linux-releasesafe.sh | ||
| 69 | x86_64-macos-release: | 80 | x86_64-macos-release: |
| 70 | runs-on: "macos-13" | 81 | runs-on: "macos-13" |
| 71 | env: | 82 | env: |
ci/riscv64-linux-debug.sh+1-1| ... | @@ -50,7 +50,7 @@ ninja install | ... | @@ -50,7 +50,7 @@ ninja install |
| 50 | 50 | ||
| 51 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | 51 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. |
| 52 | stage3-debug/bin/zig build test docs \ | 52 | stage3-debug/bin/zig build test docs \ |
| 53 | --maxrss 68719476736 \ | 53 | --maxrss 34359738368 \ |
| 54 | -Dstatic-llvm \ | 54 | -Dstatic-llvm \ |
| 55 | -Dskip-non-native \ | 55 | -Dskip-non-native \ |
| 56 | -Dtarget=native-native-musl \ | 56 | -Dtarget=native-native-musl \ |
ci/riscv64-linux-release.sh+1-1| ... | @@ -50,7 +50,7 @@ ninja install | ... | @@ -50,7 +50,7 @@ ninja install |
| 50 | 50 | ||
| 51 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | 51 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. |
| 52 | stage3-release/bin/zig build test docs \ | 52 | stage3-release/bin/zig build test docs \ |
| 53 | --maxrss 68719476736 \ | 53 | --maxrss 34359738368 \ |
| 54 | -Dstatic-llvm \ | 54 | -Dstatic-llvm \ |
| 55 | -Dskip-non-native \ | 55 | -Dskip-non-native \ |
| 56 | -Dtarget=native-native-musl \ | 56 | -Dtarget=native-native-musl \ |
ci/riscv64-linux-releasesafe.sh created+76| ... | @@ -0,0 +1,76 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Requires cmake ninja-build | ||
| 4 | |||
| 5 | set -x | ||
| 6 | set -e | ||
| 7 | |||
| 8 | ARCH="$(uname -m)" | ||
| 9 | TARGET="$ARCH-linux-musl" | ||
| 10 | MCPU="spacemit_x60" | ||
| 11 | CACHE_BASENAME="zig+llvm+lld+clang-riscv64-linux-musl-0.15.0-dev.929+31e46be74" | ||
| 12 | PREFIX="$HOME/deps/$CACHE_BASENAME" | ||
| 13 | ZIG="$PREFIX/bin/zig" | ||
| 14 | |||
| 15 | export PATH="$HOME/local/bin:$PATH" | ||
| 16 | |||
| 17 | # Make the `zig version` number consistent. | ||
| 18 | # This will affect the cmake command below. | ||
| 19 | git fetch --unshallow || true | ||
| 20 | git fetch --tags | ||
| 21 | |||
| 22 | # Override the cache directories because they won't actually help other CI runs | ||
| 23 | # which will be testing alternate versions of zig, and ultimately would just | ||
| 24 | # fill up space on the hard drive for no reason. | ||
| 25 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | ||
| 26 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | ||
| 27 | |||
| 28 | mkdir build-releasesafe | ||
| 29 | cd build-releasesafe | ||
| 30 | |||
| 31 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 32 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 33 | |||
| 34 | cmake .. \ | ||
| 35 | -DCMAKE_INSTALL_PREFIX="stage3-releasesafe" \ | ||
| 36 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | ||
| 37 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 38 | -DZIG_RELEASE_SAFE=ON \ | ||
| 39 | -DZIG_TARGET_TRIPLE="$TARGET" \ | ||
| 40 | -DZIG_TARGET_MCPU="$MCPU" \ | ||
| 41 | -DZIG_STATIC=ON \ | ||
| 42 | -DZIG_NO_LIB=ON \ | ||
| 43 | -GNinja | ||
| 44 | |||
| 45 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 46 | # so that installation and testing do not get affected by them. | ||
| 47 | unset CC | ||
| 48 | unset CXX | ||
| 49 | |||
| 50 | ninja install | ||
| 51 | |||
| 52 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 53 | stage3-releasesafe/bin/zig build test docs \ | ||
| 54 | --maxrss 34359738368 \ | ||
| 55 | -Dstatic-llvm \ | ||
| 56 | -Dskip-non-native \ | ||
| 57 | -Dtarget=native-native-musl \ | ||
| 58 | --search-prefix "$PREFIX" \ | ||
| 59 | --zig-lib-dir "$PWD/../lib" | ||
| 60 | |||
| 61 | # Ensure that stage3 and stage4 are byte-for-byte identical. | ||
| 62 | stage3-releasesafe/bin/zig build \ | ||
| 63 | --prefix stage4-releasesafe \ | ||
| 64 | -Denable-llvm \ | ||
| 65 | -Dno-lib \ | ||
| 66 | -Doptimize=ReleaseSafe \ | ||
| 67 | -Dstrip \ | ||
| 68 | -Dtarget=$TARGET \ | ||
| 69 | -Dcpu=$MCPU \ | ||
| 70 | -Duse-zig-libcxx \ | ||
| 71 | -Dversion-string="$(stage3-releasesafe/bin/zig version)" | ||
| 72 | |||
| 73 | # diff returns an error code if the files differ. | ||
| 74 | echo "If the following command fails, it means nondeterminism has been" | ||
| 75 | echo "introduced, making stage3 and stage4 no longer byte-for-byte identical." | ||
| 76 | diff stage3-releasesafe/bin/zig stage4-releasesafe/bin/zig | ||