ci: enable benchmarks and samples for all build configurations #30
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: nfx-datetime - Windows MSVC | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**/*.md" | |
| - "LICENSE.txt" | |
| - ".gitignore" | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "**/*.md" | |
| - "LICENSE.txt" | |
| - ".gitignore" | |
| env: | |
| BUILD_TYPE: Release | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-windows-msvc: | |
| runs-on: windows-2022 | |
| name: Windows MSVC 2022 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Cache CMake build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build | |
| C:\Users\runneradmin\AppData\Local\Microsoft\MSBuild | |
| key: ${{ runner.os }}-msvc2022-cmake-${{ hashFiles('**/CMakeLists.txt', 'include/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-msvc2022-cmake- | |
| - name: Configure CMake | |
| run: cmake -B build -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DNFX_DATETIME_BUILD_STATIC=ON -DNFX_DATETIME_BUILD_SHARED=ON -DNFX_DATETIME_BUILD_TESTS=ON -DNFX_DATETIME_BUILD_SAMPLES=ON -DNFX_DATETIME_BUILD_BENCHMARKS=ON -DNFX_DATETIME_BUILD_DOCUMENTATION=OFF | |
| - name: Build with MSVC | |
| run: | | |
| echo "Starting MSVC build at $(date)" | |
| $start_time = Get-Date | |
| cmake --build build --config Release --parallel | |
| $end_time = Get-Date | |
| $duration = $end_time - $start_time | |
| echo "MSVC build completed in $($duration.TotalSeconds) seconds" | |
| - name: Test | |
| working-directory: build | |
| run: ctest -C Release --output-on-failure --parallel |