Commit Graph

249 Commits

Author SHA1 Message Date
Manuel Barrio Linares
18ab18958b CI: add retries and package caching across all platforms
- Add retry loops to all package manager commands (apt, apk, pacman,
pkg).
- Implement daily package caching to minimize external server hits.
- Enable Docker layer caching in CI using buildx and GHA backend.
  - Sync CI Docker build steps with the build-with-docker.sh logic.
  - We don't, or more accurately, can't actually use
`build-with-docker.sh` anymore in CI. Maybe we should move it to
scripts/tools/ to keep the root directory clean.
- add ramdisk for BSD, shave 30/60 seconds.
- change BDSs to cross-platform-actions/action for a cleaner ci and skip
SLOW_TESTS for BSDs: this shaves a few seconds
- set global CACHE_INVALIDATION_SEED
2026-02-11 10:01:14 +01:00
Manuel Barrio Linares
35d84390bd Simplify CI, do more with less.
- Rename Docker job to **"LLVM ${{ matrix.llvm_version }}
Compatibility"** for better visibility.
- Limit `build_type` to **Debug** for MSYS2, OpenBSD, NetBSD, and Nix
jobs to reduce CI time.
- Refactor **Alpine Linux** job: updated to 3.23, simplified dependency
installation, and removed redundant LLVM matrix.
- Modernize **Docker** builds:
    - Added automatic architecture detection (x86_64/ARM) for CMake
downloads.
    - Generalized LLVM repository logic to support multiple Ubuntu
codenames (Focal/Jammy/Noble).
    - Fixed git permissions issues in containerized builds using
