Skip to content

Commit

Permalink
zig-utils: bring tests back
Browse files Browse the repository at this point in the history
Fixes #99

Currently it cannot install anything, because:

First: an apt hook fails:

    E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
    E: Sub-process returned an error code
    🚨 Error: The command exited with status 100

Second: if the hook is removed prior the `apt-get update` (`rm -f
/etc/apt/apt.conf.d/docker-clean`), we get OOM:

    dpkg: error processing archive /var/cache/apt/archives/libpython3.11-minimal_3.11.2-6_amd64.deb (--unpack):
     dpkg-deb --control subprocess returned error exit status 2
    dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/libexpat1_2.5.0-1_amd64.deb' (size=99340) member 'control.tar': lzma error: Cannot allocate memory
    tar: This does not look like a tar archive
    tar: Exiting with failure status due to previous errors
    dpkg-deb: error: tar subprocess returned error exit status 2

... so let's just skip wine for now.
  • Loading branch information
Motiejus Jakštys authored and motiejus committed Oct 16, 2023
1 parent ac69ab3 commit 4ee3c05
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
10 changes: 4 additions & 6 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ steps:
command: ci/list_toolchains_platforms
- label: "Test Release"
command: ci/prepare_git && echo "--- ci/release" && ci/release
# TODO(#99) re-enable
# - label: "Test zig utilities"
# plugins:
# - docker#v5.7.0:
# image: "debian:stable"
# command: apt-get update && apt-get install --no-install-recommends -y wine64 python3 ca-certificates && ci/zig-utils
- label: "Test zig utilities"
command: ci/zig-utils
env:
HERMETIC_CC_TOOLCHAIN_SKIP_WINE: 1
- label: "Test rules_cc example"
command: ci/prepare_git && ci/test_example rules_cc override_repository
- label: "Test bzlmod example"
Expand Down
18 changes: 11 additions & 7 deletions ci/zig-utils
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ for zigfile in $(git ls-files '*.zig'); do
done


echo "--- zig test $zigfile"
# until hermetic_cc_toolchain gets a zig toolchain, run zig programs' unit tests here.
echo "--- zig test $zigfile"
$ZIG test "$zigfile"

echo "--- test $zigfile via wine64"
$ZIG test \
-target x86_64-windows-gnu \
--test-cmd wine64-stable \
--test-cmd-bin \
"$zigfile"
# as of 2023-10 yours truly (@motiejus) was not able to install wine64
# on CI. See the commit message for details.
if [[ -z "${HERMETIC_CC_TOOLCHAIN_SKIP_WINE:-}" ]]; then
echo "--- test $zigfile via wine64"
$ZIG test \
-target x86_64-windows-gnu \
--test-cmd wine64-stable \
--test-cmd-bin \
"$zigfile"
fi
done

0 comments on commit 4ee3c05

Please sign in to comment.