Commit Graph

442 Commits

Author SHA1 Message Date
Andrew Kelley
a73b3a0d70 CI: simplify x86 linux test instructions 2022-08-19 16:45:15 -07:00
Andrew Kelley
06c42a0c68 CI: test both stage3-debug and stage3-release on x86-linux 2022-08-19 16:45:15 -07:00
Andrew Kelley
507aae4a1a make self-hosted the default compiler
stage1 is available behind the -fstage1 flag.

closes #89
2022-08-19 16:45:15 -07:00
Andrew Kelley
73bbd1069a build: remove the option to omit stage2 2022-08-19 16:45:15 -07:00
Jakub Konka
b6ce0cce69 windows-ci: pass -Domit-stage2 to test-toolchain 2022-08-17 23:13:58 +02:00
Loris Cro
95573dbeeb ci: add gzip compression to stdlib docs & langref 2022-08-15 20:44:30 +02:00
Andrew Kelley
64307c2821 CI: update windows tarball 2022-08-11 12:48:11 -07:00
Hadrien Dorio
bcc6cdc4fb ci: azure: stop when exe exits with an error 2022-08-11 12:48:11 -07:00
Loris Cro
94662591d6 ci: upload langref and stdlib docs directly to s3
previously we were delegating that job to the website CI but it caused
the website repo to bloat, so now we only commit releases.json
2022-08-06 18:12:21 +02:00
Andrew Kelley
932d1f785e CI: -Denable-llvm for test-cases
This requires using -Dstatic-llvm and setting the search prefix and the
target, just like it is required for building stage2 and stage3. This
prevents Zig from trying to integrate with the system, which would
trigger an error due to the `cc` command not being installed.

closes #12144
2022-07-29 11:03:12 -07:00
Andrew Kelley
3ccb6a0cd4 CI: run test-run-translated-c tests with stage3 2022-07-27 17:56:59 -07:00
Andrew Kelley
ffac6a1b9f CI: run test-link with stage3 2022-07-26 20:23:33 -07:00
Andrew Kelley
3de9ffa84d CI: run test-cases with stage3
See #12144 for why I did not `-Denable-llvm` yet.
2022-07-26 20:15:57 -07:00
Andrew Kelley
0d120fcb89
Merge pull request #12225 from ziglang/ci-stage3-standalone
CI stage3 test coverage for test-standalone and test-cli
2022-07-25 00:46:56 -07:00
Andrew Kelley
93ae386f56 stage2: don't skip liveness or codegen if -femit-asm is supplied
Fixes Godbolt's CLI usage of Zig.
2022-07-24 15:02:05 -07:00
Andrew Kelley
be294e3744 CI stage3 test coverage for test-standalone 2022-07-24 15:02:05 -07:00
Luuk de Gram
34b786fb0f
enable link-test on linux CI 2022-07-23 10:08:51 +02:00
Andrew Kelley
7502e490cb
Merge pull request #12173 from ziglang/autodocs-rebased
New Autodocs!
2022-07-22 20:56:59 -07:00
Andrew Kelley
5cd1ccf4b9 CI: stage3 coverage for test-translate-c 2022-07-21 22:52:08 -07:00
zc
460211431f complete the drone pipeline runner type and platform os 2022-07-21 11:17:35 -07:00
Andrew Kelley
e054877466 CI: stage3 covers test-universal-libc and builds stage1 2022-07-20 23:28:30 -07:00
Andrew Kelley
1ec50613bf CI: increase stage3 test coverage
* Use a debug build of stage3 instead of a debug build of stage2 for
   our self-hosted compiler test coverage.
 * Move coverage from stage1 to stage3 for:
   - building self-hosted without LLVM
   - building self-hosted for 32-bit arm
   - test-compiler-rt
   - test-behavior
   - test-std
   - test-compare-output
   - test-asm-link
   - test-fmt
2022-07-20 12:27:03 -07:00
Andrew Kelley
08f3c7960a build.zig: remove deleted .cpp file 2022-07-20 11:10:46 -07:00
Jakub Konka
e3c8ba2dc5 ci: bump macOS image on Github Actions to macos-11
The currently used image is getting deprecated and every user is advised
to switch to either macos-11 or macos-12. The link to upstream
issue/notification:

