| author | |
| committer | |
| log | 5d7efa6d82997d80b89e3454ac2b924c3a5a0c87 |
| tree | 07e527a2646e8a44c2d6ef019d89f528a4848567 |
| parent | e14d135881a4fff23d0864b4494418896eb94d36 |
3 files changed, 61 insertions(+), 80 deletions(-)
.github/workflows/ci.yaml+7-12| ... | @@ -5,18 +5,13 @@ on: | ... | @@ -5,18 +5,13 @@ on: |
| 5 | branches: | 5 | branches: |
| 6 | - master | 6 | - master |
| 7 | jobs: | 7 | jobs: |
| 8 | # linux: | 8 | linux-aarch64: |
| 9 | # runs-on: [self-hosted, Linux, aarch64] | 9 | runs-on: [self-hosted, Linux, aarch64] |
| 10 | # env: | 10 | steps: |
| 11 | # ARCH: "aarch64" | 11 | - name: Checkout |
| 12 | # steps: | 12 | uses: actions/checkout@v3 |
| 13 | # - name: Checkout | 13 | - name: Run Build Script |
| 14 | # uses: actions/checkout@v3 | 14 | run: sh ./ci/linux/build-aarch64.sh |
| 15 | |||
| 16 | # - name: Test | ||
| 17 | # run: echo "Success!" | ||
| 18 | # - name: Run Build Script | ||
| 19 | # run: sh ./ci/linux/build.sh | ||
| 20 | macos-x86_64: | 15 | macos-x86_64: |
| 21 | strategy: | 16 | strategy: |
| 22 | matrix: | 17 | matrix: |
ci/linux/build-aarch64.sh created+54| ... | @@ -0,0 +1,54 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | |||
| 4 | # Requires cmake ninja-build | ||
| 5 | |||
| 6 | set -x | ||
| 7 | set -e | ||
| 8 | |||
| 9 | ZIGDIR="$(pwd)" | ||
| 10 | ARCH="$(uname -m)" | ||
| 11 | TARGET="$ARCH-linux-musl" | ||
| 12 | MCPU="baseline" | ||
| 13 | CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.10.0-dev.4560+828735ac0" | ||
| 14 | PREFIX="$HOME/deps/$CACHE_BASENAME" | ||
| 15 | ZIG="$PREFIX/bin/zig" | ||
| 16 | |||
| 17 | export PATH="$HOME/deps/wasmtime-v2.0.2-aarch64-linux:$PATH" | ||
| 18 | |||
| 19 | mkdir build-release | ||
| 20 | cd build-release | ||
| 21 | cmake .. \ | ||
| 22 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | ||
| 23 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | ||
| 24 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 25 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 26 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 27 | -DZIG_TARGET_TRIPLE="$TARGET" \ | ||
| 28 | -DZIG_TARGET_MCPU="$MCPU" \ | ||
| 29 | -DZIG_STATIC=ON \ | ||
| 30 | -GNinja | ||
| 31 | |||
| 32 | ninja install | ||
| 33 | |||
| 34 | # TODO: add -fqemu back to this line | ||
| 35 | |||
| 36 | stage3-release/bin/zig build test docs \ | ||
| 37 | -fwasmtime \ | ||
| 38 | -Dstatic-llvm \ | ||
| 39 | -Dtarget=native-native-musl \ | ||
| 40 | --search-prefix "$PREFIX" \ | ||
| 41 | --zig-lib-dir "$(pwd)/../lib" | ||
| 42 | |||
| 43 | # Produce the experimental std lib documentation. | ||
| 44 | mkdir -p "stage3-release/doc/std" | ||
| 45 | stage3-release/bin/zig test ../lib/std/std.zig \ | ||
| 46 | -femit-docs=stage3-release/doc/std \ | ||
| 47 | -fno-emit-bin \ | ||
| 48 | --zig-lib-dir "$(pwd)/../lib" | ||
| 49 | |||
| 50 | # cp ../LICENSE $RELEASE_STAGING/ | ||
| 51 | # cp ../zig-cache/langref.html $RELEASE_STAGING/doc/ | ||
| 52 | |||
| 53 | # # Look for HTML errors. | ||
| 54 | # tidy --drop-empty-elements no -qe $RELEASE_STAGING/doc/langref.html | ||
ci/linux/build.sh deleted-68| ... | @@ -1,68 +0,0 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | |||
| 4 | # Requires cmake ninja-build | ||
| 5 | |||
| 6 | set -x | ||
| 7 | set -e | ||
| 8 | |||
| 9 | ZIGDIR="$(pwd)" | ||
| 10 | TARGET="$ARCH-linux-musl" | ||
| 11 | MCPU="baseline" | ||
| 12 | CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.10.0-dev.4560+828735ac0" | ||
| 13 | PREFIX="$HOME/$CACHE_BASENAME" | ||
| 14 | JOBS="-j2" | ||
| 15 | |||
| 16 | rm -rf $PREFIX | ||
| 17 | cd $HOME | ||
| 18 | |||
| 19 | wget -nv "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" | ||
| 20 | tar xf "$CACHE_BASENAME.tar.xz" | ||
| 21 | |||
| 22 | ZIG="$PREFIX/bin/zig" | ||
| 23 | |||
| 24 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 25 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 26 | export PATH=$DEPS_LOCAL/bin:$PATH | ||
| 27 | |||
| 28 | mkdir build-release | ||
| 29 | cd build-release | ||
| 30 | cmake .. \ | ||
| 31 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | ||
| 32 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | ||
| 33 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 34 | -DZIG_TARGET_TRIPLE="$TARGET" \ | ||
| 35 | -DZIG_TARGET_MCPU="$MCPU" \ | ||
| 36 | -DZIG_STATIC=ON \ | ||
| 37 | -GNinja | ||
| 38 | |||
| 39 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 40 | # so that installation and testing do not get affected by them. | ||
| 41 | unset CC | ||
| 42 | unset CXX | ||
| 43 | |||
| 44 | ninja install | ||
| 45 | |||
| 46 | stage3-release/bin/zig build test docs \ | ||
| 47 | -fqemu \ | ||
| 48 | -fwasmtime \ | ||
| 49 | -Dstatic-llvm \ | ||
| 50 | -Dtarget=native-native-musl \ | ||
| 51 | --search-prefix "$PREFIX" \ | ||
| 52 | --zig-lib-dir "$(pwd)/../lib" | ||
| 53 | |||
| 54 | # Produce the experimental std lib documentation. | ||
| 55 | mkdir -p "stage3-release/doc/std" | ||
| 56 | stage3-release/bin/zig test ../lib/std/std.zig \ | ||
| 57 | -femit-docs=stage3-release/doc/std \ | ||
| 58 | -fno-emit-bin \ | ||
| 59 | --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 | ||
| 66 | |||
| 67 | # Explicit exit helps show last command duration. | ||
| 68 | exit | ||
| \ No newline at end of file | |||