Skip to content

Commit

Permalink
CI: pass explicit zig lib dir in lots of places
Browse files Browse the repository at this point in the history
see #12684 for motivation
  • Loading branch information
andrewrk committed Aug 30, 2022
1 parent 6f9b7c8 commit 75d5a4b
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 21 deletions.
1 change: 1 addition & 0 deletions ci/azure/macos_script
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ unset CXX
make $JOBS install

stage3-release/bin/zig build test docs \
--zig-lib-dir ../lib \
-Denable-macos-sdk \
-Dstatic-llvm \
--search-prefix "$PREFIX"
Expand Down
2 changes: 2 additions & 0 deletions ci/azure/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
displayName: 'Build'
- pwsh: |
Set-Variable -Name ZIGLIBDIR -Value "$(Get-Location)\lib"
Set-Variable -Name ZIGINSTALLDIR -Value "$(Get-Location)\stage3-release"
function CheckLastExitCode {
Expand All @@ -71,6 +72,7 @@ jobs:
& "$ZIGINSTALLDIR\bin\zig.exe" build test docs `
--search-prefix "$ZIGPREFIXPATH" `
--zig-lib-dir "$ZIGLIBDIR" `
-Dstatic-llvm `
-Dskip-non-native `
-Dskip-stage2-tests
Expand Down
8 changes: 4 additions & 4 deletions ci/drone/test_linux_behavior
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ INSTALL_PREFIX="$DRONE_WORKSPACE/stage3-release"
ZIG="$INSTALL_PREFIX/bin/zig"
export ZIG_GLOBAL_CACHE_DIR="$DRONE_WORKSPACE/zig-cache"

$ZIG build test-behavior -Dskip-non-native
$ZIG build test-compiler-rt -Dskip-non-native
$ZIG build test-fmt
$ZIG build docs
$ZIG build test-behavior -Dskip-non-native --zig-lib-dir lib
$ZIG build test-compiler-rt -Dskip-non-native --zig-lib-dir lib
$ZIG build test-fmt --zig-lib-dir lib
$ZIG build docs --zig-lib-dir lib
5 changes: 3 additions & 2 deletions ci/drone/test_linux_cases
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ INSTALL_PREFIX="$DRONE_WORKSPACE/stage3-release"
ZIG="$INSTALL_PREFIX/bin/zig"
export ZIG_GLOBAL_CACHE_DIR="$DRONE_WORKSPACE/zig-cache"

$ZIG build -Dskip-non-native # test building self-hosted without LLVM
$ZIG build -Dskip-non-native test-cases
# test building self-hosted without LLVM
$ZIG build -Dskip-non-native --zig-lib-dir lib
$ZIG build test-cases -Dskip-non-native --zig-lib-dir lib
14 changes: 7 additions & 7 deletions ci/drone/test_linux_misc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ INSTALL_PREFIX="$DRONE_WORKSPACE/stage3-release"
ZIG="$INSTALL_PREFIX/bin/zig"
export ZIG_GLOBAL_CACHE_DIR="$DRONE_WORKSPACE/zig-cache"

$ZIG build test-universal-libc -Dskip-non-native
$ZIG build test-compare-output -Dskip-non-native
$ZIG build test-standalone -Dskip-non-native -Dskip-release-safe
$ZIG build test-stack-traces -Dskip-non-native
$ZIG build test-cli -Dskip-non-native
$ZIG build test-asm-link -Dskip-non-native
$ZIG build test-translate-c -Dskip-non-native
$ZIG build test-universal-libc -Dskip-non-native --zig-lib-dir lib
$ZIG build test-compare-output -Dskip-non-native --zig-lib-dir lib
$ZIG build test-standalone -Dskip-non-native --zig-lib-dir lib -Dskip-release-safe
$ZIG build test-stack-traces -Dskip-non-native --zig-lib-dir lib
$ZIG build test-cli -Dskip-non-native --zig-lib-dir lib
$ZIG build test-asm-link -Dskip-non-native --zig-lib-dir lib
$ZIG build test-translate-c -Dskip-non-native --zig-lib-dir lib
7 changes: 6 additions & 1 deletion ci/drone/test_linux_std_Debug
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ INSTALL_PREFIX="$DRONE_WORKSPACE/stage3-release"
ZIG="$INSTALL_PREFIX/bin/zig"
export ZIG_GLOBAL_CACHE_DIR="$DRONE_WORKSPACE/zig-cache"

$ZIG build test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small -Dskip-non-native
$ZIG build test-std \
--zig-lib-dir lib \
-Dskip-release-safe \
-Dskip-release-fast \
-Dskip-release-small \
-Dskip-non-native
8 changes: 7 additions & 1 deletion ci/drone/test_linux_std_ReleaseFast
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ INSTALL_PREFIX="$DRONE_WORKSPACE/stage3-release"
ZIG="$INSTALL_PREFIX/bin/zig"
export ZIG_GLOBAL_CACHE_DIR="$DRONE_WORKSPACE/zig-cache"

$ZIG build test-std -Dskip-debug -Dskip-release-safe -Dskip-release-small -Dskip-non-native -Dskip-single-threaded
$ZIG build test-std \
--zig-lib-dir lib \
-Dskip-debug \
-Dskip-release-safe \
-Dskip-release-small \
-Dskip-non-native \
-Dskip-single-threaded
8 changes: 7 additions & 1 deletion ci/drone/test_linux_std_ReleaseSafe
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ INSTALL_PREFIX="$DRONE_WORKSPACE/stage3-release"
ZIG="$INSTALL_PREFIX/bin/zig"
export ZIG_GLOBAL_CACHE_DIR="$DRONE_WORKSPACE/zig-cache"

$ZIG build test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small -Dskip-non-native -Dskip-single-threaded
$ZIG build test-std \
--zig-lib-dir lib \
-Dskip-debug \
-Dskip-release-fast \
-Dskip-release-small \
-Dskip-non-native \
-Dskip-single-threaded
4 changes: 2 additions & 2 deletions ci/drone/test_linux_std_ReleaseSmall
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export ZIG_GLOBAL_CACHE_DIR="$DRONE_WORKSPACE/zig-cache"
# of ReleaseSmall std lib tests.
# $ZIG build test-std -Dskip-debug -Dskip-release-safe -Dskip-release-fast -Dskip-non-native

$ZIG test lib/std/std.zig -OReleaseSmall
$ZIG test lib/std/std.zig -OReleaseSmall -lc
$ZIG test lib/std/std.zig -OReleaseSmall --zig-lib-dir lib
$ZIG test lib/std/std.zig -OReleaseSmall -lc --zig-lib-dir lib
1 change: 1 addition & 0 deletions ci/srht/freebsd_script
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ZIG_LIBC="$ZIG_LIBC_TXT" samu install

# Here we skip some tests to save time.
stage3/bin/zig build test docs \
--zig-lib-dir ../lib \
-Dstatic-llvm \
--search-prefix "$PREFIX" \
-Dskip-stage1 \
Expand Down
3 changes: 2 additions & 1 deletion ci/zinc/linux_test_stage3_debug
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ stage3/bin/zig build test \
-fwasmtime \
-Dstatic-llvm \
-Dtarget=native-native-musl \
--search-prefix "$DEPS_LOCAL"
--search-prefix "$DEPS_LOCAL" \
--zig-lib-dir ../lib

# Explicit exit helps show last command duration.
exit
6 changes: 4 additions & 2 deletions ci/zinc/linux_test_stage3_release
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ ninja install
-fwasmtime \
-Dstatic-llvm \
-Dtarget=native-native-musl \
--search-prefix "$DEPS_LOCAL"
--search-prefix "$DEPS_LOCAL" \
--zig-lib-dir ../lib

# Produce the experimental std lib documentation.
mkdir -p "$RELEASE_STAGING/docs/std"
"$RELEASE_STAGING/bin/zig" test ../lib/std/std.zig \
-femit-docs=$RELEASE_STAGING/docs/std \
-fno-emit-bin
-fno-emit-bin \
--zig-lib-dir ../lib

cp ../LICENSE $RELEASE_STAGING/
cp ../zig-cache/langref.html $RELEASE_STAGING/docs/
Expand Down

0 comments on commit 75d5a4b

Please sign in to comment.