`safe.directory`.
- Standardized Android build packaging and added conditional testing for
Debug builds.
2026-02-06 12:00:00 +01:00
Book-reader
bb9e9b54cf Improve android support & add CI (#2664)
* Change context destruction order.

* enable emulated tls on termux

* Fix stdlib on android

* Add a CI workflow for android termux

* update release notes

* use the new unified CI tests on android

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
2026-02-05 20:04:16 +01:00
Manu Linares
eddbfb8ba3 CMakeLists and CI: Use our custom llvm (#2893)
* c3-llvm: new CMakeLists and CI

uses custom llvm version 21.x from
"https://github.com//ManuLinares/llvm-custom-builds/"

* use c3lang/llvm-for-c3 latest release

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
2026-02-05 18:55:09 +01:00
Christoffer Lerno
87fa253059 Add debug versions. 2026-01-14 02:00:07 +01:00
Manu Linares
04eb6fc451 CI: Major refactor, expanded coverage, and ~80% speedup (#2736)
* netbsd fail on error

- Group each BSD test in its own subshell. Without this, if an error
occurs, it exits, but we don't know "where" it failed
- added *usesh: true* to BSD for faster copying into the virtualbox VM

- Some test_suite_runners wheren't correctly printing. added
--no-terminal
- For testing I've changed *build-msvc* from Debug to RelWithDebInfo

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* separate runs

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* fix typo

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* Split msvc-debug into separate workflow

Run msvc-debug only on maintainer pushes, keep CI fast and still catches
errors.

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* Fix build and test errors on NetBSD

* Set proper sizes for various types used for threads
* Add num_cpu function
* Add sysctl constants
* Allow testproject to build on NetBSD
* Tweaks to the linker code so that it adds correct flags and finds dynamic linker on NetBSD

* bsd: force system linker test

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* system linker on openbsd

remove lld from netbsd

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* use cc linker in openbsd, and re-add lld for netbsd

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* openbsd: fixes

- implement num_cpu() for OPENBSD
- testproject: add openbsd
- linker.c: fix for openbsd
- bsd refactor main.yml and more fixes

* openbsd: fix for unit tests and test_suite_runner

openbsd now passes all tests except the 'dynlib-test' which yields
'relocation error' when running `cc test.c -L. -ladd -Wl,-rpath=.`

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* openbsd: guard/disable unit test test_ct_intlog2()

* build-msys2-clang: add all tests that build-msvc has

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* Fix Windows import library generation by adding /IMPLIB support and properly declaring static_lib_name()

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* build-msys2-mingw: add all tests that build-msvc has and enable it

configure CMake to link LLVM and LLD statically

* Revert "Revert windows"

This reverts commit 197f82d829.

* win-llvm 21.1.8

uses the RelWithDebInfo+Assertions

* refactor(CI): Centralize test logic and fix Docker execution

This commit refactors the GitHub Actions workflow to improve
maintainability and correct a flaw in the Docker build.

- Ensures Docker based tests run *inside* the generated container, not
on the host. This also fixes environment isolation and user permission
errors.
- Centralizes all common test steps (examples, libs, unit tests, etc)
into a single, auto-detecting Bash script: `scripts/tools/ci_tests.sh`.
- Centralize all release artifact packaging into a single
`scripts/tools/package_build.sh`
- fixes using correct paths for test_suite_runner when running on
windows under bash.

- This significantly reduces YAML duplication, making `main.yml` more
readable and easier to maintain.

This one supersedes pull/2677, and includes the fixes for:

- fix openbsd and netbsd
- added win-llvm 21.1.8 and fixed CMakeLists.txt
- added full unit-tests and suite for build-msys2-mingw and
build-msys2-clang

* macos: add/fix build for llvm (19,20,21)

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* ci: run tests in temp dir to avoid workspace pollution

Executes ci_tests.sh in a disposable temporary directory by copying
resources/ and test/ folders, preventing build artifacts from cluttering
the source tree.

This makes it easy to run `scripts/tools/ci_tests.sh` locally on any
platform.

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* add ilammy/msvc-dev-cmd@ and Ninja

we can simplify the windows runner and run everything in bash

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* windows: drain subprocess stderr before join to avoid test_suite_runner hang

* move last test to `ci_tests.sh`

thus completing the centralization of tests in `ci_tests.sh`

* Fix Windows CI cache

Updates the cache key to include hashes of CMakeLists.txt and the
workflow file.

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* `package_build.sh` runs in temp dir to avoid workspace pollution

- add cleanup

* nix: use `ci_tests.sh`

* remove annoying build-mac warnings

This now checks if package already installed trying to prevent
annoying warnings in the github ci:

Fixes:
```
build-mac (Release, 19)curl 8.17.0 is already installed and up-to-date.
To reinstall 8.17.0, run: brew reinstall curl
```

* refactor test_suite_runner

- less allocations, cleaner code, more maintainable.
- now can be killed and the temp dirs are correctly cleaned up, and the
output is correct.

* main.yml: bsd: change to using rsync, is twice as fast.

* default to `--wincrt=dynamic` when `--sanitize=address` on windows

Default to dynamic, as static ASan is removed in LLVM 21+ for Windows
https://github.com/llvm/llvm-project/pull/107899

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* Formatting (indent with tab, align with space). Fix K&R braces. Style: keep all cases multiline if one is.

---------

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
Co-authored-by: Alex Garrett <limit.ordinal17@gmail.com>
2026-01-14 01:16:06 +01:00
Christoffer Lerno
197f82d829 Revert windows 2026-01-07 03:36:48 +01:00
Christoffer Lerno
db47b0555d Update windows LLVM version 2026-01-07 03:15:59 +01:00
Christoffer Lerno
26d733ef59 No optimization in test runner for MSVC 2025-12-31 00:45:35 +01:00
Christoffer Lerno
c205719563 Fix netbsd vm version 2025-12-23 11:43:53 +01:00
limit-ordinal
85166bc706 Add NetBSD Support (#2661)
* Add NetBSD Support

Includes:
- Hints to find non-compatibility libc functions
- Struct and constant definitions for sockets, polling, etc.
- Changes to the linker code to work around some quirks in the NetBSD dynamic linker
- A target triple for netbsd aarch64 so llvm builds/links the compiler properly on this platform

* Updated releasenotes and some compacting

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
2025-12-19 19:23:06 +01:00
Christoffer Lerno
436af4dbca Re-enable OpenBSD 2025-12-17 20:11:14 +01:00
Christoffer Lerno
b08a2a2c0f Disable openbsd 2025-12-17 17:21:32 +01:00
DylanDoesProgramming
ccffa03de2 musl-based linux distro support (#2577)
* added switch statement to link musl-based linux distros to ld-musl-x86-64.so.2

* Update linker.c

/lib/ld-musl-x86-64.so.1 is musl's ld so. My bad

* don't need ENV_MUSLEABI.* in the switch for x86_64

* typo

* Added a CI test for an Alpine Linux container

* Update main.yml

Forgot to have bundle_output job use `env.LLVM_RELEASE_VERSION_ALPINEv3_22`.

* Added env.LLVM_RELEASE_VERSION_ALPINEv3_22 to `upload artifacts`

* changed bundle name to c3-musl-${{matrix,build_type}}.tar.gz

* Undid an accidental name change in build-linux-ubuntu22

* Update main.yml

sudo doesn't exist in alpine by default, and runs in root by default.

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

`--linker=builtin` fails because it forces search of `/lib64/ld-linux-x86-64.so.2`. lib64 doesn't exist on musl unless created as a symlink, and the appropriate so is /lib/ld-musl-<arch>.so.1

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

make isn't in alpine by default. added it in for risc-v example.

* gcc-riscv-none-elf is alpine's package

* using realpath for c3c over using relative pathing

* Have to use relative path for arguments in compiler test

* added --linker=builtin to

* Added linux-musl-<arch> targets

* Added more ld targets for glibc

* set both testproject libs as folders until they behave better

* added linux-musl-x64 target to clib2

* added riscv targets for ld-linux

* ubuntu doesn't have ld in /lib, but solely in /lib64?

* Make MUSL distinct from the target.

* Fix default in project schema

* Fix define

* Fix manifests.

* Update main.yml

add --linux-libc flag for builtin linking

* Grammar refresh

* Update releasenotes.

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
2025-12-03 00:42:36 +01:00
Christoffer Lerno
6deed2d4a4 Update raylib in CI 2025-11-27 22:58:04 +01:00
Christoffer Lerno
f37e7460aa Update OpenBSD llvm version. 2025-10-23 13:58:10 +02:00
Christoffer Lerno
7b02907830 Try to workaround tag lock. 2025-10-12 21:59:41 +02:00
Christoffer Lerno
e0fbe31f00 Update release versions 2025-10-02 21:27:35 +02:00
Christoffer Lerno
05c3fa1afd Update CI 2025-10-01 09:43:20 +02:00
Book-reader
79c0c8e082 Build linux binaries for releases with proper curl support (#2464)
* Build linux binaries with proper curl support

* Move vendor-fetch tests to a more appropriate location
2025-09-06 11:00:07 +02:00
Christoffer Lerno
69b3263a00 - Added path::home_directory, path::documents_directory, path::videos_directory, path::pictures_directory, path::desktop_directory, path::screenshots_directory,
`path::public_share_directory`, `path::templates_directory`, `path::saved_games_directory`, `path::music_directory`, `path::downloads_directory`.
  Fix codegen bug in expressions like `foo(x()) ?? io::EOF?` causing irregular crashes.
2025-09-06 02:27:10 +02:00
Christoffer Lerno
f7143c1852 Fix tests, reenable LLVM 22 2025-08-26 20:55:58 +02:00
Christoffer Lerno
21343baa75 Update for LLVM 21 (#2435)
Support LLVM 21
2025-08-26 17:29:39 +02:00
Christoffer Lerno
d8daa4ac83 Fix dir check Win32 CI 2025-07-28 23:23:09 +02:00
LowByteFox
04528aee1f fix openbsd CI not uploading artifacts 2025-07-22 15:44:58 +02:00
LowByteFox
5c82747970 Improved OpenBSD support (#2317)
* add openbsd support, compiles and passses all tests
* fix backtrace
* gh actions should include openbsd artifacts
2025-07-22 15:15:20 +02:00
Christoffer Lerno
efaac43248 - Virtual memory library.
- New virtual emory arena allocator.
- Fixed resize bug when resizing memory down in ArenaAllocator, DynamicArenaAllocator, BackedArenaAllocator.
- Added feature flag "SLOW_TESTS"
2025-07-14 22:36:43 +02:00
ryuukk
e7d3e60ebd Disable libxml2 dependency on linux (#2268)
* Disable libxml2 depdendency

* All the linuxes
2025-07-04 00:14:10 +02:00
Christoffer Lerno
5cf48ad730 Add Ubuntu 22 2025-04-16 20:25:42 +02:00
Christoffer Lerno
debbae594c Remove more Ubuntu 20 2025-04-16 17:11:53 +02:00
Christoffer Lerno
668175851b Improved error message #2084 2025-04-16 15:25:05 +02:00
Christoffer Lerno
87e254e4b1 Added vector hash to release notes and change raylib dependency 2025-03-31 16:42:24 +02:00
Christoffer Lerno
d3e81b193a Update CI 2025-03-31 01:34:01 +02:00
Christoffer Lerno
83e5a0c2ab Fix CI 2025-03-30 12:51:15 +02:00
Christoffer Lerno
c058c50aef Add releasenotes to zip. 2025-03-30 12:34:04 +02:00
Christoffer Lerno
40ff6b1315 Release candidate 0.7.0 2025-03-29 22:36:28 +01:00
Christoffer Lerno
6739de3a10 Re-enable everything and use the new release flow. 2025-03-28 11:18:40 +01:00
Christoffer Lerno
010a77816b Test new CI 2025-03-28 01:26:57 +01:00
Christoffer Lerno
61113a8471 Update name 2025-03-28 01:12:13 +01:00
Christoffer Lerno
7b0cc85b2c Update github token 2025-03-28 00:51:43 +01:00
Christoffer Lerno
ea5fec80b0 Try deleting old releases. 2025-03-28 00:37:39 +01:00
Christoffer Lerno
9db316ddac Restore the checkout. 2025-03-27 22:41:28 +01:00
Christoffer Lerno
cb164e2ca2 Remove what seems to be useless tags. 2025-03-27 20:35:54 +01:00
Christoffer Lerno
83ff1da80c Update latest name 2025-03-27 15:12:21 +01:00
Christoffer Lerno
d626dea52a Update timestamp name 2025-03-27 00:04:56 +01:00
Christoffer Lerno
2ab318a178 Generate tag name update 2025-03-26 21:30:12 +01:00
Christoffer Lerno
638d5332ff Generate tag name 2025-03-26 18:31:08 +01:00
Christoffer Lerno
e0f1919849 Rename latest build 2025-03-26 14:15:46 +01:00
Christoffer Lerno
d2c44717f1 Exclude 21 due to packaging errors of LLVM. 2025-03-20 10:09:48 +01:00
Christoffer Lerno
5c77c9a754 - Change distinct -> typedef.
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00