Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7e1a230
meson.build: GAOL as a meson subproject, with project arguments and t…
Jordan08 Oct 6, 2026
37549a1
tests/meson_subproject: GAOL as a meson subproject, its tests and the…
Jordan08 Oct 6, 2026
9676425
doc, manual: GAOL as a meson subproject, gaol_dep, and the build type…
Jordan08 Oct 6, 2026
d68685e
doc/building.md, manual, meson.build: the python.exe alias of Windows…
Jordan08 Oct 6, 2026
5465a03
meson.build: the files Python reads VERSION.txt from closed, by with
Jordan08 Oct 6, 2026
3d4d310
tests: C++17 for the hexadecimal floating literals of the tests, not …
Jordan08 Oct 6, 2026
765722a
meson.build: no default test setup nor target check when GAOL is a su…
Jordan08 Oct 6, 2026
f4d1b36
meson.build: GAOL in release as a subproject, where meson before 1.8.…
Jordan08 Oct 6, 2026
fbe11fc
CMakeLists.txt: without a build type, GAOL and CORE-MATH compiled as …
Jordan08 Oct 6, 2026
b3bd421
tests/release_flags.py: GAOL in release brought into a CMake or meson…
Jordan08 Oct 6, 2026
8de25ba
version-file.sh: the copy leaves out the link that tests/meson_subpro…
Jordan08 Oct 6, 2026
5f35c8c
doc, manual, README: GAOL in release brought into a CMake or meson pr…
Jordan08 Oct 6, 2026
71b8cd4
tests: several of the programs, not most, have hexadecimal floating l…
Jordan08 Oct 6, 2026
162e1f8
doc/building.md, meson.build: meson 0.53.0 and earlier may take an al…
Jordan08 Oct 6, 2026
a8b1aec
manual: gaol.pc names no mathematical library, which the C++ compiler…
Jordan08 Oct 6, 2026
bc1e28b
workflows: set -o pipefail where a step pipes into tee, and no such p…
Jordan08 Oct 6, 2026
6cfbe44
meson: enable-debug builds GAOL and CORE-MATH for debugging whatever …
Jordan08 Oct 6, 2026
f4b08ff
CMakeLists.txt: Release first among the configurations of a generator…
Jordan08 Oct 6, 2026
d09cdc9
CMakeLists.txt: GAOL_DEBUG builds GAOL and CORE-MATH for debugging wh…
Jordan08 Oct 6, 2026
3906d9e
tests/release_flags.py --debug: GAOL_DEBUG, enable-debug and Ninja Mu…
Jordan08 Oct 6, 2026
ffefac9
doc, manual: GAOL_DEBUG, enable-debug, and Release first with several…
Jordan08 Oct 6, 2026
f5ffb20
CMakeLists.txt: GAOL_DEBUG keeps the other flags of each configuratio…
Jordan08 Oct 6, 2026
74a0e31
meson.build: enable-debug keeps the configure optimizations of the te…
Jordan08 Oct 6, 2026
9cdb21c
linux.yml: GAOL_DEBUG checked to reach the libraries alone and keep t…
Jordan08 Oct 6, 2026
0f339e5
doc/building.md: GAOL_DEBUG and enable-debug keep the other flags, no…
Jordan08 Oct 6, 2026
e101d11
Merge origin/configure-clean into todo-o-meson
Jordan08 Oct 6, 2026
3b48f30
gaol_common.h: the macro GAOL_DEBUG(lvl, cmd) renamed GAOL_DEBUG_VERB…
Jordan08 Oct 6, 2026
5c56314
tests/meson_subproject: check_flags.py checks the link option of gaol…
Jordan08 Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/scripts/version-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ work=$(mktemp -d "${TMPDIR:-/tmp}/gaol-version.XXXXXX")
trap 'rm -rf "$work"' EXIT INT TERM
mkdir "$work/src"
# -h: README is a symbolic link to README.md, which tar of MSYS2 cannot create when it
# extracts it ("Cannot create symlink"): the copy holds the file itself
tar -c -h -f - --exclude=.git --exclude=autom4te.cache . | tar -x -f - -C "$work/src"
# extracts it ("Cannot create symlink"): the copy holds the file itself. Not
# the link that tests/meson_subproject takes as its subproject, which leads
# back to the root of the sources, and which -h would follow without end
tar -c -h -f - --exclude=.git --exclude=autom4te.cache --exclude=./tests/meson_subproject/subprojects . | tar -x -f - -C "$work/src"
cd "$work"

