Skip to content

Commit

Permalink
adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
robinholzi committed May 1, 2024
1 parent fc609c8 commit 2e60b67
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 23 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,24 @@ jobs:
- name: Configure CMake
working-directory: ${{github.workspace}}/cmake/build
# fdebug-prefix-map is for ccache to not have absolute paths interfere with caching, see https://ccache.dev/manual/3.6.html#_compiling_in_different_directories
run: |
cmake \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install" \
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-fdebug-prefix-map=${{github.workspace}}/build=." \
-DgRPC_PROTOBUF_PROVIDER=module \
-DABSL_ENABLE_INSTALL=On \
-DgRPC_BUILD_CSHARP_EXT=Off \
-DABSL_BUILD_TESTING=Off \
-DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=Off \
${{github.workspace}}
run: >
cmake
-G "Unix Makefiles"
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install"
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_FLAGS="-fdebug-prefix-map=${{github.workspace}}/build=."
-DgRPC_PROTOBUF_PROVIDER=module
-DABSL_ENABLE_INSTALL=On
-DgRPC_BUILD_CSHARP_EXT=Off
-DABSL_BUILD_TESTING=Off
-DgRPC_INSTALL=ON
-DgRPC_BUILD_TESTS=Off
${{github.workspace}}
- name: Build
working-directory: ${{github.workspace}}/cmake/build
run: make -j2 && make install
run: make && make install

- name: Store binaries
uses: actions/upload-artifact@v4
Expand Down
33 changes: 29 additions & 4 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,31 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
CLANG_TIDY: clang-tidy-18
RUN_CLANG_TIDY: run-clang-tidy-18
CLANG_TIDY: clang-tidy-15
RUN_CLANG_TIDY: run-clang-tidy-15
# TODO: https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
# TODO: how to bump run-clang-tidy?

steps:
- uses: actions/checkout@v4

- name: Install clang-tidy
run: |
sudo apt update
sudo apt install -y clang-tidy-18
sudo apt install -y clang-tidy-15
cmake --version
- name: Setup pre-built grpc binaries
uses: actions/download-artifact@v4
with:
name: grpc-binaries-clang-clang++-17-Release
path: ${{github.workspace}}/install

- name: Configure CMake
working-directory: ${{github.workspace}}
run: bash scripts/clang-tidy.sh build
env:
CMAKE_PREFIX_PATH: ${{github.workspace}}/install

- name: Run clang-tidy
working-directory: ${{github.workspace}}
Expand Down Expand Up @@ -194,6 +204,12 @@ jobs:
with:
version: ${{ matrix.compiler.version }}.0
env: true

- name: Setup pre-built grpc binaries
uses: actions/download-artifact@v4
with:
name: grpc-binaries-${{matrix.compiler.c}}-${{matrix.compiler.cxx}}-${{matrix.compiler.version}}-${{matrix.build-type}}
path: ${{github.workspace}}/install

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}//build
Expand All @@ -204,6 +220,7 @@ jobs:
# fdebug-prefix-map is for ccache to not have absolute paths interfere with caching, see https://ccache.dev/manual/3.6.html#_compiling_in_different_directories
run: >
cmake ${{github.workspace}}
-DCMAKE_PREFIX_PATH=${{github.workspace}}/install
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_FLAGS="-fdebug-prefix-map=${{github.workspace}}/build=."
Expand Down Expand Up @@ -267,6 +284,12 @@ jobs:
version: 17.0
env: true

- name: Setup pre-built grpc binaries
uses: actions/download-artifact@v4
with:
name: grpc-binaries-clang-clang++-17-Release
path: ${{github.workspace}}/install

- name: Create Build Environment
run: |
cmake -E make_directory ${{github.workspace}}/build
Expand All @@ -275,7 +298,9 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}/build
run: >
cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=Debug
cmake ${{github.workspace}}
-DCMAKE_PREFIX_PATH=${{github.workspace}}/install
-DCMAKE_BUILD_TYPE=Debug
-DMODYN_BUILD_PLAYGROUND=ON -DMODYN_BUILD_TESTS=ON -DMODYN_BUILD_STORAGE=ON -DMODYN_TEST_COVERAGE=ON
- name: Build
Expand Down
2 changes: 0 additions & 2 deletions docker/Dependencies/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ ENV MODYN_DEP_BUILDTYPE=$MODYN_DEP_BUILDTYPE
RUN echo "Used buildtype is ${MODYN_BUILDTYPE}" >> /src/.modyn_buildtype
RUN echo "Used dependency buildtype is ${MODYN_DEP_BUILDTYPE}" >> /src/.modyn_dep_buildtype

# TODO: this PR: use pre-built binaries for grpc

# Install gRPC systemwide. When updating the version, make sure to also update the storage_dependencies.cmake file
RUN git clone --recurse-submodules -b v1.59.2 --depth 1 --shallow-submodules https://github.com/grpc/grpc && \
cd grpc && mkdir -p cmake/build && cd cmake/build && \
Expand Down
4 changes: 2 additions & 2 deletions docker/Storage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ WORKDIR /src
RUN chown -R appuser /src
USER appuser

# TODO: use local grpc
RUN mkdir build \
&& cd build \
&& cmake .. -DCMAKE_BUILD_TYPE=${MODYN_BUILDTYPE} -DMODYN_BUILD_TESTS=Off -DMODYN_BUILD_PLAYGROUND=Off -DMODYN_BUILD_STORAGE=On \
&& cmake .. -DCMAKE_BUILD_TYPE=${MODYN_BUILDTYPE} -DMODYN_BUILD_TESTS=Off -DMODYN_BUILD_PLAYGROUND=Off \
-DMODYN_BUILD_STORAGE=On -DMODYN_TRY_LOCAL_GRPC=On \
&& make -j8 modyn-storage

# These files are copied after building the storage to avoid rebuilding if the config changes
Expand Down

0 comments on commit 2e60b67

Please sign in to comment.