This introduces the new test step `test-c-import`, and removes the
ability of the behavior tests to `@cImport` paths relative to `test`.
This allows the behavior tests to be run without translate c.
This reverts commit 7161ed79c4, reversing
changes made to 3f2a65594e.
Unfortunately, this sat in the PR queue too long and the merge broke the
zig1.wasm bootstrap process.
For computing the zig version number, pass --abbrev=9 rather than
requiring the user to set their git configuration in order to make zig
versions match the standard.
The idea here is that the zig2 executable is perhaps the more useful
deliverable until we implement our own optimization passes. This will
allow system packages to provide Zig, and use it to compile Zig
projects, all without LLVM!
This script is sometimes timing out, so let's test fewer things to save
time. The x86_64-windows-release script does include test coverage for
release builds of the standard library, behavior tests, etc.
This reverts commit bb98ffbe7f.
This caused master branch to fail the CI. We do need to figure out why
these assertions are tripping but let's do it in a branch other than
master.
The new CI images provided by GitHub no longer provide ninja.exe, so
this commit installs it explicitly, using the suggested method from
GitHub.
See https://github.com/actions/runner-images/issues/8343 for more
details.
This reverts commit 4d1432299f.
Please don't hard-code unrelated concerns this way. build.zig should not
have awareness of the naming conventions for cmake build directories.
We already have a zig build step for this: test-fmt.
* Rename the test-fmt step to check-fmt.
test-fmt sounds like it runs tests for `zig fmt` itself (lib/std/zig/render.zig).
* Use it instead of `zig fmt --check` in the CI scripts.
* Also use it in CI scripts that didn't have this check before.
* build.zig: introduce `-Dflat` option which makes the installation
match what we want to ship for our download tarballs. This allows
deleting a bunch of shell script logic from the CI.
- for example it puts the executable directly in prefix/zig rather
than prefix/bin/zig and it additionally includes prefix/LICENSE.
* build.zig: by default also install std lib documentation to doc/std/
- this can be disabled by `-Dno-autodocs` similar to how there is
already `-Dno-langref`.
* build.zig: add `std-docs` and `langref` steps which build and install
the std lib autodocs and langref to prefix/doc/std and
prefix/doc/langref.html, respectively.
* std.Build: implement proper handling of `-femit-docs` using the
LazyPath system. This is a breaking change.
- this is a partial implementation of #16351
* frontend: fixed the handling of Autodocs with regards to caching and
putting the artifacts in the proper location to integrate with the
build system.
- closes#15864
* CI: delete the logic for autodocs since it is now handled by build.zig
and is enabled by default.
- in the future we should strive to have nearly all the CI shell
script logic deleted in favor of `zig build` commands.
* CI: pass `-DZIG_NO_LIB=ON`/`-Dno-lib` except for the one command where
we want to actually generate the langref and autodocs. Generating the
langref takes 14 minutes right now (why?!) so we don't want to do that
more times than necessary.
* Autodoc: fixed use of a global variable. It works fine as a local
variable instead.
- note that in the future we will want to make Autodoc run
simultaneously using the job system, but for now the principle of
YAGNI dictates that we don't have an init()/deinit() API and instead
simply call the function that does the things.
* Autodoc: only do it when there are no compile errors
to avoid getting OOM killed. We need to have a high number of GitHub
Actions runners simultaneously active, otherwise the hardware ends up
underutilized. But with zig build running in parallel now, this
sometimes results in memory usage spikes that have been causing the
runner to get killed.
This number is the total physical memory (251G) divided by the number of
runners we have active (11).
See related commit 2d41dac57d which did
the same but for our x86_64-linux machines.
to avoid getting OOM killed. It's been happening regularly recently. We
need to have a high number of GitHub Actions runners simultaneously
active, otherwise the hardware ends up underutilized. But with zig build
running in parallel now, this sometimes results in memory usage spikes
that have been causing the runner to get killed.
This number is the total physical memory (126G) divided by the number of
runners we have active (6).
This reverts commit a34752c941.
With #15277 merged, the macOS CI will still run the self-hosted x86_64
tests even with -Dskip-non-native. This was the main motivation for the
commit.
It would be nice to keep this flag enabled, however, we don't have
enough CI computing power, and the macOS CI lags behind with these extra
tests enabled.
I find myself quite often creating ReleaseSafe builds and putting them
to production for certain experiments:
- Debug info are for stack traces. An ongoing example where those would
help is #14815.
- Safety checks would have saved a couple of mine and @kubkon's hours in
#15098.
This is a breaking change for scripts that make Zig releases -- I will
submit another PR to zig-bootstrap and release-cutter after this is
merged.
Zig's build script has several race conditions preventing proper
concurrent builds from working. By using -j1 for now, finishing this
branch (concurrent zig builds) is untangled from the separate problem of
correcting concurrency issues with zig's own build script.
In other words, let's solve one problem at a time.