xo-umbrella2/.forgejo/workflows/ci-cmake.yaml
Roland Conybeare 6a924fb23d
Some checks failed
cmake-docker / cmake-build (clang, clang++) (push) Successful in 23m35s
cmake-docker / cmake-build (gcc, g++) (push) Failing after 9m8s
CI / smoke-test (push) Failing after 10m18s
forgejo workflow: install path fix [BUGFIX] [CI]
2026-08-01 23:51:43 -04:00

799 lines
24 KiB
YAML

name: cmake-docker
# - Verifies a plain (non-nix) cmake build works inside docker-xo-builder.
# Links:
# - org-howto/articles/2026/06/forgejo/docker-container-registry.org
# - xo-umbrella2/pkgs/docker-xo-builder.nix
on:
push:
branches: [main]
paths-ignore:
- '**.nix'
- '**.md'
jobs:
cmake-build:
runs-on: xo-builder
strategy:
fail-fast: false # a failure in one compiler must not cancel the other
max-parallel: 1 # run gcc, then clang -- never both at once (8GB host)
matrix:
include:
- { cc: gcc, cxx: g++ }
- { cc: clang, cxx: clang++ }
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
PREFIX: ${{github.workspace}}/local-${{matrix.cc}}
steps:
- name: set PATH
run: |
echo "$PREFIX/bin" >> $GITHUB_PATH
- name: compiler
run: |
# print canonical choices
for c in c++ g++ clang++; do
p="$(command -v "$c" 2>/dev/null || true)"
printf '%-8s %s\n' "$c" "${p:+$(readlink -f "$p")}"
done
# cmake will use CXX, default to c++
choice=$(${CXX:-c++} --version | head -1)
echo "build with: ${choice}"
- name: pkgconfig
run: |
# list packages known to pkg-config
pkg-config --list-all
- name: dirs
run: |
tree -L 1 /include
ls /lib
- name: checkout
run: |
echo PATH=${PATH}
git clone --quiet --depth=1 $GITHUB_SERVER_URL/roland/xo-umbrella2.git .
mkdir -p "$PREFIX"
- name: bootstrap xo-cmake
run: |
echo "::group::xo-cmake configure"
cmake -S xo-cmake -B .build/xo-cmake -DCMAKE_INSTALL_PREFIX=$PREFIX
echo "::endgroup::"
echo "::group::xo-cmake build (no-op)"
cmake --build .build/xo-cmake
echo "::endgroup::"
echo "::group::xo-cmake install"
cmake --install .build/xo-cmake
echo "::endgroup::"
- name: build xo-timeutil
run: |
echo "::group::xo-timeutil configure"
xo-build --configure --with-utests --with-examples xo-timeutil
echo "::endgroup::"
echo "::group::xo-timeutil build"
xo-build --build xo-timeutil
echo "::endgroup::"
echo "::group::xo-timeutil utest"
ctest --test-dir xo-timeutil/.build
echo "::endgroup::"
echo "::group::xo-timeutil install"
xo-build --install xo-timeutil
echo "::endgroup::"
- name: build xo-ppsink
run: |
echo "::group::xo-ppsink configure"
xo-build --configure --with-utests --with-examples xo-ppsink
echo "::endgroup::"
echo "::group::xo-ppsink build"
xo-build --build xo-ppsink
echo "::endgroup::"
echo "::group::xo-ppsink utest"
ctest --test-dir xo-ppsink/.build
echo "::endgroup::"
echo "::group::xo-ppsink install"
xo-build --install xo-ppsink
echo "::endgroup::"
- name: build xo-subsys
run: |
echo "::group::xo-subsys configure"
xo-build --configure --with-utests --with-examples xo-subsys
echo "::endgroup::"
echo "::group::xo-subsys build"
xo-build --build xo-subsys
echo "::endgroup::"
echo "::group::xo-subsys utest"
ctest --test-dir xo-subsys/.build
echo "::endgroup::"
echo "::group::xo-subsys install"
xo-build --install xo-subsys
echo "::endgroup::"
- name: build xo-indentlog
run: |
echo "::group::xo-indentlog configure"
xo-build --configure --with-utests --with-examples xo-indentlog
echo "::endgroup::"
echo "::group::xo-indentlog build"
xo-build --build xo-indentlog
echo "::endgroup::"
echo "::group::xo-indentlog utest"
ctest --test-dir xo-indentlog/.build
echo "::endgroup::"
echo "::group::xo-indentlog install"
xo-build --install xo-indentlog
echo "::endgroup::"
- name: build xo-flatstring
run: |
echo "::group::xo-flatstring configure"
xo-build --configure --with-utests --with-examples xo-flatstring
echo "::endgroup::"
echo "::group::xo-flatstring build"
xo-build --build xo-flatstring
echo "::endgroup::"
echo "::group::xo-flatstring utest"
ctest --test-dir xo-flatstring/.build
echo "::endgroup::"
echo "::group::xo-flatstring install"
xo-build --install xo-flatstring
echo "::endgroup::"
- name: build xo-randomgen
run: |
echo "::group::xo-randomgen configure"
xo-build --configure --with-utests --with-examples xo-randomgen
echo "::endgroup::"
echo "::group::xo-randomgen build"
xo-build --build xo-randomgen
echo "::endgroup::"
echo "::group::xo-randomgen utest"
ctest --test-dir xo-randomgen/.build
echo "::endgroup::"
echo "::group::xo-randomgen install"
xo-build --install xo-randomgen
echo "::endgroup::"
- name: build xo-reflectutil
run: |
echo "::group::xo-reflectutil configure"
xo-build --configure --with-utests --with-examples xo-reflectutil
echo "::endgroup::"
echo "::group::xo-reflectutil build"
xo-build --build xo-reflectutil
echo "::endgroup::"
echo "::group::xo-reflectutil utest"
ctest --test-dir xo-reflectutil/.build
echo "::endgroup::"
echo "::group::xo-reflectutil install"
xo-build --install xo-reflectutil
echo "::endgroup::"
- name: build xo-arena
run: |
echo "::group::xo-arena configure"
xo-build --configure --with-utests --with-examples xo-arena
echo "::endgroup::"
echo "::group::xo-arena build"
xo-build --build xo-arena
echo "::endgroup::"
echo "::group::xo-arena utest"
ctest --test-dir xo-arena/.build
echo "::endgroup::"
echo "::group::xo-arena install"
xo-build --install xo-arena
echo "::endgroup::"
- name: build xo-testutil
run: |
echo "::group::xo-testutil configure"
xo-build --configure --with-utests --with-examples xo-testutil
echo "::endgroup::"
echo "::group::xo-testutil build"
xo-build --build xo-testutil
echo "::endgroup::"
echo "::group::xo-testutil utest"
ctest --test-dir xo-testutil/.build
echo "::endgroup::"
echo "::group::xo-testutil install"
xo-build --install xo-testutil
echo "::endgroup::"
- name: build xo-indentlog2
run: |
echo "::group::xo-indentlog2 configure"
xo-build --configure --with-utests --with-examples xo-indentlog2
echo "::endgroup::"
echo "::group::xo-indentlog2 build"
xo-build --build xo-indentlog2
echo "::endgroup::"
echo "::group::xo-indentlog2 utest"
ctest --test-dir xo-indentlog2/.build
echo "::endgroup::"
echo "::group::xo-indentlog2 install"
xo-build --install xo-indentlog2
echo "::endgroup::"
- name: build xo-facet
run: |
echo "::group::xo-facet configure"
xo-build --configure --with-utests --with-examples xo-facet
echo "::endgroup::"
echo "::group::xo-facet build"
xo-build --build xo-facet
echo "::endgroup::"
echo "::group::xo-facet utest"
ctest --test-dir xo-facet/.build
echo "::endgroup::"
echo "::group::xo-facet install"
xo-build --install xo-facet
echo "::endgroup::"
- name: build xo-printable2
run: |
echo "::group::xo-printable2 configure"
xo-build --configure --with-utests --with-examples xo-printable2
echo "::endgroup::"
echo "::group::xo-printable2 build"
xo-build --build xo-printable2
echo "::endgroup::"
echo "::group::xo-printable2 utest"
ctest --test-dir xo-printable2/.build
echo "::endgroup::"
echo "::group::xo-printable2 install"
xo-build --install xo-printable2
echo "::endgroup::"
- name: build xo-alloc2
run: |
echo "::group::xo-alloc2 configure"
xo-build --configure --with-utests --with-examples xo-alloc2
echo "::endgroup::"
echo "::group::xo-alloc2 build"
xo-build --build xo-alloc2
echo "::endgroup::"
echo "::group::xo-alloc2 utest"
ctest --test-dir xo-alloc2/.build
echo "::endgroup::"
echo "::group::xo-alloc2 install"
xo-build --install xo-alloc2
echo "::endgroup::"
- name: build xo-refcnt
run: |
echo "::group::xo-refcnt configure"
xo-build --configure --with-utests --with-examples xo-refcnt
echo "::endgroup::"
echo "::group::xo-refcnt build"
xo-build --build xo-refcnt
echo "::endgroup::"
echo "::group::xo-refcnt utest"
ctest --test-dir xo-refcnt/.build
echo "::endgroup::"
echo "::group::xo-refcnt install"
xo-build --install xo-refcnt
echo "::endgroup::"
- name: build xo-pyutil
run: |
echo "::group::xo-pyutil configure"
xo-build --configure --with-utests --with-examples xo-pyutil
echo "::endgroup::"
echo "::group::xo-pyutil build"
xo-build --build xo-pyutil
echo "::endgroup::"
echo "::group::xo-pyutil utest"
ctest --test-dir xo-pyutil/.build
echo "::endgroup::"
echo "::group::xo-pyutil install"
xo-build --install xo-pyutil
echo "::endgroup::"
- name: build xo-reflect
run: |
echo "::group::xo-reflect configure"
xo-build --configure --with-utests --with-examples xo-reflect
echo "::endgroup::"
echo "::group::xo-reflect build"
xo-build --build xo-reflect
echo "::endgroup::"
echo "::group::xo-reflect utest"
ctest --test-dir xo-reflect/.build
echo "::endgroup::"
echo "::group::xo-reflect install"
xo-build --install xo-reflect
echo "::endgroup::"
- name: build xo-pyreflect
run: |
echo "::group::xo-pyreflect configure"
xo-build --configure --with-utests --with-examples xo-pyreflect
echo "::endgroup::"
echo "::group::xo-pyreflect build"
xo-build --build xo-pyreflect
echo "::endgroup::"
echo "::group::xo-pyreflect utest"
ctest --test-dir xo-pyreflect/.build
echo "::endgroup::"
echo "::group::xo-pyreflect install"
xo-build --install xo-pyreflect
echo "::endgroup::"
- name: build xo-stringtable2
run: |
echo "::group::xo-stringtable2 configure"
xo-build --configure --with-utests --with-examples xo-stringtable2
echo "::endgroup::"
echo "::group::xo-stringtable2 build"
xo-build --build xo-stringtable2
echo "::endgroup::"
echo "::group::xo-stringtable2 utest"
ctest --test-dir xo-stringtable2/.build
echo "::endgroup::"
echo "::group::xo-stringtable2 install"
xo-build --install xo-stringtable2
echo "::endgroup::"
- name: build xo-object2
run: |
echo "::group::xo-object2 configure"
xo-build --configure --with-utests --with-examples xo-object2
echo "::endgroup::"
echo "::group::xo-object2 build"
xo-build --build xo-object2
echo "::endgroup::"
echo "::group::xo-object2 utest"
ctest --test-dir xo-object2/.build
echo "::endgroup::"
echo "::group::xo-object2 install"
xo-build --install xo-object2
echo "::endgroup::"
- name: build xo-gc
run: |
echo "::group::xo-gc configure"
xo-build --configure --with-utests --with-examples xo-gc
echo "::endgroup::"
echo "::group::xo-gc build"
xo-build --build xo-gc
echo "::endgroup::"
echo "::group::xo-gc utest"
xo-build --utest xo-gc
#ctest --test-dir xo-gc/.build
echo "::endgroup::"
echo "::group::xo-gc install"
xo-build --install xo-gc
echo "::endgroup::"
- name: build xo-type
run: |
echo "::group::xo-type configure"
xo-build --configure --with-utests --with-examples xo-type
echo "::endgroup::"
echo "::group::xo-type build"
xo-build --build xo-type
echo "::endgroup::"
echo "::group::xo-type utest"
ctest --test-dir xo-type/.build
echo "::endgroup::"
echo "::group::xo-type install"
xo-build --install xo-type
echo "::endgroup::"
- name: build xo-procedure2
run: |
echo "::group::xo-procedure2 configure"
xo-build --configure --with-utests --with-examples xo-procedure2
echo "::endgroup::"
echo "::group::xo-procedure2 build"
xo-build --build xo-procedure2
echo "::endgroup::"
echo "::group::xo-procedure2 utest"
ctest --test-dir xo-procedure2/.build
echo "::endgroup::"
echo "::group::xo-procedure2 install"
xo-build --install xo-procedure2
echo "::endgroup::"
- name: build xo-numeric
run: |
echo "::group::xo-numeric configure"
xo-build --configure --with-utests --with-examples xo-numeric
echo "::endgroup::"
echo "::group::xo-numeric build"
xo-build --build xo-numeric
echo "::endgroup::"
echo "::group::xo-numeric utest"
ctest --test-dir xo-numeric/.build
echo "::endgroup::"
echo "::group::xo-numeric install"
xo-build --install xo-numeric
echo "::endgroup::"
- name: build xo-tokenizer2
run: |
echo "::group::xo-tokenizer2 configure"
xo-build --configure --with-utests --with-examples xo-tokenizer2
echo "::endgroup::"
echo "::group::xo-tokenizer2 build"
xo-build --build xo-tokenizer2
echo "::endgroup::"
echo "::group::xo-tokenizer2 utest"
ctest --test-dir xo-tokenizer2/.build
echo "::endgroup::"
echo "::group::xo-tokenizer2 install"
xo-build --install xo-tokenizer2
echo "::endgroup::"
- name: build xo-expression2
run: |
echo "::group::xo-expression2 configure"
xo-build --configure --with-utests --with-examples xo-expression2
echo "::endgroup::"
echo "::group::xo-expression2 build"
xo-build --build xo-expression2
echo "::endgroup::"
echo "::group::xo-expression2 utest"
ctest --test-dir xo-expression2/.build
echo "::endgroup::"
echo "::group::xo-expression2 install"
xo-build --install xo-expression2
echo "::endgroup::"
- name: build xo-reader2
run: |
echo "::group::xo-reader2 configure"
xo-build --configure --with-utests --with-examples xo-reader2
echo "::endgroup::"
echo "::group::xo-reader2 build"
xo-build --build xo-reader2
echo "::endgroup::"
echo "::group::xo-reader2 utest"
ctest --test-dir xo-reader2/.build
echo "::endgroup::"
echo "::group::xo-reader2 install"
xo-build --install xo-reader2
echo "::endgroup::"
- name: build xo-interpreter2
run: |
echo "::group::xo-interpreter2 configure"
xo-build --configure --with-utests --with-examples xo-interpreter2
echo "::endgroup::"
echo "::group::xo-interpreter2 build"
xo-build --build xo-interpreter2
echo "::endgroup::"
echo "::group::xo-interpreter2 utest"
ctest --test-dir xo-interpreter2/.build
echo "::endgroup::"
echo "::group::xo-interpreter2 install"
xo-build --install xo-interpreter2
echo "::endgroup::"
- name: build xo-allocutil
run: |
echo "::group::xo-allocutil configure"
xo-build --configure --with-utests --with-examples xo-allocutil
echo "::endgroup::"
echo "::group::xo-allocutil build"
xo-build --build xo-allocutil
echo "::endgroup::"
echo "::group::xo-allocutil utest"
ctest --test-dir xo-allocutil/.build
echo "::endgroup::"
echo "::group::xo-allocutil install"
xo-build --install xo-allocutil
echo "::endgroup::"
- name: build xo-ratio
run: |
echo "::group::xo-ratio configure"
xo-build --configure --with-utests --with-examples xo-ratio
echo "::endgroup::"
echo "::group::xo-ratio build"
xo-build --build xo-ratio
echo "::endgroup::"
echo "::group::xo-ratio utest"
xo-build --utest xo-ratio
echo "::endgroup::"
echo "::group::xo-ratio install"
xo-build --install xo-ratio
echo "::endgroup::"
- name: build xo-unit
run: |
echo "::group::xo-unit configure"
xo-build --configure --with-utests --with-examples xo-unit
echo "::endgroup::"
echo "::group::xo-unit build"
xo-build --build xo-unit
echo "::endgroup::"
echo "::group::xo-unit utest"
ctest --test-dir xo-unit/.build
echo "::endgroup::"
echo "::group::xo-unit install"
xo-build --install xo-unit
echo "::endgroup::"
- name: build xo-pyunit
run: |
echo "::group::xo-pyunit configure"
xo-build --configure --with-utests --with-examples xo-pyunit
echo "::endgroup::"
echo "::group::xo-pyunit build"
xo-build --build xo-pyunit
echo "::endgroup::"
echo "::group::xo-pyunit utest"
ctest --test-dir xo-pyunit/.build
echo "::endgroup::"
echo "::group::xo-pyunit install"
xo-build --install xo-pyunit
echo "::endgroup::"
- name: build xo-callback
run: |
echo "::group::xo-callback configure"
xo-build --configure --with-utests --with-examples xo-callback
echo "::endgroup::"
echo "::group::xo-callback build"
xo-build --build xo-callback
echo "::endgroup::"
echo "::group::xo-callback utest"
ctest --test-dir xo-callback/.build
echo "::endgroup::"
echo "::group::xo-callback install"
xo-build --install xo-callback
echo "::endgroup::"
- name: build xo-alloc
run: |
echo "::group::xo-alloc configure"
xo-build --configure --with-utests --with-examples xo-alloc
echo "::endgroup::"
echo "::group::xo-alloc build"
xo-build --build xo-alloc
echo "::endgroup::"
echo "::group::xo-alloc utest"
ctest --test-dir xo-alloc/.build
echo "::endgroup::"
echo "::group::xo-alloc install"
xo-build --install xo-alloc
echo "::endgroup::"
- name: build xo-object
run: |
echo "::group::xo-object configure"
xo-build --configure --with-utests --with-examples xo-object
echo "::endgroup::"
echo "::group::xo-object build"
xo-build --build xo-object
echo "::endgroup::"
echo "::group::xo-object utest"
ctest --test-dir xo-object/.build
echo "::endgroup::"
echo "::group::xo-object install"
xo-build --install xo-object
echo "::endgroup::"
- name: build xo-ordinaltree
run: |
echo "::group::xo-ordinaltree configure"
xo-build --configure --with-utests --with-examples xo-ordinaltree
echo "::endgroup::"
echo "::group::xo-ordinaltree build"
xo-build --build xo-ordinaltree
echo "::endgroup::"
echo "::group::xo-ordinaltree utest"
ctest --test-dir xo-ordinaltree/.build
echo "::endgroup::"
echo "::group::xo-ordinaltree install"
xo-build --install xo-ordinaltree
echo "::endgroup::"
- name: build xo-expression
run: |
TARGET=xo-expression
echo "::group::${TARGET} configure"
xo-build --configure --with-utests --with-examples ${TARGET}
echo "::endgroup::"
echo "::group::${TARGET} build"
xo-build --build ${TARGET}
echo "::endgroup::"
echo "::group::${TARGET} utest"
xo-build --utest ${TARGET}
echo "::endgroup::"
echo "::group::${TARGET} install"
xo-build --install ${TARGET}
echo "::endgroup::"
- name: build xo-pyexpression
run: |
echo "::group::xo-pyexpression configure"
xo-build --configure --with-utests --with-examples xo-pyexpression
echo "::endgroup::"
echo "::group::xo-pyexpression build"
xo-build --build xo-pyexpression
echo "::endgroup::"
echo "::group::xo-pyexpression utest"
ctest --test-dir xo-pyexpression/.build
echo "::endgroup::"
echo "::group::xo-pyexpression install"
xo-build --install xo-pyexpression
echo "::endgroup::"
- name: build xo-tokenizer
run: |
echo "::group::xo-tokenizer configure"
xo-build --configure --with-utests --with-examples xo-tokenizer
echo "::endgroup::"
echo "::group::xo-tokenizer build"
xo-build --build xo-tokenizer
echo "::endgroup::"
echo "::group::xo-tokenizer utest"
ctest --test-dir xo-tokenizer/.build
echo "::endgroup::"
echo "::group::xo-tokenizer install"
xo-build --install xo-tokenizer
echo "::endgroup::"
- name: build xo-reader
run: |
echo "::group::xo-reader configure"
xo-build --configure --with-utests --with-examples xo-reader
echo "::endgroup::"
echo "::group::xo-reader build"
xo-build --build xo-reader
echo "::endgroup::"
echo "::group::xo-reader utest"
ctest --test-dir xo-reader/.build
echo "::endgroup::"
echo "::group::xo-reader install"
xo-build --install xo-reader
echo "::endgroup::"
- name: build xo-jit
run: |
echo "::group::xo-jit configure"
xo-build --configure --with-utests --with-examples xo-jit
echo "::endgroup::"
echo "::group::xo-jit build"
xo-build --build xo-jit
echo "::endgroup::"
echo "::group::xo-jit utest"
xo-build --utest ${TARGET}
echo "::endgroup::"
echo "::group::xo-jit install"
xo-build --install xo-jit
echo "::endgroup::"
- name: print install path
run: |
tree $PREFIX