Commit graph

251 commits

Author SHA1 Message Date
Matthieu Pizenberg
0392a93d1b
Implement bitwise shifts (#8469)
* Implement bitwise shifts

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Add low_level_interp shift tests

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Fix wrong test

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Use appropriate byte size for shifts

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Simplify shift left and right interpreter

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Factorize the num_shift_right_zf_by in interpreter

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Add edge cases tests for shifts

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Fix an edge case test

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Truncate shift left to the correct precision

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* Add shift operators to the borrow switch

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>

* restore accidental deletions

---------

Signed-off-by: Matthieu Pizenberg <matthieu.pizenberg@gmail.com>
Co-authored-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-12-17 19:32:38 +01:00
Luke Boswell
6f7a294150
fix test lint for Windows 2025-12-17 14:35:34 +11:00
Luke Boswell
aad6395974
WIP - migrate to cli ctx 2025-12-17 11:08:22 +11:00
Richard Feldman
d91a8aa534
Add lint for no // ======= comments 2025-12-10 15:31:53 -05:00
Anton-4
d675e25e94
suppress llvm error 2025-12-09 16:19:06 +01:00
Luke Boswell
17b87a954f
refactor to use common runner for test platforms 2025-12-09 11:06:04 +11:00
Luke Boswell
5c6350336d
WIP - adding more reporting, restore glibc support 2025-12-09 09:51:47 +11:00
Luke Boswell
42cfa7e674
fix check_test_wiring for our changes 2025-12-08 13:00:05 +11:00
Luke Boswell
de31b1808b
changes to cross-compilation for CI 2025-12-03 17:26:20 +11:00
Anton-4
15fabf1ca4
fix permissions + no old CI 2025-11-27 22:27:33 +01:00
Anton-4
cf5bb467d9
more valgrind tests 2025-11-27 20:42:29 +01:00
Anton-4
c442c8a088
valgrind wrapper (#8454)
This was the only way I could prevent this warning being spammed thousands of times.
2025-11-26 19:38:06 +01:00
Anton-4
5b37dd6653
fix test to_str on unbound number (#8421) 2025-11-24 12:14:11 +01:00
Richard Feldman
7987ac2c27
Move to zig_lints.zig 2025-11-22 14:49:09 -05:00
Richard Feldman
a4336e0600
Move zig_lints.sh into a zig script 2025-11-22 12:50:13 -05:00
Anton-4
4d8fd89fbc
improved wiring check (#8408)
* better test wiring check

* unnecessary exclusion
2025-11-21 18:49:42 +01:00
Anton-4
988ceab26d
use retry action everywhere (#8399) 2025-11-19 19:08:49 +01:00
Anton-4
cea6d56329
WIP Fix unification custom type + actually run tests (#8376)
* initial check wiring script

* use wiring script + fixes

* add assertNoErrors

* test fixes

* fix unification for  types
2025-11-11 21:12:55 +01:00
Anton-4
10fb170c2e
Check all defined tests are actually run + fixes (#8375)
* initial check wiring script

* use wiring script + fixes

* add assertNoErrors

* test fixes

* add wiring check exception

* Add check_test_wiring.zig to CI manager filters

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-11-11 18:54:17 +01:00
Anton-4
9090fa4f97
update link checker script (#8242)
update link checker
2025-09-09 17:00:59 +02:00
Luke Boswell
cb42d26e11
Roc platform host shim (#8214)
* use zig Builder to generate LLVM bc for platform host shim

* WIP

* Working embedded LLVM compilation

* lints

* Update test_shared_memory_system.zig

* Update main.zig

* Refactor out builder into separate file

* remove clang fallback, remove -Dllvm build flag

* WIP change platform header

* WIP no hardcoded platform entrypoints

* WIP no hardcoded entrypoints

* remove hardcoded interpreter shim entrypoint

* WIP multiple entrypoints

* WIP multiple entrypoints

* WIP alignment issue

* it's working!!

* cleanup

* fmt

* fix tests and snapshots

* fix cross-compile

* WIP fix linking linux

* improved debug logging in rocRun

* WIP fix linux segfaults

* cleanup stray dbgs

* fix Windows linking

* WIP remove std.debug.print in prebuilt shim

* remove libc stubs, try C shim for platform host main

* WORKING ON LINUX!!!

* WIP fixing int platform

* prevent double mapping of shared memory

* WIP

* remove clang fallback

* cleanup test platforms

* vendor linux object files for musl and gnu in test platforms

* fix windows __main export

* typo

* avoide hardcoding libc path and dynamic linker on linux

* some fixes

* try CI fix for linux ARM64

* try use system CRT for ARM64

* use absolute pats for vendored CRT

* minimal roc build

* use target os for filename not host os

* implement app stubs for test platforms

* fix glibc

* WIP cross compilation

* fix run, fix build for native

* Merge remote/main

* fix macos

* add bookends

* remove hosts

* fix cross-compile for linux on macos

* fix files paths for Windows

* Update main.zig

* test ubu 24.04 too

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* debug: log all used instructions

* fmt

* get bad instruction with gdb

* install gdb

* Revert last 4 commits

* simpler cross-compile arm64 runtime files

* add minimal cross-compilation for glibc

* simplify stub generation

* Update test_int_platform.sh

* Update ci_cross_compile.yml

* Update ci_cross_compile.yml

* try alpine3.18 x64musl files

* Claude's fix + removed CPU instructions

* fix fuzz crash empty after merge

* update snapshot

* restore full CI

* some cleanup

* remove debugging from CI - print all supported CPU instructions

* try using generic when LLVM compiles app stub

* enhanced error handling for app stub compilation using LLVM

* check machine ABI on linux

* try more debugging

* update test script to inidicate truncated error logs, temporarily display everything for arm64 linux errors

* fix missing arm64 libc search paths

* back to normal CI

* try without .git 

See https://github.com/ziglang/zig/issues/21316#issuecomment-2408071050

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* undo .git change

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* retry zig build command

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* different retry strategy

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
Co-authored-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-09-09 13:15:23 +02:00
Anton-4
74e2c6abf5
basic-webserver release 0.13.0 (#8228)
* basic-webserver release 0.13.0

* enable PR trigger

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* sync with cli changes

* try less flags

this works on my local rpi

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* install gcc-aarch64-linux-gnu

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* did install locally

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* debug ls

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* rm was done in prev step

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* rm file....exp

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* move rm

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* tar.br

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* back to normal triggers

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-09-05 17:37:18 +02:00
Anton-4
293148921d
basic-cli 0.20 (#8227)
* WIP basic-cli 0.20.0

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* disable typical CI

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* forgot tests dir

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* test on more OS

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* Remove ubuntu-20.04 from CI matrix

Official support for 20.04 was ended on 31 May 2025

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* test on ubuntu-24.04-arm too

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* macos ripgrep install

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* add ripgrep dep ubu

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* test musl hypothesis

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* Fix cargo copy

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* fix OS pattern linux arm64

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* Update build script to remove incompatible functions

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* Remove incompatible tests for Ubuntu builds

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* fix path

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* more musl removal

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* fix paths

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* fix multi command

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* debug with tree

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* install tree

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* test-cmd check

* correct filename

* no macos tests

* add macos again

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* debug cleanup

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* build tar.br release

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* back to normal CI

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-09-01 16:14:33 +02:00
JRI98
7eb250c7bc
Fix typo for CI 2025-08-04 16:48:59 +01:00
Luke Boswell
0ee51856a7
make lints happy 2025-07-30 11:57:17 +10:00
Richard Feldman
ea6f5e2ba6
Fix lints 2025-07-09 21:28:20 -04:00
Anton-4
3d4ab7eb36
Fix unsupported content disposition + http 500 flake (#7791)
* Fix unsupported content disposition flake

* add retry flaky script
2025-05-17 19:08:57 +02:00
Anton-4
9c3bb3690f
allow re-exports without comments (#7790) 2025-05-17 15:24:33 +02:00
Anton-4
b552466755
glossary: type signature + typos upgrade (#7776)
* glossary: type signature

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* ignore toolchain for typos

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* fix typos

* put toolchain file back

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-05-07 17:35:56 +02:00
Magdielian-code
1c86a3e346
Create link-checker.roc (#7747)
* Create link-checker.roc

Create markdown link checker for glossary.md

Signed-off-by: Magdielian-code <oziomaagaecheta81@gmail.com>

* CI check + finishing touches

* improvements + test failure

* test succeeded

---------

Signed-off-by: Magdielian-code <oziomaagaecheta81@gmail.com>
Co-authored-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-04-18 20:10:10 +02:00
Anton-4
e9690c9bce
Lowercased some files (#7713) 2025-03-24 16:43:18 +01:00
Anton-4
62c1ea213a
Zig lint improvements (#7683)
* don't require comments on init+deinit

* ignore re-exports

* typo

* predicate-quantifier does not exist

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-03-10 18:39:17 +01:00
Anton-4
f20b9b57ed
move CI check to script (#7682)
move check to script
2025-03-10 17:16:12 +01:00
Anton-4
f830f7de91
added pub comment linter 2025-03-06 19:39:54 +01:00
Jan
68e524e110
snake_case-ify all remaining camelCase names in hiding (#7561)
* Snake-case-ify def names in comments

* Snake-case-ify def names in strings

* Snake-case-ify ignored function parameters

* Snake-case-ify test script names, for consistency

* Update CI snapshot to match snake_case

* snake case correction

---------

Co-authored-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-02-05 16:05:03 +01:00
Anton-4
ce610019da
add alpha tests 2025-02-04 13:57:49 +01:00
Anton-4
96350631cc
more release testing + refactoring
moved aarch64 apple test

typo

install z3 for all macos

some refactoring

fix rm command

update rm

test linux arm64 too

refactor

cleanup dir

back to normal CI
2025-02-01 20:02:42 +01:00
Anton-4
a8cc9cf819
nightly folder updates 2025-01-06 16:09:42 +01:00
Anton-4
2765864a44
basic-cli 0.17.0 release (#7232)
* basic-cli 0.17.0 release

* use legacy linker for build.roc

* back to old architecture display

* normal CI triggers
2024-12-18 20:44:13 +01:00
Anton-4
1285a24565
glue copy fix
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-12-18 14:12:57 +01:00
Anton-4
17960d1154
fix nightly testing + updates 2024-12-17 14:17:21 +01:00
Anton-4
10ebd029cb
remove {}
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-12-14 11:32:32 +01:00
Anton-4
d4cd3cd50b
cli example removal cleanup
examples/cli was removed in https://github.com/roc-lang/roc/pull/6921
2024-12-13 18:37:42 +01:00
Luke Boswell
3162fbf83f
copy zig builtins for benchmarks 2024-12-13 09:08:03 +11:00
Brendan Hansknecht
109cafcafe
fix how benchmark script is loaded on main
To get #6921 working, we need the benchmark script to pull glue.zig correctly on main.
As such, we need to load it into a lib dir such that it is found in the correct relative path.
This hopefully will get the benchmarking working on the other PR.

Also, switch over to `lib` dir first cause that is what is seen in the wide.
2024-12-12 09:54:36 -08:00
faldor20
a7308130cf
clippy on everything 2024-12-12 20:54:25 +10:00
Anton-4
8e23f96fbd
nightly tests fixes 2024-11-19 11:41:50 +01:00
Anton-4
0ab04c0d7e
remove mentions of --prebuilt-platform 2024-11-13 18:52:01 +01:00
Anton-4
6c1d8a467b
fix hello world issues 2024-11-13 12:05:17 +01:00
Luke Boswell
1b0cd14715
add script to prebuild platform-switching rust 2024-11-04 15:37:34 +11:00