Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
34ccad5
Test with linux clang-23, and gcc-16 in docker
ClausKlein Jul 17, 2026
48c3a5e
Set BEMAN_USE_STD_MODULE for linux clang relase job too
ClausKlein Jul 18, 2026
e727209
Sync CI workflow with exemplar
ClausKlein Jul 18, 2026
1746c96
Prepare test debug or release preset if needed
ClausKlein Jul 18, 2026
38aee31
Cleanup
ClausKlein Jul 18, 2026
0ac9b55
Use clang trunk version on CI workflow tests
ClausKlein Jul 20, 2026
105b8be
Disable BEMAN_BUILDSYS_SANITIZER in preset
ClausKlein Jul 21, 2026
67e3798
clang needs libc++ with BEMAN_USE_MODULES
ClausKlein Jul 21, 2026
b2950f4
Set BEMAN_BUILDSYS_SANITIZER again
ClausKlein Jul 21, 2026
7c71209
Temporarily disabling _FORTIFY_SOURCE for Clang++
ClausKlein Jul 22, 2026
bd5cecd
Disable ThreadSanitizer for a specific test target
ClausKlein Jul 22, 2026
45af091
Improve the generic Ninja makefile wrapper
ClausKlein Jul 24, 2026
42b98eb
Fix beman-tidy errors
ClausKlein Jul 24, 2026
9dc09ae
fixing a data race when accessing standard stream objects
dietmarkuehl Jul 27, 2026
8c188fa
Merge branch 'main' into feature/test-with-linux-clang-23
dietmarkuehl Jul 27, 2026
cfb5d0b
fixed a CI issue about a missing virtual destructor
dietmarkuehl Jul 27, 2026
dfabc2f
clang format
dietmarkuehl Jul 27, 2026
a8a46d7
Merge branch 'main' into feature/test-with-linux-clang-23
dietmarkuehl Jul 27, 2026
59b71ca
actually add a virtual destructor (rather than just a destructor)
dietmarkuehl Jul 27, 2026
c0d4970
updated the beman-submodule
dietmarkuehl Jul 28, 2026
30cab86
restoring Claus's work-around
dietmarkuehl Jul 28, 2026
eb2f34a
stored Claus's patch
dietmarkuehl Jul 28, 2026
bab4622
added the flags again
dietmarkuehl Jul 28, 2026
b74c68b
updated based on the updated infra repository
dietmarkuehl Jul 28, 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
56 changes: 39 additions & 17 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ on:
pull_request:
workflow_dispatch:
schedule:
- cron: '30 15 * * *'
- cron: '30 15 * * 6'

concurrency:
group: ${{format('{0}:{1}', github.repository, github.ref)}}
cancel-in-progress: true

jobs:
beman-submodule-check:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.7.3

preset-test:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.7.3
with:
matrix_config: >
[
Expand All @@ -29,33 +33,45 @@ jobs:
]

build-and-test:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.7.3
with:
matrix_config: >
{
"gcc": [
{ "versions": ["15"],
{ "versions": ["16"],
"tests": [
{ "cxxversions": ["c++26"],
"tests": [
{ "stdlibs": ["libstdc++"],
"tests": [
"Debug.Default", "Release.Default", "Release.MaxSan",
"Debug.Coverage", "Debug.Werror",
"Debug.Dynamic", "Release.Dynamic"
"Debug.Default", "Release.Default", "Release.TSan",
"Release.MaxSan", "Debug.Werror",
"Debug.Coverage", "Debug.-DBEMAN_USE_MODULES=On"
]
}
]
},
{ "cxxversions": ["c++23"],
"tests": [{ "stdlibs": ["libstdc++"], "tests": ["Release.Default"]}]
"tests": [
{ "stdlibs": ["libstdc++"],
"tests": [
"Release.Default", "Debug.-DBEMAN_USE_MODULES=On"
]
}
]
}
]
},
{ "versions": ["14"],
{ "versions": ["15"],
"tests": [
{ "cxxversions": ["c++26", "c++23"],
"tests": [{ "stdlibs": ["libstdc++"], "tests": ["Release.Default"]}]
"tests": [
{ "stdlibs": ["libstdc++"],
"tests": [
"Release.Default", "Debug.-DBEMAN_USE_MODULES=On"
]
}
]
}
]
}
Expand All @@ -67,15 +83,20 @@ jobs:
"tests": [
{ "stdlibs": ["libc++"],
"tests": [
"Debug.Default", "Release.Default", "Release.MaxSan",
"Debug.Dynamic", "Release.Dynamic"
"Debug.Default", "Release.Default", "Release.TSan",
"Release.MaxSan", "Debug.Werror",
"Debug.-DBEMAN_USE_MODULES=On"
]
}
]
},
{ "cxxversions": ["c++23"],
"tests": [
{"stdlibs": ["libc++"], "tests": ["Release.Default"]}
{ "stdlibs": ["libc++"],
"tests": [
"Release.Default", "Debug.-DBEMAN_USE_MODULES=On"
]
}
]
}
]
Expand All @@ -96,8 +117,9 @@ jobs:
{ "cxxversions": ["c++23"],
"tests": [
{ "stdlibs": ["stl"],
"tests": ["Debug.Default", "Release.Default", "Release.MaxSan",
"Debug.Dynamic", "Release.Dynamic"
"tests": [
"Debug.Default", "Release.Default", "Release.MaxSan",
"Debug.-DBEMAN_USE_MODULES=On"
]
}
]
Expand All @@ -110,4 +132,4 @@ jobs:
create-issue-when-fault:
needs: [preset-test, build-and-test]
if: failure() && github.event_name == 'schedule'
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.7.3
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
auto-update-pre-commit:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.7.3
secrets:
APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }}
PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ cmake-build-*
.cache
.vscode
.idea
.init
compile_commands.json
stagedir

Expand Down
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ set(BEMAN_EXECUTION_TARGET_PREFIX ${PROJECT_NAME}) # NOTE: used in src, and docs

#===============================================================================
if(BEMAN_USE_MODULES)
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)

set(CMAKE_CXX_SCAN_FOR_MODULES ON)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
Expand Down Expand Up @@ -61,14 +59,6 @@ if(BEMAN_USE_MODULES)
DLL_NAME_WITH_SOVERSION TRUE
)

