| author | |
| committer | |
| log | 27edf60651496408a92a37c7b9766881ed54758d |
| tree | 5476009ebf530c000e4d6a6571e76448b858d8e0 |
| parent | ad4991f42895868d988668749d839ced1914f276 |
and post comment on the PR3 files changed, 60 insertions(+), 2 deletions(-)
.github/workflows/ci.yaml+12| ... | ... | @@ -17,3 +17,15 @@ jobs: |
| 17 | 17 | uses: actions/checkout@v3 |
| 18 | 18 | - name: Build and Test |
| 19 | 19 | run: sh ci/aarch64-linux-release.sh |
| 20 | - name: Post Comment | |
| 21 | uses: actions/github-script@v6 | |
| 22 | with: | |
| 23 | script: | | |
| 24 | const fs = require('fs'); | |
| 25 | const body = fs.readFileSync('perf.txt', 'utf8'); | |
| 26 | github.rest.issues.createComment({ | |
| 27 | issue_number: context.issue.number, | |
| 28 | owner: context.repo.owner, | |
| 29 | repo: context.repo.repo, | |
| 30 | body: body, | |
| 31 | }); |
ci/aarch64-linux-release.sh+5-2| ... | ... | @@ -81,8 +81,6 @@ rm -rf ../build-new |
| 81 | 81 | mkdir ../build-new |
| 82 | 82 | cd ../build-new |
| 83 | 83 | |
| 84 | export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache" | |
| 85 | export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache" | |
| 86 | 84 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" |
| 87 | 85 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" |
| 88 | 86 | |
| ... | ... | @@ -108,3 +106,8 @@ stage3/bin/zig build -p stage4 \ |
| 108 | 106 | --search-prefix "$PREFIX" \ |
| 109 | 107 | --zig-lib-dir "$(pwd)/../lib" |
| 110 | 108 | stage4/bin/zig test ../test/behavior.zig -I../test |
| 109 | ||
| 110 | # After all correctness checking, compare performance against the merge-base. | |
| 111 | cd .. | |
| 112 | sh ci/measure-perf-delta.sh "$ZIG" "$TARGET" "$MCPU" "$PREFIX" || \ | |
| 113 | echo "Error occurred measuring the performance delta of this pull request." > perf.txt |
ci/measure-perf-delta.sh created+43| ... | ... | @@ -0,0 +1,43 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | set -x | |
| 4 | set -e | |
| 5 | ||
| 6 | if [ -z "$GITHUB_BASE_REF" ]; then | |
| 7 | exit 0 | |
| 8 | fi | |
| 9 | ||
| 10 | ZIG="$1" | |
| 11 | TARGET="$2" | |
| 12 | MPCU="$3" | |
| 13 | PREFIX="$4" | |
| 14 | ||
| 15 | git checkout "$GITHUB_BASE_REF" | |
| 16 | ||
| 17 | rm -rf ../build-base | |
| 18 | mkdir ../build-base | |
| 19 | cd ../build-base | |
| 20 | ||
| 21 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | |
| 22 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | |
| 23 | ||
| 24 | cmake .. \ | |
| 25 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | |
| 26 | -DCMAKE_BUILD_TYPE=Release \ | |
| 27 | -DZIG_TARGET_TRIPLE="$TARGET" \ | |
| 28 | -DZIG_TARGET_MCPU="$MCPU" \ | |
| 29 | -DZIG_STATIC=ON \ | |
| 30 | -DZIG_NO_LIB=ON \ | |
| 31 | -GNinja | |
| 32 | ||
| 33 | unset CC | |
| 34 | unset CXX | |
| 35 | ||
| 36 | ninja install | |
| 37 | ||
| 38 | cd .. | |
| 39 | ||
| 40 | poop \ | |
| 41 | "build-base/stage3/bin/zig build-exe test/standalone/hello_world/hello.zig" \ | |
| 42 | "build-head/stage3/bin/zig build-exe test/standalone/hello_world/hello.zig" \ | |
| 43 | > perf.txt |