Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c4bca58
turn off cpptrace module
16bit-ykiko Dec 11, 2025
6fa4e1c
introduce pixi
16bit-ykiko Dec 11, 2025
999cf86
fix macos build
16bit-ykiko Dec 11, 2025
640e22e
fix macos build
16bit-ykiko Dec 11, 2025
8c6670c
fix macos build
16bit-ykiko Dec 11, 2025
e3e6d10
add license and description
16bit-ykiko Dec 11, 2025
bf41185
fix macos build
16bit-ykiko Dec 11, 2025
9517cb5
fix macos build
16bit-ykiko Dec 11, 2025
f67a3df
fix macos build
16bit-ykiko Dec 11, 2025
77f9df6
fix macos build
16bit-ykiko Dec 11, 2025
8630d5c
update
16bit-ykiko Dec 11, 2025
940de46
fix llvm version
16bit-ykiko Dec 11, 2025
0a6a33f
fix llvm version
16bit-ykiko Dec 11, 2025
5f15f03
fix macos build
16bit-ykiko Dec 11, 2025
ad76244
fix macos build
16bit-ykiko Dec 11, 2025
55451e2
fix build error
16bit-ykiko Dec 12, 2025
24e37cd
test mac ci
16bit-ykiko Dec 12, 2025
bf7bef9
test again
16bit-ykiko Dec 12, 2025
b547876
test again
16bit-ykiko Dec 12, 2025
3e8b17a
fix build
16bit-ykiko Dec 12, 2025
7962934
update glibc version
16bit-ykiko Dec 12, 2025
66e4b2d
remove docker
16bit-ykiko Dec 12, 2025
8dfa28b
try build llvm
16bit-ykiko Dec 12, 2025
2b861ab
fix build
16bit-ykiko Dec 12, 2025
4287275
fix build
16bit-ykiko Dec 12, 2025
9432ef9
fix build
16bit-ykiko Dec 12, 2025
84fc7b6
fix build
16bit-ykiko Dec 12, 2025
5cae77b
fix build
16bit-ykiko Dec 12, 2025
d18aa08
fix build
16bit-ykiko Dec 12, 2025
3cad788
fix build
16bit-ykiko Dec 12, 2025
4b3a00a
add build log
16bit-ykiko Dec 13, 2025
bf45915
try to use ccache
16bit-ykiko Dec 13, 2025
a4c8df5
fix cache build
16bit-ykiko Dec 13, 2025
7ce3dfc
test ccache
16bit-ykiko Dec 13, 2025
755ecf4
use thin lto
16bit-ykiko Dec 13, 2025
beca8de
update build
16bit-ykiko Dec 13, 2025
309b7da
fix linux toolchain
16bit-ykiko Dec 13, 2025
6f6d3e2
update build
16bit-ykiko Dec 13, 2025
1d94606
test upload script
16bit-ykiko Dec 14, 2025
5f00617
test upload
16bit-ykiko Dec 14, 2025
9e8dd0b
turn off unnecessary ci
16bit-ykiko Dec 14, 2025
ab84804
some fix
16bit-ykiko Dec 14, 2025
c4eab33
fix build
16bit-ykiko Dec 14, 2025
b612b9d
fix build
16bit-ykiko Dec 14, 2025
89f25e2
fix ccache
16bit-ykiko Dec 14, 2025
b1e9328
fix asan build
16bit-ykiko Dec 14, 2025
bfc56ea
fix build
16bit-ykiko Dec 14, 2025
5655a93
last build!
16bit-ykiko Dec 14, 2025
17dd948
fix script
16bit-ykiko Dec 14, 2025
1076e2d
try upload llvm binary
16bit-ykiko Dec 15, 2025
725d16e
try upload
16bit-ykiko Dec 15, 2025
8bbe080
tiger upload
16bit-ykiko Dec 15, 2025
d28f245
fix token
16bit-ykiko Dec 15, 2025
524f4e5
fix pixi
16bit-ykiko Dec 15, 2025
b2d52fe
fix token
16bit-ykiko Dec 15, 2025
f31bd0f
fix token name
16bit-ykiko Dec 15, 2025
812d53d
some update
16bit-ykiko Dec 15, 2025
4a6ae65
some update
16bit-ykiko Dec 15, 2025
488c958
test cmake build
16bit-ykiko Dec 15, 2025
1654b8b
fix build script
16bit-ykiko Dec 15, 2025
08194a4
test xmake
16bit-ykiko Dec 15, 2025
fc3f21c
turn xmake ci temporarily
16bit-ykiko Dec 15, 2025
c9317a6
fix typo
16bit-ykiko Dec 15, 2025
9046de8
use lld-link
16bit-ykiko Dec 15, 2025
dbd8d2a
fix build
16bit-ykiko Dec 15, 2025
0c1b1ba
fix option
16bit-ykiko Dec 15, 2025
c994b61
fix option
16bit-ykiko Dec 15, 2025
46ca6c9
fix cmake
16bit-ykiko Dec 15, 2025
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
61 changes: 9 additions & 52 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,86 +27,43 @@ jobs:
include:
- os: windows-2025
build_type: RelWithDebInfo
cc: clang
cxx: clang++
- os: ubuntu-24.04
build_type: Debug
cc: clang-20
cxx: clang++-20
- os: macos-15
build_type: Debug
cc: clang
cxx: clang++

runs-on: ${{ matrix.os }}