# FIXME: Quickfix only to prevent linker problems on windows dll? CK
if(WIN32 AND BUILD_SHARED_LIBS)
set_target_properties(
${BEMAN_EXECUTION_TARGET_PREFIX}
PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON
)
endif()

find_package(Threads REQUIRED)
target_link_libraries(
${BEMAN_EXECUTION_TARGET_PREFIX}
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"_release-base"
],
"cacheVariables": {
"BEMAN_USE_STD_MODULE": false,
"BEMAN_USE_STD_MODULE": true,
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/llvm-libc++-toolchain.cmake"
},
"environment": {
Expand Down
63 changes: 63 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# GNUmakefile
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

MAKEFLAGS+= --no-builtin-rules # Disable the built-in implicit rules.
MAKEFLAGS+= --no-builtin-variables # Disable the built-in variable settings.
MAKEFLAGS+= --warn-undefined-variables # Warn when an undefined variable is referenced.
.SUFFIXES: # Disable all suffix rules.
##################################################

PRESET ?= release
IMAGE ?= linux-clang:23

_build_path:=build/$(PRESET)

.PHONY: all check distclean dockerbuild

# default target rule
all: .init compile_commands.json ## Make all with cmake workflow preset
cmake --workflow --preset $(PRESET)

.init: CMakeUserPresets.json CMakePresets.json CMakeLists.txt ## Configure cmake preset in VERBOSE mode
cmake --preset $(PRESET) --fresh --log-level=VERBOSE
touch $@

check: .init compile_commands.json ## Run clang-tidy on examples
run-clang-tidy examples

.PHONY: compile_commands.json
compile_commands.json: $(_build_path)/compile_commands.json
if [ "$(shell readlink compile_commands.json)" != "$(_build_path)/compile_commands.json" ] ; then \
ln -fs $< $@
fi

CMakeUserPresets.json:: cmake/CMakeUserPresets.json
ln -fs $< $@

distclean: ## Remove all build artifacts
rm -rf build .cache
rm -f CMakeUserPresets.json \
compile_commands.json \
.init
find . -name '*~' -delete

dockerbuild: ## Start docker image interactive
docker run -it -v $(CURDIR):/home/builder/workdir $(IMAGE)

# Helper targets
.PHONY: env info

env: ## Show env
$(foreach v, $(.VARIABLES), $(info $(v) = $($(v))))

info: ## Show this help.
@awk 'BEGIN {FS = ":.*?## "} /^[.a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort

# NOTE: double-colon targets which has no prerequisites must always remade by gmake?
# Prerequisite 'GNUmakefile' is newer than target '.init'.
# -> Must remake target '.init'.
# NOTE: impizit handled by gmake! GNUmakefile :: ;
Comment on lines +56 to +59

# Anything we don't know how to build will use this rule.
% ::
ninja -C $(_build_path) $(@)
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ifeq (${hostSystemName},Darwin)
# export LDFLAGS=-L$(LLVM_DIR)/lib/c++ -lc++abi -lc++ # -lc++experimental
# export GCOV="llvm-cov gcov"

### TODO: to test g++-15:
### TODO: to test g++-16:
# export GCC_PREFIX:=$(shell brew --prefix gcc)
# export GCC_DIR:=$(shell realpath ${GCC_PREFIX})

Expand All @@ -63,16 +63,16 @@ ifeq (${hostSystemName},Darwin)
export CXX=clang++
CXXLIB=libc++
else
export CXX=g++-15
export CXX=g++-16
CXXLIB=libstdc++
endif
export CXX_FLAGS=-stdlib=$(CXXLIB)
endif
export GCOV="gcov"
else ifeq (${hostSystemName},Linux)
export LLVM_DIR=/usr/lib/llvm-20
export LLVM_DIR=/usr/lib/llvm-23
export PATH:=${LLVM_DIR}/bin:${PATH}
# export CXX=clang++-20
# NO! export CXX=clang++-23
else
export CXX=$(COMPILER)
endif
Expand Down
Loading
Loading