# The version is not the one of GAOL: it is the file the build reads, not a
Expand Down
78 changes: 73 additions & 5 deletions .github/workflows/build-systems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# locale writing a decimal comma, which the Linux jobs and the containers
# generate first, macOS and Windows having one (.github/scripts/comma-locale.sh,
# GAOL v5). The autotools jobs check that make distclean gives the sources back
# as git has them.
# as git has them. One job builds GAOL as a subproject of a meson project
# (tests/meson_subproject, GAOL v5).
#
# Copyright (c) 2026 ENSTA, France
#
Expand Down Expand Up @@ -87,6 +88,7 @@ jobs:
sh .github/scripts/version-file.sh autoconf
- name: Configure, build and install
run: |
set -o pipefail
# The same date on every file, as in a release archive: make then
# does not regenerate configure, the Makefile.in or the lexer
find . -path ./.git -prune -o -exec touch -h -d '2020-01-01 00:00:00' {} +
Expand Down Expand Up @@ -131,7 +133,9 @@ jobs:
run: |
sh .github/scripts/tests.sh "$RUNNER_TEMP/gaol" static
- name: Performance
run: ./performance | tee -a "$GITHUB_STEP_SUMMARY"
run: |
set -o pipefail
./performance | tee -a "$GITHUB_STEP_SUMMARY"

meson:
name: ${{ matrix.cfg.desc }}
Expand Down Expand Up @@ -189,6 +193,7 @@ jobs:
PATH="$nopython" meson setup "$RUNNER_TEMP/build-no-python"
- name: Configure, build and install
run: |
set -o pipefail
meson --version
meson setup build-meson --prefix="$RUNNER_TEMP/gaol" --libdir=lib -Dwith-tests=true ${{ matrix.cfg.options }} | tee configure.log
meson compile -C build-meson
Expand All @@ -207,7 +212,67 @@ jobs:
- name: Tests built with the installed GAOL
run: sh .github/scripts/tests.sh "$RUNNER_TEMP/gaol" shared
- name: Performance
run: ./performance | tee -a "$GITHUB_STEP_SUMMARY"
run: |
set -o pipefail
./performance | tee -a "$GITHUB_STEP_SUMMARY"

# GAOL as a subproject of a meson project, tests/meson_subproject, which
# builds tests of tests/ with gaol_dep and checks that their code gets the
# flags of interval arithmetic, and that GAOL is built in release in the
# default build type of meson: meson refused the add_global_arguments() of
# meson.build in a subproject, and before 1.8.4 gives a subproject the build
# type of the project, which the meson of Ubuntu 24.04 (1.3.2) checks (GAOL
# v5)
meson-subproject:
name: ${{ matrix.cfg.desc }}
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
cfg:
- { meson: pipx, desc: 'Meson, Ubuntu 24.04 x86_64, GAOL as a subproject' }
- { meson: apt, desc: 'Meson of Ubuntu 24.04, x86_64, GAOL as a subproject' }
steps:
- uses: actions/checkout@v7
- name: Tools
run: |
sudo apt-get update -q
if [ "${{ matrix.cfg.meson }}" = pipx ]; then
sudo apt-get install -y -q g++ pipx
pipx install meson
pipx install ninja
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
else
sudo apt-get install -y -q g++ meson ninja-build
fi
- name: Configure tests/meson_subproject, a project bringing GAOL in as a subproject, from this checkout
run: |
set -o pipefail
meson --version
# The meson of Ubuntu has to be older than 1.8.4, which builds a
# subproject in its own default build type itself
if [ "${{ matrix.cfg.meson }}" = apt ]; then
python3 -c 'import sys; sys.exit(tuple(map(int, sys.argv[1].split(".")[:3])) >= (1, 8, 4))' "$(meson --version)"
fi
mkdir tests/meson_subproject/subprojects
ln -s "$PWD" tests/meson_subproject/subprojects/gaol
meson setup build-meson-subproject tests/meson_subproject | tee configure.log
grep -q "Elementary functions: CORE-MATH" configure.log
- name: Build
run: meson compile -C build-meson-subproject
- name: Locale writing a decimal comma
run: sh .github/scripts/comma-locale.sh generate
- name: Tests (ninja test, make test of meson), the flags of their code among them
run: ninja -C build-meson-subproject test
- name: The test numbers ran under a locale writing a decimal comma
run: sh .github/scripts/comma-locale.sh check build-meson-subproject/meson-logs/testlog.txt
- name: enable-debug builds GAOL for debugging, as a subproject and alone
run: |
meson setup build-meson-subproject-debug tests/meson_subproject -Dgaol:enable-debug=true
python3 tests/release_flags.py --debug build-meson-subproject-debug "$PWD/tests/meson_subproject/subprojects/gaol"
meson setup build-meson-debug -Denable-debug=true
python3 tests/release_flags.py --debug build-meson-debug "$PWD"

