Skip to content

Commit

Permalink
chore(deps): bump linter deps
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Jun 2, 2024
1 parent 25c2abf commit 071d3b1
Show file tree
Hide file tree
Showing 13 changed files with 141 additions and 62 deletions.
73 changes: 56 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
strategy:
matrix:
path:
- check: 'src'
- check: 'include'
exclude: '(PerfEvent.hpp)'
- check: "src"
- check: "include"
exclude: "(PerfEvent.hpp)"
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: '17'
clang-format-version: "17"
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}

Expand All @@ -39,8 +39,17 @@ jobs:

- name: Generate dependency files hash
id: files-hash
run: |
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_linter_dependencies') }})
run: |-
DIR_HASH=$(
echo -n ${{
hashFiles(
'conanfile.py',
'conanprofile.docker',
'.github/workflows/ci.yml',
'./Dockerfile_linter_dependencies'
)
}}
)
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV
- name: Docker metadata
Expand Down Expand Up @@ -91,8 +100,17 @@ jobs:

- name: Generate dependency files hash
id: files-hash
run: |
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_linter_dependencies') }})
run: |-
DIR_HASH=$(
echo -n ${{
hashFiles(
'conanfile.py',
'conanprofile.docker',
'.github/workflows/ci.yml',
'./Dockerfile_linter_dependencies'
)
}}
)
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV
- name: Set up Docker Buildx
Expand All @@ -119,8 +137,18 @@ jobs:

- name: Generate dependency files hash
id: files-hash
run: |
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_dependencies') }})
run: |-
DIR_HASH=$(
echo -n ${{
hashFiles(
'conanfile.py',
'conanprofile.docker',
'conanprofile.docker_arm',
'.github/workflows/ci.yml',
'./Dockerfile_dependencies'
)
}}
)
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV
- name: Docker metadata
Expand Down Expand Up @@ -174,8 +202,18 @@ jobs:

- name: Generate dependency files hash
id: files-hash
run: |
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_dependencies') }})
run: |-
DIR_HASH=$(
echo -n ${{
hashFiles(
'conanfile.py',
'conanprofile.docker',
'conanprofile.docker_arm',
'.github/workflows/ci.yml',
'./Dockerfile_dependencies'
)
}}
)
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV
- name: Docker metadata
Expand Down Expand Up @@ -233,10 +271,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
preprocessing-docker-compose: [
docker-compose-for-tests-preprocessing-from-tsv.yml,
docker-compose-for-tests-preprocessing-from-ndjson.yml
]
preprocessing-docker-compose:
[
docker-compose-for-tests-preprocessing-from-tsv.yml,
docker-compose-for-tests-preprocessing-from-ndjson.yml,
]
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -274,4 +313,4 @@ jobs:
SILO_IMAGE: ${{ steps.dockerMetadata.outputs.tags }}

- name: Run Tests
run: cd endToEndTests && SILO_URL=localhost:8080 npm run test
run: cd endToEndTests && SILO_URL=localhost:8080 npm run test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ conanprofile
*.out
*.app

# Debug files
debug.duckdb

**/output/
**/logs/
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ list(REMOVE_ITEM SRC_SILO_API ${SRC_TEST})
# ---------------------------------------------------------------------------

