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.
- cbe: Implement linksection support, to support TLS when not linking libc
- cbe: Support under-aligned variables / struct fields
- cbe: Support packed structs (in the C definition of packed)
- windows: Fix regression with x86 _tls_array
- compiler_rt: Add 128-bit atomics to compiler_rt
- tests: Re-enable threadlocal tests on cbe+windows, and llvm+x86
- tests: Re-enable f80 tests that now pass
- ci: change windows ci to run the CBE behaviour tests with -lc, to match how the compiler is bootstrapped
- update zig1.wasm
This allows using `zig ar` for `CMAKE_AR`. Unfortunately, it requires a
patch to CMakeLists.txt and cannot be done merely with flags to the
cmake line.
I messed up the spelling of '-stack_size' making it '-stack' instead.
Will need to fix on master branch. But let's test this here before
making another master branch commit.
In particular, these two changes are relevant:
* zig cc: support -stack in addition to --stack for linker arg
- Fixes stack overflow when running zig2 on aarch64-macos.
* compiler_rt: avoid using weak aliases
- Fixes duplicate symbol when linking zig2 on aarch64-linux.
In the CI system, I copied the old tarball and then applied
05c21a26cb2d5daf06191bd996d0770192704b66 to its compiler_rt
implementation.
After this is verified we can drop this commit and regenerate the
tarballs from a master branch commit.
Override the cache directories because they won't actually help other CI
runs which will be testing alternate versions of zig, and ultimately
would just fill up space on the hard drive for no reason.
In practice we did see one of the CI servers fill up too many files
inside ~/.cache/zig, which caused certain file system operations to
start returning ENOSPC, despite the hard drive having plenty of space
left.
Standard library tests require the root source file to be the
corresponding file inside the Zig lib directory. In other words, there
may not be two copies of the standard library. After the changes in this
branch, Zig no longer notices that `../lib/std.zig` and
`$(pwd)/../lib/std.zig` are the same file because one is relative and
one is absolute.
This service stopped working two days ago for unknown reasons. Until it
is determined how to get it working again, or we switch to a different
CI provider for aarch64, this CI test coverage is disabled so that
we can continue to use the CI for other targets.