# meson with Visual C++: the static libgaol, as CMake builds it, its tests,
# and the installed GAOL, with which a test is compiled again (GAOL v5). In
Expand Down Expand Up @@ -308,7 +373,8 @@ jobs:
sh .github/scripts/comma-locale.sh check build-meson/meson-logs/testlog.txt
sh .github/scripts/tests.sh /tmp/gaol shared
fi
./performance | tee /gaol/performance.md"
./performance > /gaol/performance.md
cat /gaol/performance.md"
cat performance.md >> "$GITHUB_STEP_SUMMARY"

msys2:
Expand Down Expand Up @@ -355,7 +421,9 @@ jobs:
- name: Tests built with the installed GAOL
run: sh .github/scripts/tests.sh "$(cygpath -m "$RUNNER_TEMP")/gaol" static
- name: Performance
run: ./performance | tee -a "$GITHUB_STEP_SUMMARY"
run: |
set -o pipefail
./performance | tee -a "$GITHUB_STEP_SUMMARY"

# The three builds give GAOL the same configuration (.github/audit)
agree:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ jobs:
cmake --build /tmp/build --target test
$comma_check
cd /tmp/build
./tests/gaol_performance | tee /gaol/performance.md"
./tests/gaol_performance > /gaol/performance.md
cat /gaol/performance.md"
cat performance.md >> "$GITHUB_STEP_SUMMARY"

clang-arm32:
Expand Down
77 changes: 74 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# (BUILD_SHARED_LIBS). Also with the sanitizers, with -Wall -Wextra -Werror,
# checking the headers it installs too (GAOL v5), with the minimum version of
# CMake GAOL declares, and as a part of another project, brought in by
# FetchContent (tests/fetch_content). The test cpack_stale_configure also runs
# with ccache in CC and Ninja outside PATH.
# FetchContent (tests/fetch_content), which builds GAOL as in Release where it
# gives no build type (tests/release_flags.py, GAOL v5). The test
# cpack_stale_configure also runs with ccache in CC and Ninja outside PATH.
#
# The runners have no locale writing a decimal comma, which tests/numbers.cpp
# reads and writes numbers under where there is one, and where there is none it
Expand Down Expand Up @@ -96,7 +97,9 @@ jobs:
- name: The test numbers ran under a locale writing a decimal comma
run: sh .github/scripts/comma-locale.sh check build
- name: Performance
run: build/tests/gaol_performance | tee -a "$GITHUB_STEP_SUMMARY"
run: |
set -o pipefail
build/tests/gaol_performance | tee -a "$GITHUB_STEP_SUMMARY"
- name: Install
run: cmake --install build
- name: Tests built with the installed GAOL
Expand Down Expand Up @@ -300,8 +303,15 @@ jobs:
run: sh .github/scripts/comma-locale.sh generate
- name: Configure tests/fetch_content, a project building GAOL for itself with FetchContent, from this checkout
run: |
set -o pipefail
cmake -S tests/fetch_content -B build-fetch-content -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_GAOL="$PWD" -DCMAKE_INSTALL_PREFIX="$PWD/gaol-install" | tee configure.log
grep -q "Elementary functions: CORE-MATH" configure.log
- name: Without a build type, GAOL and CORE-MATH compiled as in Release all the same
run: |
# configure only: tests/release_flags.py reads compile_commands.json
# (GAOL v5: CORE-MATH was compiled without optimization)
cmake -S tests/fetch_content -B build-fetch-content-default -DFETCHCONTENT_SOURCE_DIR_GAOL="$PWD" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
python3 tests/release_flags.py build-fetch-content-default "$PWD"
- name: Build
run: cmake --build build-fetch-content -j 4
- name: Tests (make test)
Expand All @@ -324,6 +334,66 @@ jobs:
cmake --build build-find-package -j 4
cmake --build build-find-package --target test

