Commit Graph

58 Commits

Author SHA1 Message Date
Andrew Kelley
527055a821 CI: use absolute path for zig lib dir
Workaround for #12685
2022-08-30 00:33:21 -07:00
Andrew Kelley
75d5a4b9a2 CI: pass explicit zig lib dir in lots of places
see #12684 for motivation
2022-08-29 23:37:31 -07:00
Andrew Kelley
532cfb65e0 CI: rework to account for new cmake behavior
* CMakeLists: pass `-Dstrip` for release zig builds
 * pass -target and -mcpu to zig1. works around llvm on freebsd
   incorrectly detecting "freestanding" instead of "freebsd" for the
   native OS.
 * ci.ziglang.org is now responsible for creating aarch64-macos tarballs
   rather than Azure.
2022-08-28 17:07:21 -07:00
Andrew Kelley
56129d26eb cmake: build stage3 by default
This is a simplification of the cmake build script which introduces a
new "stage3" target that is built by default, which builds and installs
a stage3 zig.

It greatly simplifies the build instructions for Zig, making it conform
to the regular cmake routine, while still producing a stage3 artifact.
2022-08-28 17:07:21 -07:00
Andrew Kelley
40c9b13608 CI: x86_64-linux: update tarball
I thought this would be needed for dwarf 4 but I think it's not actually
needed. Anyway the tarball is fresher, might as well use it.
2022-08-24 12:57:31 -07:00
Andrew Kelley
b75eeae595 CI: x86_64-linux: avoid cmake ZIG_EXECUTABLE hack
empirically this avoids a segfault on the CI.
2022-08-19 17:24:23 -07:00
Andrew Kelley
e78e9f33c0 CI: update x86_64-linux tarball 2022-08-19 16:45:16 -07:00
Andrew Kelley
d75d40dfdf build: make docs a separate step than test 2022-08-19 16:45:15 -07:00
Andrew Kelley
7346600517 CI: avoid concurrent jobs tripping over each other 2022-08-19 16:45:15 -07:00
Andrew Kelley
e3ccea70dd CI: isolate zig-cache for parallel debug/release builds 2022-08-19 16:45:15 -07:00
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
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
5cd1ccf4b9 CI: stage3 coverage for test-translate-c 2022-07-21 22:52:08 -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
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
bcfc4f0ceb CI: update tarballs to LLVM 14 2022-07-04 20:12:44 -07: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
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
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
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
Cody Tapscott
1de63ad793 zig fmt: Add --exclude argument to skip dir/file
This change adds a "--exclude" parameter to zig format, which can be
used to make sure that it does not process certain files or folders
when recursively walking a directory.

To do this, we simply piggy-back on the existing "seen" logic in zig
fmt and mark these files/folders as seen before processing begins.
2022-03-25 12:27:46 -07:00
Andrew Kelley
46ba24010a CI: explicitly pass -fno-LLVM
Needed because of previous commit.
2022-03-17 19:12:27 -07:00
Andrew Kelley
e535521619 CI: additionally test wasm32-wasi with LLVM backend 2022-03-06 12:25:33 -07:00
Andrew Kelley
dd12a7b1e5 ci: linux: re-use cmake config for finding LLVM 2022-02-17 23:42:48 -07:00
Andrew Kelley
6f42876e74 CLI: resolve system libs into static libraries
using the provided -L directories before checking if we need to integrate
with system library paths. This prevents false positive of invoking
system cc to find native paths when in fact all dependencies are
satisfied by -L (or --search-prefix to zig build).
2022-02-17 23:42:48 -07:00
Andrew Kelley
419074a81b CI: simplify linux script
* build.zig: remove detour through zig0. I'll add it back as an option
   later. This means you can build stage1 with a freshly built zig
   without detouring through zig0 again.
 * remove unused file windows_script.bat
 * drone.yml: remove unnecessary steps
 * ninja doesn't need a jobs parameter
 * build the release version of zig with zig build instead of cmake.
 * build stage2 with -Dstatic-llvm -Duse-zig-libcxx
2022-02-17 23:42:46 -07:00
Andrew Kelley
2f42a2617b CI: more stage2 test coverage
* Test everything on the Linux CI even if we can't run it, because it's
   our fastest machine.
 * Test stage2 using a build of stage2 (instead of using `-fno-stage1`)
   so that compiler-rt is also built with stage2.
 * Additionally test running x86_64-macos on the macOS CI, both the LLVM
   backend and x86_64 backend.
2022-02-17 23:41:58 -07:00
Andrew Kelley
0b22b6b70e ci: update x86_64-linux tarballs
The updated docker images has LLVM, LLD, Clang updated to 13.0.1 and Zig
updated to 0.9.1.
2022-02-15 20:12:10 -07:00
joachimschmidt557
6c195db03a
ci: add aarch64-linux behavior tests 2022-02-14 22:36:13 +01:00
Andrew Kelley
1a8987fe7c CI: additionally test stage2 LLVM backend targeting aarch64-linux 2022-02-12 11:18:23 +01:00
Andrew Kelley
59315463f2 ci: add test coverage for self-hosted arm and x86_64 backends 2022-01-06 22:57:29 -05:00
Michael Dusan
a711fcbbfa ci: linux: supply on_master_sucess with VERSION
- move on_master_success to the package step
- add required secret availability for packaging

This replaces a1b79ea585 .
2021-12-06 23:13:06 -08:00
Luuk de Gram
9e03cf9489 wasm: Initial behavior tests succeeding
- Correctly load slice value on stack
- Implement WrapErrorUnionErr and payload
- Implement trunc, fix sliceLen and write undefined
- Implement slice as return type and argument

Note: This also fixes a memory leak for inferred error sets, and for usingnamespace
2021-12-05 12:19:01 -08:00
Michael Dusan
a1b79ea585 ci: linux: pass VERSION on_master_success
Cache the VERSION value for use with linux_on_mster_success.
This replaces 117c0460d3 .
2021-12-05 00:31:59 -08:00
Andrew Kelley
f7cbd92e6c Revert "Merge pull request #10270 from Luukdegram/behaviour-tests"
This reverts commit 725267f7c2, reversing
changes made to 2dae860de3.

This test is failing:

```zig
pub fn main() u8 {
    var e = foo();
    const i = e catch 69;
    return i;
}

fn foo() anyerror!u8 {
    return 5;
}
```

It's returning 69 instead of the expected value 5.
2021-12-04 21:55:50 -07:00