Skip to content

Commit

Permalink
chore: fix build script and dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Zhang <[email protected]>
  • Loading branch information
zz-jason committed Aug 4, 2024
1 parent e1cbd4b commit 60ce295
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 129 deletions.
98 changes: 0 additions & 98 deletions .circleci/config.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![CI][9]][10]
[![CircleCI][1]][2]
[![codecov][3]][4]

# LeanStore
Expand Down Expand Up @@ -36,8 +35,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 +43,4 @@ 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

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
```

0 comments on commit 60ce295

Please sign in to comment.