steps:
- name: Setup dependencies (Windows)
if: runner.os == 'Windows'
uses: MinoruSekine/setup-scoop@v4.0.1
with:
buckets: main
apps: ninja

- name: Setup dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y gcc-14 g++-14 libstdc++-14-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
sudo update-alternatives --set gcc /usr/bin/gcc-14
sudo update-alternatives --set g++ /usr/bin/g++-14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20 all
sudo apt install -y cmake ninja-build

- name: Setup dependencies (MacOS)
if: runner.os == 'macOS'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
run: |
brew install llvm@20 lld@20

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup msvc sysroot for cmake
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: v0.59.0
environments: develop
activate-environment: true
cache: true
locked: true
Comment thread
16bit-ykiko marked this conversation as resolved.

- name: Build clice
shell: bash
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
export SDKROOT=$(xcrun --show-sdk-path)
export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@20/bin:$PATH"
fi

cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCLICE_DEV_ENV=ON \
-DCLICE_ENABLE_TEST=ON \
-DCLICE_CI_ENVIRONMENT=ON

cmake --build build
Comment thread
16bit-ykiko marked this conversation as resolved.

- name: Install uv for integration tests
uses: astral-sh/setup-uv@v6

- name: Run tests
shell: bash
run: |
EXE_EXT=""
if [[ "${{ runner.os }}" == "Windows" ]]; then
EXE_EXT=".exe"
fi

if [[ "${{ runner.os }}" == "macOS" ]]; then
export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@20/bin:$PATH"
fi

./build/bin/unit_tests${EXE_EXT} --test-dir="./tests/data"
uv run --project tests pytest -s --log-cli-level=INFO tests/integration --executable=./build/bin/clice${EXE_EXT}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@ tests/unit/Local/
.vs/
.idea/
.claude

# pixi environments
.env
.pixi/*
!.pixi/config.toml
21 changes: 20 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
cmake_minimum_required(VERSION 3.20)
cmake_minimum_required(VERSION 3.30)
Comment thread
16bit-ykiko marked this conversation as resolved.

if(CLICE_DEV_ENV)
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")

# it's important to set clang to use lld here, otherwise the compiler detection
# may fail on some conda prebuilt clang.
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Forced LLD" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Forced LLD" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Forced LLD" FORCE)
endif()
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

project(CLICE_PROJECT LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

include(GNUInstallDirs)
Expand All @@ -23,6 +36,11 @@ if(NOT WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -fsanitize=address")
endif()
Comment thread
16bit-ykiko marked this conversation as resolved.

if(APPLE)
# https://conda-forge.org/docs/maintainer/knowledge_base/#newer-c-features-with-old-sdk
string(APPEND CMAKE_CXX_FLAGS " -D_LIBCPP_DISABLE_AVAILABILITY=1")
endif()

include("${PROJECT_SOURCE_DIR}/cmake/package.cmake")

add_library(clice_options INTERFACE)
Expand All @@ -49,6 +67,7 @@ elseif(APPLE)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_options(clice_options INTERFACE
-fuse-ld=lld
-static-libstdc++ -static-libgcc
-Wl,--gc-sections
)
endif()
Comment thread
16bit-ykiko marked this conversation as resolved.
Expand Down
12 changes: 11 additions & 1 deletion cmake/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ endif()

# install dependencies
include(FetchContent)
set(FETCHCONTENT_UPDATES_DISCONNECTED ON)

Comment thread
16bit-ykiko marked this conversation as resolved.
if(WIN32)
set(NULL_DEVICE NUL)
Expand All @@ -88,6 +89,8 @@ FetchContent_Declare(
libuv
GIT_REPOSITORY https://github.com/libuv/libuv.git
GIT_TAG v1.x
GIT_SHALLOW TRUE

)

if(NOT WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand All @@ -101,20 +104,24 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v1.15.3
GIT_TAG v1.15.3
GIT_SHALLOW TRUE
)

# tomlplusplus
FetchContent_Declare(
tomlplusplus
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
GIT_TAG v3.4.0
GIT_SHALLOW TRUE
)

# croaring
FetchContent_Declare(
croaring
GIT_REPOSITORY https://github.com/RoaringBitmap/CRoaring.git
GIT_TAG v4.4.2
GIT_SHALLOW TRUE
)
set(ENABLE_ROARING_TESTS OFF CACHE INTERNAL "" FORCE)
set(ENABLE_ROARING_MICROBENCHMARKS OFF CACHE INTERNAL "" FORCE)
Expand All @@ -124,6 +131,7 @@ FetchContent_Declare(
flatbuffers
GIT_REPOSITORY https://github.com/google/flatbuffers.git
GIT_TAG v25.9.23
GIT_SHALLOW TRUE
)
set(FLATBUFFERS_BUILD_GRPC OFF CACHE BOOL "" FORCE)
set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" FORCE)
Expand All @@ -134,7 +142,9 @@ FetchContent_Declare(
cpptrace
GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git
GIT_TAG v1.0.4
GIT_SHALLOW TRUE
)
set(CPPTRACE_DISABLE_CXX_20_MODULES ON CACHE BOOL "" FORCE)

FetchContent_MakeAvailable(libuv spdlog tomlplusplus croaring flatbuffers cpptrace)

Expand Down
9 changes: 0 additions & 9 deletions docker/.dockerignore

This file was deleted.

39 changes: 0 additions & 39 deletions docker/Dockerfile

This file was deleted.

Loading
Loading