https://github.com/actions/virtual-environments/issues/5583
2022-07-15 07:56:21 -07:00
Luuk de Gram
8033767082
wasm-linker: Implement linker tests (#12006)
* test/link: initial wasm support

This adds basic parsing and dumping of wasm section so they
can be tested using the new linker-test infrastructure.

* test/link: all wasm sections parsing and dumping

We now parse and dump all sections for the wasm binary format.
Currently, this only dumps the name of a custom section.
Later this should also dump symbol table, name, linking metadata and relocations.
All of those live within the custom sections.

* Add wasm linker test

This also fixes a parser mistake in reading the flags.

* test/link: implement linker tests wasm & fixes

Adds several test cases to test the wasm self-hosted linker.
This also introduces fixes that were caught during the implementation
of those tests.

* test-runner: obey omit_stage2 for standalone

When a standalone test requires stage2, but stage2 is omit
from the compiler, such test case will not be included as part
of the test suite that is being ran. This is to support CI's
where we omit stage2 to lower the memory usage.
2022-07-12 14:36:33 +02:00
Andrew Kelley
3e864c86da CI: azure: update build.zig for LLVM 14 2022-07-08 23:02:38 -07:00
Andrew Kelley
aade8856ee CI: update scripts to stage1 LLVM 14 tarballs
The previous tarballs were stage3 which is not quite ready for primetime
yet.
2022-07-08 21:28:06 -07:00
Andrew Kelley
bdf3fa12fa CI: update scripts to new LLVM 14 tarballs 2022-07-07 20:47:58 -07:00
Andrew Kelley
927e59d053 CI: fix wrong macos tarball 2022-07-05 15:20:12 -07:00
Andrew Kelley
bcfc4f0ceb CI: update tarballs to LLVM 14 2022-07-04 20:12:44 -07:00
Andrew Kelley
902dc8c721 CI: update freebsd pkg install command 2022-06-30 17:57:00 -07:00
Jakub Konka
ab8a670a57 link-tests: enable on macos CI host only for now 2022-06-22 23:04:47 +02:00
Jakub Konka
1d4dbf8d3c macos: run test-cases single threaded in the CI 2022-06-19 21:08:53 +02:00
Veikka Tuominen
6b36774adc std: disable failing tests, add zig2 build test-std to CI 2022-06-12 10:43:28 +03:00
Andrew Kelley
2bf532fc23 stage2: use std.debug.Trace only when explicitly enabled
Because it bumps up the stack space requirements, which is making a test
case fail on aarch64 drone CI.
2022-06-09 20:00:59 -07:00
Andrew Kelley
b095aa6986 CI: skip single-threaded tests on Drone
sure would be nice if they would just give us another hour of CI run time.
2022-06-01 14:05:58 -07:00
Andrew Kelley
69323fc143 CI: skip non native ReleaseFast and ReleaseSafe tests on drone
Because we're hitting the 2 hour time limit.
2022-06-01 11:19:19 -07:00
Jakub Konka
5b813f1a2a Set macOS/iPhoneOS/tvOS/watchOS ABI to none (unspecified) by default
Prior to this change we would assume the ABI for Apple targets to
be GNU which could result in subtle errors in LLVM emitting calls
to non-existent system libc provided functions such as `_sincosf`
which is a GNU extension and as such is not provided by macOS for example.
This would result in linker errors where the linker would not be
able to find the said symbol in `libSystem.tbd`.

With this change, we now correctly identify macOS (and other Apple
platforms) as having ABI `unknown` which translates to unspecified
in LLVM under-the-hood:

```
// main.ll
target triple = "aarch64-unknown-macos-unknown"
```

Note however that we never suffix the target OS with target version
such as `macos11` or `macos12` which means we fail to instruct LLVM
of potential optimisations provided by the OS such as the availability
of function `___sincosf_stret`. I suggest we investigate that in a
follow-up commit.
2022-05-22 17:45:02 +02:00
Andrew Kelley
66f3efb63b migrate runtime safety tests to the new test harness
* migrate runtime safety tests to the new test harness
   - this required adding compare output / execution support for stage1
     to the test harness.
 * rename `zig build test-stage2` to `zig build test-cases` since it now
   does quite a bit of stage1 testing actually. I named it this way
   since the main directory in the source tree associated with these
   tests is "test/cases/".
 * add some documentation for the test manifest format.
2022-05-13 14:03:20 -07:00
Andrew Kelley
aa05cd4809 CI: fix universal libc step name
This was a merge conflict that went undetected.
2022-05-07 17:44:37 -07:00
Andrew Kelley
e8c85450fe
Merge pull request #11592 from ziglang/stage3-macos-linker
Sema: solve a false positive "depends on itself"
2022-05-07 04:38:19 -04:00
Andrew Kelley
ec95e00e28 flatten lib/std/special and improve "pkg inside another" logic
stage2: change logic for detecting whether the main package is inside
the std package. Previously it relied on realpath() which is not portable.
This uses resolve() which is how imports already work.

 * stage2: fix cleanup bug when creating Module
 * flatten lib/std/special/* to lib/*
   - this was motivated by making main_pkg_is_inside_std false for
     compiler_rt & friends.
 * rename "mini libc" to "universal libc"
2022-05-06 22:41:00 -07:00
Jakub Konka
a2dbe6589e macho: share traditional codepaths with stage2+llvm backend 2022-05-07 01:44:26 +02:00
Andrew Kelley
a2b8a9756f CI: macos: disable stage2 test-behavior
stage2 on macOS is not yet capable of passing these tests. Such
improvements will be done in a follow-up change.
2022-05-06 16:26:04 -07:00
Andrew Kelley
6d605ca690 CI: macos: stage2 zig build test-behavior 2022-05-06 15:42:52 -07:00
Andrew Kelley
496eb69273 CI: add non-LLVM backends to the test matrix
We can't yet run the behavior tests with stage3, but at least we can run
them with stage2, and we can use the proper test matrix.

This commit also adds use_llvm and ofmt to the zig build system.
2022-05-05 22:29:25 -07:00
Jakub Konka
3624e1ef48 test: move compile errors and incremental tests into common dir 2022-05-04 23:51:16 +02:00
Jakub Konka
c8a0d8ff2b ci: ignore fmt errors in test/incremental/ 2022-04-28 18:35:01 +02:00
Andrew Kelley
ebfddbaf00 CI: additionally test building stage3 2022-04-21 11:20:26 -07:00
Andrew Kelley
ecd756834b CI: update CLI invokation
243afdcdf5 removed `-Dskip-compile-errors`
and added `-Dskip-stage`.
2022-03-31 16:06:50 -07:00