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 deleted file mode 100644 index af14b1f7..00000000 --- a/.github/workflows/conventional-commits.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: PR Title - -on: - pull_request: - types: [opened, synchronize, reopened, edited] - -jobs: - build: - name: Conventional Commits - runs-on: ubuntu-latest - steps: - - name: Conventional Commit Validation - uses: ytanikin/PRConventionalCommits@1.1.0 - with: - task_types: '["feat","fix","perf","chore","revert"]' - add_label: 'false' diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 00000000..0e97e8e6 --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,21 @@ +name: PR Check + +on: [pull_request, pull_request_target] + +jobs: + job_0: + name: Signed Commits + steps: + - name: Check out the repository code + uses: actions/checkout@v4.1.4 + - name: Check if the commits are signed + uses: 1Password/check-signed-commits-action@v1 + job_1: + name: Conventional Title + runs-on: ubuntu-latest + steps: + - name: Conventional Title Validation + uses: ytanikin/PRConventionalCommits@1.1.0 + with: + task_types: '["feat","fix","perf","chore","revert"]' + add_label: 'false' 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..ff9d9804 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ [![CI][9]][10] -[![CircleCI][1]][2] [![codecov][3]][4] # LeanStore @@ -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 @@ -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 + 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 ``` +