Port onto libakstdlib 2b79aca and convert the eight bool predicates (libakstdlib#26) #31

Open
tachikoma wants to merge 4 commits from libakstdlib-26 into main
2 changed files with 47 additions and 7 deletions
Showing only changes of commit 88ac2fc3f2 - Show all commits

View File

@@ -26,10 +26,24 @@ jobs:
# skipped for the same reason: our CMakeLists declares akerror::akerror # skipped for the same reason: our CMakeLists declares akerror::akerror
# first and libakstdlib guards on if(NOT TARGET ...). # first and libakstdlib guards on if(NOT TARGET ...).
submodules: true submodules: true
# moreutils is load-bearing, not incidental: it supplies errno(1), which
# deps/libakerror/scripts/generrno.sh shells out to at build time to
# generate its errno name table and to stamp AKERR_LAST_ERRNO_VALUE into
# the generated akerror.h.
#
# Its absence does not fail the build, which is what made this expensive to
# find. The script prints "errno: command not found" twice, emits an empty
# akerr_init_errno() so no errno ever gets a name, and substitutes an empty
# AKERR_LAST_ERRNO_VALUE -- so every code in libakerror's reserved band
# collapses from (134 + n) to ( + n), i.e. to n. AKERR_OUTOFBOUNDS is
# (AKERR_LAST_ERRNO_VALUE + 2), so it becomes literally 2, and ERR(2)
# answers "Out Of Bounds Error" where ENOENT's "No such file or directory"
# belongs. That is the docs_examples failure at docs/15-error-codes.md:105
# that this job carried on every run since #2.
- name: dependencies - name: dependencies
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y cmake gcc sudo apt-get install -y cmake gcc moreutils
- name: build - name: build
run: | run: |
cmake -S . -B build cmake -S . -B build
@@ -74,7 +88,7 @@ jobs:
- name: dependencies - name: dependencies
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y cmake gcc sudo apt-get install -y cmake gcc moreutils
# The whole suite under ASan and UBSan, golden files included. This is the # The whole suite under ASan and UBSan, golden files included. This is the
# gate libakstdlib's TODO.md section 1 calls its highest-value missing item # gate libakstdlib's TODO.md section 1 calls its highest-value missing item
# -- worth having here from the start, because this library is all fixed # -- worth having here from the start, because this library is all fixed
@@ -98,7 +112,7 @@ jobs:
- name: dependencies - name: dependencies
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y cmake gcc gcovr sudo apt-get install -y cmake gcc gcovr moreutils
# The gate is a ratchet, not a target: src/ sits at 94.6% of lines and # The gate is a ratchet, not a target: src/ sits at 94.6% of lines and
# 98.6% of functions, so 90 fails on a real regression (a test deleted, or # 98.6% of functions, so 90 fails on a real regression (a test deleted, or
# new untested code added) without tripping over rounding. # new untested code added) without tripping over rounding.
@@ -172,11 +186,33 @@ jobs:
# for deps/SDL_ttf/external/freetype, which the checkout above # for deps/SDL_ttf/external/freetype, which the checkout above
# deliberately does not clone. Installing two dev packages is much cheaper # deliberately does not clone. Installing two dev packages is much cheaper
# than cloning freetype and harfbuzz. # than cloning freetype and harfbuzz.
#
# The X11 dev packages are the other half, and they are what this job has
# been dying on since run #2 -- it has never once been green. SDL_X11 and
# its nine sub-options default ON on Linux, and CheckX11() in
# deps/SDL/cmake/sdlchecks.cmake calls SDL_missing_dependency() -- a hard
# CMake error, not a downgrade -- for any one of them whose header is
# absent. The runner image carries libx11-dev (X11/XKBlib.h resolved) but
# none of the extension packages, so configuration stopped at the first of
# the nine: "Couldn't find dependency package for XCURSOR".
#
# Turning the missing ones OFF would also configure, and is the wrong
# answer: the point of this job is that an AKGL build is a real SDL
# program, and a real SDL program on Linux builds the X11 backend. The
# tests still run headless under SDL_VIDEODRIVER=dummy -- see the env block
# below -- so this buys a faithful build, not a display.
#
# The list is SDL's own, from deps/SDL/docs/README-linux.md, reduced to the
# X11 entries: the audio, Wayland, KMSDRM and Vulkan backends all degrade
# to "not found" and skip themselves rather than erroring, so they cost
# nothing to leave out. Nine packages, all in noble.
- name: dependencies - name: dependencies
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y cmake gcc g++ pkg-config \ sudo apt-get install -y cmake gcc g++ pkg-config moreutils \
libfreetype-dev libharfbuzz-dev libfreetype-dev libharfbuzz-dev \
libx11-dev libxext-dev libxcursor-dev libxi-dev libxfixes-dev \
libxrandr-dev libxss-dev libxtst-dev libxkbcommon-dev
# The akgl-backed half: the text sink and the graphics, audio and input # The akgl-backed half: the text sink and the graphics, audio and input
# backends, the standalone SDL frontend, and the two suites that drive # backends, the standalone SDL frontend, and the two suites that drive
# them against a real software renderer and read the pixels back. # them against a real software renderer and read the pixels back.
@@ -256,7 +292,7 @@ jobs:
- name: dependencies - name: dependencies
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y cmake gcc python3 sudo apt-get install -y cmake gcc python3 moreutils
# Verify the tests actually catch bugs: break the library many ways and # Verify the tests actually catch bugs: break the library many ways and
# confirm the suite fails. This matters more here than in an ordinary C # confirm the suite fails. This matters more here than in an ordinary C
# library, because the akerror control-flow macros expand at their call # library, because the akerror control-flow macros expand at their call

View File

@@ -70,10 +70,14 @@ jobs:
# corpus is part of what kills mutants and it is checked in now, so # corpus is part of what kills mutants and it is checked in now, so
# that is libakerror and libakstdlib and nothing else. # that is libakerror and libakstdlib and nothing else.
submodules: true submodules: true
# moreutils for errno(1), which deps/libakerror's scripts/generrno.sh needs
# to generate its errno table. Without it the generated table is empty and
# every AKERR_* code collapses onto a low integer -- see the long note on
# ci.yaml's cmake_build job for what that breaks and how it presents.
- name: dependencies - name: dependencies
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y cmake gcc python3 sudo apt-get install -y cmake gcc python3 moreutils
# The whole akbasic-owned src/ tree. ci.yaml runs a two-file subset on every # The whole akbasic-owned src/ tree. ci.yaml runs a two-file subset on every
# push; this is the one that actually covers the interpreter. # push; this is the one that actually covers the interpreter.
# #