1
Fork 0
Commit Graph

14 Commits (2ea75419e0ddd22162f1f4a221731fe15f21fc18)

Author SHA1 Message Date
Motiejus Jakštys 2ea75419e0 wip nix
$ ./ci/test
    bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    + cache_prefix=/tmp/bazel-zig-cc
    + echo '--- build a single target with very hermetic sandbox'
    --- build a single target with very hermetic sandbox
    + bazel build --experimental_use_hermetic_linux_sandbox --sandbox_writable_path=/tmp/bazel-zig-cc --sandbox_add_mount_pair=/proc //test/c:which_libc_linux_amd64_gnu.2.19
    /nix/store/96ky1zdkpq871h2dlk198fz0zvklr1dr-bash-5.1-p16/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    /nix/store/96ky1zdkpq871h2dlk198fz0zvklr1dr-bash-5.1-p16/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    INFO: Analyzed target //test/c:which_libc_linux_amd64_gnu.2.19 (0 packages loaded, 0 targets configured).
    INFO: Found 1 target...
    Target //test/c:which_libc_linux_amd64_gnu.2.19 up-to-date:
      bazel-bin/test/c/which_libc_/libc_aware/platform:linux_amd64_gnu.2.19
    INFO: Elapsed time: 1.147s, Critical Path: 0.02s
    INFO: 1 process: 1 internal.
    INFO: Build completed successfully, 1 total action
    + echo '--- bazel test  ...'
    --- bazel test  ...
    + bazel test ...
    /nix/store/96ky1zdkpq871h2dlk198fz0zvklr1dr-bash-5.1-p16/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    /nix/store/96ky1zdkpq871h2dlk198fz0zvklr1dr-bash-5.1-p16/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    ERROR: /home/motiejus/.cache/bazel/_bazel_motiejus/6ec14a6813f13f2c8f1d8cce5637da2e/external/local_jdk/BUILD.bazel:2:10: in fail_rule rule @local_jdk//:jdk:
    Traceback (most recent call last):
            File "/home/motiejus/.cache/bazel/_bazel_motiejus/6ec14a6813f13f2c8f1d8cce5637da2e/external/bazel_tools/tools/jdk/fail_rule.bzl", line 19, column 13, in _fail_rule_impl
                    fail("%s %s" % (ctx.attr.header, ctx.attr.message))
    Error in fail: Auto-Configuration Error: Cannot find Java binary bin/java in /home/motiejus/.cache/bazel/_bazel_motiejus/install/1349a6142c7ce93610b5832496a88870/embedded_tools/tools/jdk/nosystemjdk; either correct your JAVA_HOME, PATH or specify Java from remote repository (e.g. --java_runtime_version=remotejdk_11
    ERROR: /home/motiejus/.cache/bazel/_bazel_motiejus/6ec14a6813f13f2c8f1d8cce5637da2e/external/local_jdk/BUILD.bazel:2:10: Analysis of target '@local_jdk//:jdk' failed
    ERROR: Analysis of target '//.direnv/flake-inputs/hfjyanh5shjsx6m3h1k8gw61s3azkk68-source/test/cgo:cgo_test_linux_amd64_gnu.2.19' failed; build aborted:
    INFO: Elapsed time: 1.853s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (70 packages loaded, 11766 targets configured)
        Fetching repository @nixpkgs_go; Building Nix derivation
    ERROR: Couldn't start the build. Unable to run tests
    motiejus@mtwork:/code/bazel-zig-cc$
2023-03-23 14:21:54 +02:00
Motiejus Jakštys 3a204583f3
all commands: use /tmp/bazel-zig-cc (#6)
Different Bazel instances can share the zig cache all right.
2023-03-08 17:33:59 +02:00
Motiejus Jakštys af9360366b
More CI (#3)
- ci only: use a separate zig cache dir for each run
- use `tools/bazel` everywhere.
- remove arm64 tests. They don't give enough value to be worth the
  brittle environment.
- remove windows execution, except for launcher. Ditto. I will probably
  bring them back.
2023-03-06 17:32:48 +02:00
Motiejus Jakštys 0e48fc3cb4 tests: sandboxing
The slowness of bazel-zig-cc comes from setup and teardown of sandbox
directories[1]. Turning on `experimental_reuse_sandbox_directories`
speeds it up significantly.

Depending on how the tests with this go in the next few days, I will add
this recommendation to README.

This has been marked as safe to use and no longer experimental as of
Bazel master[2].

[1]: https://git.sr.ht/~motiejus/test-zigcc
[2]: https://github.com/bazelbuild/bazel/pull/16490
2022-12-12 10:24:52 +02:00
Motiejus Jakštys db2f187aa9 ci/test: switch to proper fastbuild
turns out this was overwritten in .bazelrc from a long time ago.
2022-06-28 13:34:02 +03:00
laurynasl 4d65b80903 Add libc constraint and libc aware toolchains
- Also get rid of @bazel_skylib dependency
2022-04-14 14:29:06 +00:00
laurynasl 7a81e2a129 Restructure tests to all run in bazel
- add rules to run tests for a specific platform
- use downloaded buildifier
- move lint to a script
- rename ci tasks
- stop running under qemu-aarch64-static as it doesn't do anything
2022-04-14 10:47:02 +00:00
laurynasl 723e6f051d Move toolchainss under @zig_sdk//platform: 2022-04-07 12:43:34 +03:00
Motiejus Jakštys 3d166c5671 use .bazelrc for qemu configuration 2022-02-08 14:22:21 +02:00
Motiejus Jakštys 3325986971 recommend registering toolchains via .bazelrc 2022-02-08 14:09:30 +02:00
Motiejus Jakštys 98f31dcf58 [bazelrc] build --compilation_mode=opt 2021-12-15 15:05:12 +02:00
Motiejus Jakštys 5a4a2dfcf1 remove non-required options from .bazelrc 2021-06-30 16:00:42 +03:00
Motiejus Jakštys 61c98f3464 bring back some things from the old repo 2021-06-07 22:50:19 +03:00
Adam Bouhenguel 2195fb6941 Initial commit with minimal examples 2021-04-09 15:05:01 -07:00