# The build types, configured only: GAOL_DEBUG builds the libraries of GAOL
# and CORE-MATH for debugging whatever the build type, a project bringing
# GAOL in included, and a generator of several configurations builds Release
# by default (tests/release_flags.py, GAOL v5)
build-types:
name: Ubuntu 24.04 x86_64 GCC, GAOL_DEBUG and Ninja Multi-Config
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- name: Tools
run: |
sudo apt-get update -q
sudo apt-get install -y -q ninja-build
- name: GAOL_DEBUG, GAOL built alone in Release
run: |
cmake -S . -B build-debug -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON -DGAOL_DEBUG=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
python3 tests/release_flags.py --debug build-debug "$PWD"
- name: GAOL_DEBUG, GAOL brought in by FetchContent without a build type, and in Release
run: |
cmake -S tests/fetch_content -B build-fetch-content-debug -DFETCHCONTENT_SOURCE_DIR_GAOL="$PWD" -DGAOL_DEBUG=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
python3 tests/release_flags.py --debug build-fetch-content-debug "$PWD"
cmake -S tests/fetch_content -B build-fetch-content-release-debug -DFETCHCONTENT_SOURCE_DIR_GAOL="$PWD" -DGAOL_DEBUG=ON \
-DCMAKE_BUILD_TYPE=Release "-DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG -DPROJECT_RELEASE" "-DCMAKE_CXX_FLAGS_DEBUG=-g -DPROJECT_DEBUG" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
python3 tests/release_flags.py --debug build-fetch-content-release-debug "$PWD"
- name: GAOL_DEBUG reaches the libraries of GAOL alone, and keeps the other flags of the configuration
run: |
# GAOL takes the flags of the configuration less the optimization and
# NDEBUG, never those of Debug, which may hold what the code of the
# project does not get (a sanitizer, a C runtime); the tests of GAOL
# and of the project keep theirs
python3 - "$PWD" <<'EOF'
import json, os, sys
src = os.path.normpath(sys.argv[1])
def commands(build):
for e in json.load(open(os.path.join(build, 'compile_commands.json'))):
if e['file'].endswith('.cpp'):
yield os.path.normpath(os.path.join(e['directory'], e['file'])), e['command'].split()
gaol, tests = os.path.join(src, 'gaol') + os.sep, os.path.join(src, 'tests') + os.sep
seen = 0
for path, flags in commands('build-debug'):
if path.startswith(tests):
assert '-O3' in flags and '-DNDEBUG' in flags, (path, flags); seen += 1
for path, flags in commands('build-fetch-content-release-debug'):
if path.startswith(gaol):
assert '-DPROJECT_RELEASE' in flags and '-DPROJECT_DEBUG' not in flags, (path, flags); seen += 1
elif path.startswith(tests):
assert '-O3' in flags and '-DNDEBUG' in flags and '-DPROJECT_RELEASE' in flags, (path, flags); seen += 1
assert seen, 'no command checked'
print(seen, 'commands checked')
EOF
- name: Ninja Multi-Config builds Release by default
run: |
cmake -G "Ninja Multi-Config" -S . -B build-multi
grep '^CMAKE_CONFIGURATION_TYPES:' build-multi/CMakeCache.txt
ninja -C build-multi -n > plan.txt
grep -q 'CMakeFiles/gaol.dir/Release/' plan.txt
if grep -q 'CMakeFiles/gaol.dir/Debug/' plan.txt; then echo "Debug built by default"; exit 1; fi

# The 128-bit integer computed with two 64-bit halves, which is the code
# Visual C++ and the 32-bit targets of GCC take: built and tested on an
# ordinary machine, where the native type is there to compare with
Expand All @@ -345,6 +415,7 @@ jobs:
run: sh .github/scripts/comma-locale.sh generate
- name: Configure
run: |
set -o pipefail
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON \
-DGAOL_U128_EMULATION=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} | tee configure.log
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ jobs:
- name: The test numbers ran under a locale writing a decimal comma
run: sh .github/scripts/comma-locale.sh check build
- name: Performance
run: build/tests/gaol_performance | tee -a "$GITHUB_STEP_SUMMARY"
run: |
set -o pipefail
build/tests/gaol_performance | tee -a "$GITHUB_STEP_SUMMARY"
- name: Install
run: cmake --install build
- name: Tests built with the installed GAOL
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ coverage/coverage.json
3rd/math-core/**/.deps/
3rd/math-core/**/.dirstamp

# The link to the sources of GAOL that tests/meson_subproject takes as its
# subproject (see its meson.build)
tests/meson_subproject/subprojects/

# Written by the performance target of check/Makefile.am
check/performances_result.txt

Expand Down
Loading
Loading