| author | |
| committer | |
| log | faca0e4220d1cf6910f6ea7f7ea03077438c5a4d |
| tree | 760111872f59497df30112fbc4e9dfbbf860b6c7 |
| parent | b511231f9552d7c1de1574eda19dc6cf657e906e |
Makes sure that #12183 will not regress.2 files changed, 36 insertions(+), 0 deletions(-)
ci/zinc/drone.yml+8| ... | @@ -35,10 +35,18 @@ steps: | ... | @@ -35,10 +35,18 @@ steps: |
| 35 | commands: | 35 | commands: |
| 36 | - ./ci/zinc/build_aarch64_macos | 36 | - ./ci/zinc/build_aarch64_macos |
| 37 | 37 | ||
| 38 | - name: test_determinism | ||
| 39 | depends_on: | ||
| 40 | - test_stage3_release | ||
| 41 | image: ci/debian-amd64:11.1-12 | ||
| 42 | commands: | ||
| 43 | - ./ci/zinc/linux_test_determinism | ||
| 44 | |||
| 38 | - name: linux_package | 45 | - name: linux_package |
| 39 | depends_on: | 46 | depends_on: |
| 40 | - test_stage3_debug | 47 | - test_stage3_debug |
| 41 | - test_stage3_release | 48 | - test_stage3_release |
| 49 | - test_determinism | ||
| 42 | when: | 50 | when: |
| 43 | branch: | 51 | branch: |
| 44 | - master | 52 | - master |
ci/zinc/linux_test_determinism created+28| ... | @@ -0,0 +1,28 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -x | ||
| 4 | set -e | ||
| 5 | |||
| 6 | DEPS_LOCAL="/deps/local" | ||
| 7 | ZIG_PREFIX="$DRONE_WORKSPACE/_release/staging" | ||
| 8 | VERSION=$($ZIG_PREFIX/bin/zig version) | ||
| 9 | |||
| 10 | "$ZIG_PREFIX/bin/zig" build \ | ||
| 11 | --prefix stage4 \ | ||
| 12 | -Dconfig_h="build-release/config.h" \ | ||
| 13 | -Denable-llvm \ | ||
| 14 | -Denable-stage1 \ | ||
| 15 | -Dno-lib \ | ||
| 16 | -Drelease \ | ||
| 17 | -Dstrip \ | ||
| 18 | -Dtarget=x86_64-linux-musl \ | ||
| 19 | -Duse-zig-libcxx \ | ||
| 20 | -Dversion-string="$VERSION" | ||
| 21 | |||
| 22 | # diff returns an error code if the files differ. | ||
| 23 | echo "If the following command fails, it means nondeterminism has been" | ||
| 24 | echo "introduced, making stage3 and stage4 no longer byte-for-byte identical." | ||
| 25 | diff "$ZIG_PREFIX/bin/zig" "stage4/bin/zig" | ||
| 26 | |||
| 27 | # Explicit exit helps show last command duration. | ||
| 28 | exit | ||