Skip to content

Commit

Permalink
poate vcpkg merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rizesql committed Apr 20, 2024
1 parent 3a65338 commit b18fff9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 53 deletions.
37 changes: 13 additions & 24 deletions .github/actions/configure-cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,20 @@ runs:
${{ env.BUILD_DIR }}/.ninja_log
key: ${{ matrix.os }}-${{ matrix.cxx }}-ninja-cache-${{ hashFiles('CMakeLists.txt') }}
restore-keys: ${{ matrix.os }}-${{ matrix.cxx }}-ninja-cache-
#
# - name: Install Protoc
# uses: arduino/setup-protoc@v3
# with:
# version: "23.x"

# - name: Install Protobuf (Linux)
# if: runner.os == 'Linux'
# run: |
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends \
# libprotobuf-dev libprotoc-dev protobuf-compiler
# shell: bash
#
# - name: Install Protobuf (macOS)
# if: runner.os == 'macOS'
# run: |
# brew install protobuf
# shell: bash
#
# - name: Install Protobuf (Windows)
# if: runner.os == 'Windows'
# run: |
# choco install protoc
# shell: bash

- uses: lukka/get-cmake@latest
- name: List $RUNNER_WORKSPACE before vcpkg is setup
run: find $RUNNER_WORKSPACE
shell: bash

- name: Setup anew (or from cache) vcpkg (and does not build any package)
uses: lukka/run-vcpkg@v11

- name: Run CMake consuming CMakePreset.json and run vcpkg to build packages
uses: lukka/run-cmake@v10
# with:
# configurePreset: 'ninja-multi-vcpkg'

- run: |
CMAKE_GENERATOR=${{ matrix.cmake_generator }} cmake -S ${GITHUB_WORKSPACE} -B ${{ env.BUILD_DIR }} \
Expand Down
47 changes: 18 additions & 29 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,6 @@ jobs:
sudo apt-get update
sudo apt-get install --no-install-recommends cppcheck
- name: Setup anew (or from cache) vcpkg (and does not build any package)
uses: lukka/run-vcpkg@v11

- name: Run CMake consuming CMakePreset.json and run vcpkg to build packages
uses: lukka/run-cmake@v10
with:
configurePreset: 'ninja-multi-vcpkg'

# - name: Install Protoc
# uses: arduino/setup-protoc@v3
# with:
# version: "23.x"

# - name: Install protobuf
# run: |
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends \
# libprotobuf-dev libprotoc-dev protobuf-compiler

# The flag CMAKE_EXPORT_COMPILE_COMMANDS generates compile_commands.json
# which is used by cppcheck and clang-tidy
- name: Configure CMake
Expand All @@ -88,6 +69,20 @@ jobs:
--suppress=useStlAlgorithm \
--error-exitcode=1
# - uses: lukka/get-cmake@latest
# - name: List $RUNNER_WORKSPACE before vcpkg is setup
# run: find $RUNNER_WORKSPACE
# shell: bash
#
# - name: Setup anew (or from cache) vcpkg (and does not build any package)
# uses: lukka/run-vcpkg@v11
#
# - name: Run CMake consuming CMakePreset.json and run vcpkg to build packages
# uses: lukka/run-cmake@v10
# with:
# configurePreset: 'ninja-multi-vcpkg'

clang-tidy:
name: "Clang-Tidy"
runs-on: ubuntu-22.04
Expand All @@ -110,16 +105,10 @@ jobs:
sudo apt-get update
sudo apt-get install --no-install-recommends clang-tidy-17 libc++-17-dev libc++abi-17-dev
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "23.x"

# - name: Install protobuf
# run: |
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends \
# libprotobuf-dev libprotoc-dev protobuf-compiler=3.15.0
# - name: Install Protoc
# uses: arduino/setup-protoc@v3
# with:
# version: "23.x"

- name: Configure CMake
uses: ./.github/actions/configure-cmake
Expand Down

0 comments on commit b18fff9

Please sign in to comment.