option(BUILD_WITH_CLANG_TIDY "Build process clang-tidy")
if (NOT CMAKE_BUILD_TYPE STREQUAL Release AND BUILD_WITH_CLANG_TIDY)
if (NOT CMAKE_BUILD_TYPE STREQUAL Release AND BUILD_WITH_CLANG_TIDY AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_program(CLANG_TIDY_EXE NAMES clang-tidy-19)
if (NOT CLANG_TIDY_EXE)
message(SEND_ERROR "clang-tidy not found, aborting. You can run the build with '-D BUILD_WITH_CLANG_TIDY=OFF' to disable clang-tidy.")
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@ FROM $DEPENDENCY_IMAGE AS builder

COPY . ./

RUN \
python ./build_with_conan.py --release --parallel 4\
RUN python ./build_with_conan.py --release --parallel 4 \
&& cp build/silo_test . \
&& cp build/siloApi .


FROM alpine:3.18 AS server
FROM ubuntu:24.04 AS server

RUN apt-get update \
&& apt-get install -y \
curl \
jq \
&& apt-get clean

WORKDIR /app
COPY docker_default_preprocessing_config.yaml ./default_preprocessing_config.yaml
COPY docker_runtime_config.yaml ./runtime_config.yaml
COPY --from=builder /src/siloApi ./

RUN apk update && apk add libtbb=2021.9.0-r0 curl jq

# call /info, extract "seqeunceCount" from the JSON and assert that the value is not 0. If any of those fails, "exit 1".
HEALTHCHECK --start-period=20s CMD curl --fail --silent localhost:8081/info | jq .sequenceCount | xargs test 0 -ne || exit 1
Expand Down
35 changes: 22 additions & 13 deletions Dockerfile_dependencies
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
FROM alpine:3.18
FROM ubuntu:24.04

ARG TARGETPLATFORM

RUN apk update && apk add --no-cache py3-pip \
build-base=0.5-r3 \
cmake=3.26.5-r0 \
bash=5.2.15-r5 \
linux-headers=6.3-r0 \
boost-build=1.82.0-r0 \
libtbb=2021.9.0-r0
WORKDIR /src

RUN pip install conan==2.0.17
RUN apt update \
&& apt install -y \
cmake \
pipx \
&& apt clean

RUN gcc --version

ENV PATH="/root/.local/bin:$PATH"
RUN pipx install conan --pip-args="--no-cache-dir" --system-site-packages

WORKDIR /src
COPY conanfile.py conanprofile.docker conanprofile.docker_arm ./

RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
mv conanprofile.docker_arm conanprofile; \
mv conanprofile.docker_arm conanprofile; \
else \
mv conanprofile.docker conanprofile; \
mv conanprofile.docker conanprofile; \
fi

RUN conan install . --build=missing --profile ./conanprofile --profile:build ./conanprofile --output-folder=build
RUN apt update \
&& apt install -y \
gcc \
g++ \
&& apt clean

RUN conan install . --build=missing --profile ./conanprofile --profile:build ./conanprofile --output-folder=build
39 changes: 27 additions & 12 deletions Dockerfile_linter_dependencies
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
FROM ubuntu:22.04
FROM ubuntu:23.10

ARG TARGETPLATFORM

WORKDIR /src

RUN apt update \
&& apt install -y \
cmake=3.22.1-1ubuntu1.22.04.2 \
python3-pip=22.0.2+dfsg-1ubuntu0.4 \
software-properties-common=0.99.22.9 \
wget=1.21.2-2ubuntu1 \
gnupg=2.2.27-3ubuntu2.1 \
lsb-release=11.1.0ubuntu4 \
cmake \
software-properties-common \
wget \
gnupg \
lsb-release \
pipx \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main' \
&& apt install -y clang-tidy-19
&& add-apt-repository 'deb http://apt.llvm.org/mantic/ llvm-toolchain-mantic main' \
&& apt update \
&& apt install -y clang-tidy-19 \
&& apt-get clean

ENV PATH="/root/.local/bin:$PATH"
RUN pipx install conan --pip-args="--no-cache-dir" --system-site-packages

COPY conanfile.py conanprofile.docker conanprofile.docker_arm ./

RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
mv conanprofile.docker_arm conanprofile; \
else \
mv conanprofile.docker conanprofile; \
fi


RUN pip install conan==2.0.17
RUN apt-get update && apt-get install -y gcc g++

COPY conanfile.py conanprofile.docker ./
RUN mv conanprofile.docker conanprofile
RUN gcc --version

RUN conan install . --build=missing --profile ./conanprofile --profile:build ./conanprofile --output-folder=build -s build_type=Debug
23 changes: 12 additions & 11 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
class SiloRecipe(ConanFile):
settings = "os", "compiler", "build_type", "arch"

# Update regularly
requires = [
"boost/1.82.0",
"duckdb/0.8.1",
"poco/1.12.4",
"hwloc/2.9.3",
"onetbb/2021.10.0",
"nlohmann_json/3.11.2",
"gtest/cci.20210126",
"roaring/1.0.0",
"spdlog/1.11.0",
"yaml-cpp/0.7.0",
"zstd/1.5.5",
"boost/1.83.0", # https://conan.io/center/recipes?value=boosta #FIXME: Serialization error with 1.84.0
"duckdb/0.8.1", # https://conan.io/center/recipes?value=duckdb #FIXME: test files only compatible with 0.8, need to EXPORT DATABASE in v0.8, then IMPORT DATABASE on the current version of DuckDB
"gtest/1.14.0", # https://conan.io/center/recipes?value=gtest
"hwloc/2.9.3", # https://conan.io/center/recipes?value=hwloc # BLOCKED: Pinned by onetbb <= 2021.12.0
"nlohmann_json/3.11.3", # https://conan.io/center/recipes?value=nlohmann_json
"onetbb/2021.12.0", # https://conan.io/center/recipes?value=onetbb
"poco/1.13.3", # https://conan.io/center/recipes?value=poco
"roaring/4.0.0", # https://conan.io/center/recipes?value=roaring
"spdlog/1.11.0", # https://conan.io/center/recipes?value=spdlog #FIXME: 1.12.0 fails with `error: implicit instantiation of undefined template` #TODO: holding back upgrade to 1.14.1
"yaml-cpp/0.8.0", # https://conan.io/center/recipes?value=yaml-cpp
"zstd/1.5.5", # https://conan.io/center/recipes?value=zstd #BLOCKED: Pinned by boost <=1.85.0
]

default_options = {
Expand Down
2 changes: 1 addition & 1 deletion conanprofile.docker
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ os=Linux
arch=x86_64
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9.3
compiler.version=12.2
build_type=Release
[options]
2 changes: 1 addition & 1 deletion conanprofile.docker_arm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ os=Linux
arch=armv8
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9.3
compiler.version=12.2
build_type=Release
[options]
2 changes: 1 addition & 1 deletion conanprofile.example → conanprofile.linux_x86
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ os=Linux
arch=x86_64
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9.3
compiler.version=12.2
build_type=Release
[options]
8 changes: 8 additions & 0 deletions conanprofile.mac_arm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[settings]
os=Macos
arch=armv8
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=12.2
build_type=Release
[options]
1 change: 1 addition & 0 deletions include/silo/config/util/abstract_config_source.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
Expand Down
2 changes: 1 addition & 1 deletion src/silo/query_engine/actions/tuple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ std::vector<Tuple> TupleFactory::allocateMany(size_t count) {
const size_t allocation_size = tuple_size * count;
std::vector<std::byte>& data = all_tuple_data.emplace_back(allocation_size);
for (unsigned i = 0; i < count; i++) {
tuples.emplace_back(&columns, data.data() + i * tuple_size, tuple_size);
tuples.emplace_back(&columns, data.data() + (i * tuple_size), tuple_size);
}
return tuples;
}

0 comments on commit 071d3b1

Please sign in to comment.