Add vcpkg validation job to CI #28
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| std: [11, 17] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure | |
| run: cmake -S . -B build -DTIME_SHIELD_CPP_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| - name: Build | |
| run: cmake --build build | |
| - name: Test | |
| run: ctest --test-dir build | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| std: [11, 17] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure | |
| run: cmake -S . -B build -DTIME_SHIELD_CPP_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Test | |
| run: ctest --test-dir build -C Release | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| std: [11, 17] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure | |
| run: cmake -S . -B build -DTIME_SHIELD_CPP_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| - name: Build | |
| run: cmake --build build | |
| - name: Test | |
| run: ctest --test-dir build | |
| vcpkg-install: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git | |
| ./vcpkg/bootstrap-vcpkg.sh | |
| - name: Validate port | |
| run: ./vcpkg/vcpkg install time-shield-cpp --overlay-ports=vcpkg-overlay/ports | |
| - name: Configure consumer project | |
| run: cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake | |
| - name: Build consumer project | |
| run: cmake --build build |