-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate build system to Conan and CMake #136
Conversation
!possibly breaking, tests are required
Hi there, Feel free to stay in touch with us! Best regards |
How to compile gStoreRequirements1. The build system apt update
apt -y install build-essential cmake ninja-build mold python3-pip pkg-config
pip3 install conan
conan profile detect The current toolchain requires gcc>=8 (for c++17), cmake >= 3.16 (for conan 2 integration and find_OpenMP), and conan >= 2.0. Only tested on Ubuntu 22.04 with gcc 11, cmake 3.22 and conan 2.0.16. 2. System packages apt -y install libreadline-dev libjemalloc-dev uuid-dev libssl-dev Compileconan install . --output-folder=build --build=missing -s build_type=Debug # or Release, RelWithDebInfo
cd build
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug # or Release, RelWithDebInfo
## Or if you want mold for faster and easy-to-debug linking
# cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_CXX_FLAGS="-fuse-ld=mold" -DCMAKE_BUILD_TYPE=Debug # or Release, RelWithDebInfo
ninja -v install Well done! You will find binaries in |
The cmake toolchain docker image has been pushed to dockerhub. It is even 60% smaller (only 87MB, 8% of the original docker image). Also the dockerfile verifies the build process from scratch gonna work. How to use the new docker build:This docker image has been published to dockerhub. To pull the image: docker pull hrz6976/gstore:cmake-beta To launch the playground mode: docker run -it --rm hrz6976/gstore:cmake-beta sh -c "(/usr/local/bin/ghttp &); bash" Wait for the databases to initialize, press Enter, and you are good to go: > gquery -db small -q data/small/small_q0.sql Run ghttp as a daemon and presist the data: export GSTORE_PORT=9000 # or any port you want
export GSTORE_PATH=$(realpath ./gstore) # or any local directory with write permission
docker run -d -p ${GSTORE_PORT}:9000 -v ${GSTORE_PATH}:/app hrz6976/gstore:cmake-beta To build the docker image: ninja -C build tarball
docker build -t gstore . |
…ingindex::randomaccess to kvstore::getstringbyid.
* ci(docker): fix docker build for 1.2 * docs(docker): update docker docs * Delete Dockerfile.bak Remove unnecessary file --------- Co-authored-by: lsvih <[email protected]>
Update fork to resolve merge conflicts
Some of the tests have hard-coded paths to HUGE datasets (10GB compressed), so no luck for them :(
Just resolved the merge conflicts and opened #138. Closing. |
Note
THIS PR IS PROTENTIALLY BREAKING!!!!!
With a lot of file restructuring, includes renaming and reordering, the codebase is prone to break after merging this PR. I'm not able to run the entire test suite with big chunks of fixtures are missing with hard-encoded path in the code (e.g.
/home/data/WatDiv/query/c3.sql
.Please double check the changes and make sure all tests pass before merging this PR.
Changes in this PR
ninja-build
(and optionallymold
) for faster compiling and linking.TODOs
DISCLAIMER
This PR is a part of the course project in PKU's graph data management course.