Integration tests #7
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
| # This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | |
| # See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
| name: CMake on multiple platforms | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Release, Debug] | |
| c_compiler: [clang] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| - name: Install vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git | |
| /bin/sh -c ./vcpkg/bootstrap-vcpkg.sh | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -S ${{ github.workspace }} | |
| -DWOWPKG_USE_DEVELOPMENT_PATHS:option=on | |
| -DWOWPKG_ENABLE_SANITIZERS:option=on | |
| -DWOWPKG_ENABLE_TESTS:option=on | |
| -DWOWPKG_ENABLE_TESTS_INTEGRATION:option=off | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} | |
| - name: Test | |
| working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
| run: ctest --build-config ${{ matrix.build_type }} | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Release, Debug] | |
| c_compiler: [gcc] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| - name: Install valgrind | |
| run: | | |
| sudo apt install valgrind | |
| - name: Install vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git | |
| /bin/sh -c ./vcpkg/bootstrap-vcpkg.sh | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -S ${{ github.workspace }} | |
| -DWOWPKG_USE_DEVELOPMENT_PATHS:option=on | |
| -DWOWPKG_ENABLE_SANITIZERS:option=off | |
| -DWOWPKG_ENABLE_TESTS:option=on | |
| -DWOWPKG_ENABLE_TESTS_INTEGRATION:option=off | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} | |
| - name: Test | |
| working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
| run: ctest --build-config ${{ matrix.build_type }} -T memcheck | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Release, Debug] | |
| c_compiler: [cl] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| - name: Install vcpkg | |
| shell: pwsh | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git | |
| .\vcpkg\bootstrap-vcpkg.bat | |
| .\vcpkg\vcpkg.exe install | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -S ${{ github.workspace }} | |
| -DWOWPKG_USE_DEVELOPMENT_PATHS:option=on | |
| -DWOWPKG_ENABLE_SANITIZERS:option=on | |
| -DWOWPKG_ENABLE_TESTS:option=on | |
| -DWOWPKG_ENABLE_TESTS_INTEGRATION:option=off | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} | |
| - name: Test | |
| working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
| run: ctest --build-config ${{ matrix.build_type }} |