diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index de9e6fc6..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,98 +0,0 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/configuration-reference -version: 2.1 - -orbs: - codecov: codecov/codecov@3.3.0 - -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/configuration-reference/#jobs -jobs: - build: - # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/configuration-reference/#executor-job - docker: - - image: ubuntu:23.04 - - environment: - DEBIAN_FRONTEND: "noninteractive" - TZ: "Asia/Shanghai" - VCPKG_ROOT: "/opt/vcpkg" - - # Add steps to the job - # See: https://circleci.com/docs/configuration-reference/#steps - steps: - - checkout - - - run: - name: "Install dependencies" - command: | - apt update - apt install -y build-essential git cmake make gcc-13 g++-13 - apt install -y libaio-dev python3-pip cppcheck ninja-build - apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - apt install -y curl zip unzip tar pkg-config - apt install -y autoconf libtool - 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 - pip3 install gcovr==6.0 --break-system-packages - git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg - echo 'export VCPKG_ROOT=/opt/vcpkg' >> ~/.bashrc - echo 'export PATH=$VCPKG_ROOT:$PATH' >> ~/.bashrc - echo 'export VCPKG_FORCE_SYSTEM_BINARIES=1' >> ~/.bashrc - rm -rf /var/lib/apt/lists/* - - - run: - name: "Config project" - command: | - source ~/.bashrc - cmake --preset debug_tsan - - - run: - name: "Cppcheck" - command: | - source ~/.bashrc - cppcheck --project=build/debug_tsan/compile_commands.json -i tests --error-exitcode=1 - - - run: - name: "Build project" - command: | - source ~/.bashrc - cmake --build build/debug_tsan -j 4 - no_output_timeout: 5m - - - run: - name: "Test project" - command: | - source ~/.bashrc - TSAN_OPTIONS="suppressions=$(pwd)/tests/tsan.supp" ctest --test-dir build/debug_tsan --output-on-failure -j 2 - no_output_timeout: 5m - - - run: - name: "Generate coverage file" - command: | - source ~/.bashrc - gcovr -v -r . --xml-pretty --xml=coverage.xml --exclude 'build/*' --exclude 'tests/*' --exclude 'benchmarks/*' --verbose - - - codecov/upload: - file: coverage.xml - token: CI_CODECOV_TOKEN - -# Orchestrate jobs using workflows -# See: https://circleci.com/docs/configuration-reference/#workflows -workflows: - build-debug: - jobs: - - build: - context: - - build diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index af14b1f7..6e3eac49 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -1,4 +1,4 @@ -name: PR Title +name: PR Check on: pull_request: @@ -9,8 +9,8 @@ jobs: name: Conventional Commits runs-on: ubuntu-latest steps: - - name: Conventional Commit Validation + - name: Conventional Commits Validation uses: ytanikin/PRConventionalCommits@1.1.0 with: task_types: '["feat","fix","perf","chore","revert"]' - add_label: 'false' + add_label: 'false' \ No newline at end of file diff --git a/.github/workflows/signed-commits.yml b/.github/workflows/signed-commits.yml new file mode 100644 index 00000000..fd5334d1 --- /dev/null +++ b/.github/workflows/signed-commits.yml @@ -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 \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json index 2831aca4..3d405f1d 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -28,7 +28,8 @@ "cacheVariables": { "CMAKE_BUILD_TYPE": "Release", "COUNTERS_LEVEL": "none", - "ENABLE_PROFILING": "ON" + "ENABLE_PROFILING": "OFF", + "BUILD_SHARED_LIBS": "OFF" } }, { diff --git a/README.md b/README.md index bc0fe9b2..6626a20d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![CI][9]][10] -[![CircleCI][1]][2] [![codecov][3]][4] +[![Join Slack][11]][12] # LeanStore @@ -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 @@ -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]. @@ -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 @@ -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 diff --git a/docker/Dockerfile b/docker/Dockerfile index f83828ef..5947fd74 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.04 +FROM ubuntu:24.04 ################################################################################ # install prerequisted libriaries @@ -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 \ @@ -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/* ################################################################################ diff --git a/docker/README.md b/docker/README.md index 662c242b..ae0f94e1 100644 --- a/docker/README.md +++ b/docker/README.md @@ -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 ``` +