Add problem 3014: Minimum Number of Pushes to Type Word I #2046
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |