Skip to content

Add problem 2088: Count Fertile Pyramids in a Land #1675

Add problem 2088: Count Fertile Pyramids in a Land

Add problem 2088: Count Fertile Pyramids in a Land #1675

Workflow file for this run

name: C++
on: push
jobs:
check-code-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup update
- run: cargo run --package check-cpp-code-format --release -- c++
- run: >-
find c++
-type f
'(' -name '*.cpp' -o -name '*.h' ')'
-exec clang-format --Werror -n --verbose '{}' +
clang-tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install --no-install-recommends -y clang-tidy
- run: vcpkg install gtest
- run: >-
cmake
-S c++
-B target/c++
-D CMAKE_BUILD_TYPE=Debug
-D CMAKE_CXX_COMPILER=clang++
-D CMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
-D ENABLE_CLANG_TIDY=clang-tidy
- run: cmake --build target/c++ -j
tests:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: vcpkg install gtest
- run: >-
cmake
-S c++
-B target/c++
-D CMAKE_BUILD_TYPE=Debug
-D CMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
- run: cmake --build target/c++ -j
- run: ctest
working-directory: target/c++
strategy:
matrix:
os:
# - macOS-latest
- ubuntu-latest
tests-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: vcpkg install gtest --triplet ${{ matrix.platform }}-windows
- run: >-
cmake
-S c++
-B target/c++
-A $('${{ matrix.platform }}' -eq 'x64' ? 'x64' : 'Win32')
-D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake"
- run: cmake --build target/c++ -j --config Debug
- run: ctest
working-directory: target/c++
strategy:
matrix:
platform:
- x64
- x86