Skip to content
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

chore: fix build script and dockerfile #98

Merged
merged 1 commit into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
98 changes: 0 additions & 98 deletions .circleci/config.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR Title
name: PR Check

on:
pull_request:
Expand All @@ -9,8 +9,8 @@ jobs:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- name: Conventional Commit Validation
- name: Conventional Commits Validation
uses: ytanikin/[email protected]
with:
task_types: '["feat","fix","perf","chore","revert"]'
add_label: 'false'
add_label: 'false'
16 changes: 16 additions & 0 deletions .github/workflows/signed-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: PR Check

on:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
check-signed-commits:
name: Signed Commits
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Signed Commits Validation
uses: 1Password/check-signed-commits-action@v1
3 changes: 2 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"COUNTERS_LEVEL": "none",
"ENABLE_PROFILING": "ON"
"ENABLE_PROFILING": "OFF",
"BUILD_SHARED_LIBS": "OFF"
}
},
{
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![CI][9]][10]
[![CircleCI][1]][2]
[![codecov][3]][4]
[![Join Slack][11]][12]

# LeanStore

Expand All @@ -14,8 +14,9 @@ to keep all data in memory.

## Getting started

It's recommanded to develop the project inside a docker container, which can be
built from this [Dockerfile][5]:
[vcpkg][13] is used to manage third-party libraries, please install it before
building the project. It's highly recommanded to develop the project inside a
docker container, which can be built from this [Dockerfile][5]:

```sh
cmake --preset debug
Expand All @@ -28,6 +29,8 @@ ctest --test-dir build/debug
Contributions are welcomed and greatly appreciated! See [CONTRIBUTING.md][6] for
setting up development environment and contributing.

You can also join the [slack workspace][12] to discuss any questions or ideas.

## License

LeanStore is under the [MIT License][7].
Expand All @@ -36,8 +39,6 @@ LeanStore is under the [MIT License][7].

Thanks for the LeanStore authors and the [leanstore/leanstore][8] project.

[1]: https://dl.circleci.com/status-badge/img/circleci/MkFUq3aTNH5S7gLVEtwrGF/XCiiFNumkGdcD65tKp4EEy/tree/main.svg?style=shield&circle-token=28e7f69f9698ab8b805730e038065a9f54c29668
[2]: https://dl.circleci.com/status-badge/redirect/circleci/MkFUq3aTNH5S7gLVEtwrGF/XCiiFNumkGdcD65tKp4EEy/tree/main
[3]: https://codecov.io/github/zz-jason/leanstore/graph/badge.svg?token=MBS1H361JJ
[4]: https://codecov.io/github/zz-jason/leanstore
[5]: ./docker/Dockerfile
Expand All @@ -46,3 +47,6 @@ Thanks for the LeanStore authors and the [leanstore/leanstore][8] project.
[8]: http://github.com/leanstore/leanstore
[9]: https://github.com/zz-jason/leanstore/actions/workflows/ci.yml/badge.svg
[10]: https://github.com/zz-jason/leanstore/actions/workflows/ci.yml
[11]: https://img.shields.io/badge/Join-Slack-blue.svg?logo=slack
[12]: https://join.slack.com/t/leanstoreworkspace/shared_invite/zt-2o69igywh-yTheoWxjYnD5j3bAFN34Qg
[13]: https://github.com/microsoft/vcpkg
24 changes: 3 additions & 21 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.04
FROM ubuntu:24.04

################################################################################
# install prerequisted libriaries
Expand All @@ -11,27 +11,13 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y \
git cmake make gcc-13 g++-13 ninja-build \
git cmake make gcc g++ ninja-build \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y \
libaio-dev python3-pip cppcheck \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install gcovr==6.0 --break-system-packages

RUN ln -sf /usr/bin/cpp-13 /usr/bin/cpp \
&& ln -sf /usr/bin/g++-13 /usr/bin/g++ \
&& ln -sf /usr/bin/gcc-13 /usr/bin/gcc \
&& ln -sf /usr/bin/gcc-ar-13 /usr/bin/gcc-ar \
&& ln -sf /usr/bin/gcc-nm-13 /usr/bin/gcc-nm \
&& ln -sf /usr/bin/gcc-ranlib-13 /usr/bin/gcc-ranlib \
&& ln -sf /usr/bin/gcov-13 /usr/bin/gcov \
&& ln -sf /usr/bin/gcov-dump-13 /usr/bin/gcov-dump \
&& ln -sf /usr/bin/gcov-tool-13 /usr/bin/gcov-tool \
&& ln -sf /usr/bin/lto-dump-13 /usr/bin/lto-dump \
&& ln -sf /usr/bin/g++-13 /usr/bin/c++ \
&& ln -sf /usr/bin/gcc-13 /usr/bin/cc

# install vcpkg and its prerequisites
RUN apt-get update && apt-get install -y \
Expand All @@ -43,17 +29,13 @@ RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg \
&& echo 'export PATH=$VCPKG_ROOT:$PATH' >> ~/.bashrc \
&& echo 'export VCPKG_FORCE_SYSTEM_BINARIES=1' >> ~/.bashrc

# config vcpkg triplets
RUN mv /opt/vcpkg/triplets/x64-linux.cmake /opt/vcpkg/triplets/x64-linux-static.cmake
COPY vcpkg-triplets/x64-linux.cmake /opt/vcpkg/triplets/x64-linux.cmake
COPY vcpkg-triplets/arm64-linux.cmake /opt/vcpkg/triplets/arm64-linux.cmake

# for gperftools, pprof, pidstat
RUN apt-get update && apt-get install -y \
autoconf libtool golang graphviz sysstat \
&& rm -rf /var/lib/apt/lists/* \
&& go install github.com/google/pprof@latest \
&& echo 'export PATH=$HOME/go/bin:$PATH' >> ~/.bashrc
&& rm -rf /var/lib/apt/lists/*


################################################################################
Expand Down
9 changes: 5 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ docker build -t leanstore-dev .
Run a container based on the image:

```sh
docker run -it --privileged -v /path/to/leanstore/on/host:/path/to/leanstore/on/container leanstore-dev bash
docker run -it --privileged --network=host -v /path/to/leanstore/on/host:/path/to/leanstore/on/container leanstore-dev bash
```

Build and test LeanStore in the running container:

```sh
cd /path/to/leanstore/on/container
cmake -B build -S .
cmake --build build -j `nproc`
ctest --test-dir build
cmake --preset debug
cmake --build build/debug -j `nproc`
ctest --test-dir build/debug
```

Loading