diff --git a/.github/workflows/linux-gcc13.yaml b/.github/workflows/linux-gcc13.yaml index 142daa78..73512737 100644 --- a/.github/workflows/linux-gcc13.yaml +++ b/.github/workflows/linux-gcc13.yaml @@ -10,7 +10,7 @@ jobs: name: libebml with gcc13 runs-on: ubuntu-latest env: - CMAKE_OPTIONS: -DCMAKE_CXX_EXTENSIONS=OFF + CMAKE_OPTIONS: -DCMAKE_CXX_EXTENSIONS=OFF -DBUILD_TESTING=ON steps: - uses: lukka/get-cmake@latest @@ -28,3 +28,6 @@ jobs: - name: Test installation run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built + + - name: Run tests + run: ctest --test-dir _build diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 72b480c7..8ae292e1 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -10,13 +10,13 @@ jobs: name: libebml runs-on: ubuntu-latest env: - CMAKE_OPTIONS: -DCMAKE_CXX_EXTENSIONS=OFF + CMAKE_OPTIONS: -DCMAKE_CXX_EXTENSIONS=OFF -DBUILD_TESTING=ON steps: - uses: lukka/get-cmake@latest - name: Get pushed code uses: actions/checkout@v3 - + - name: Configure run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} -DCMAKE_INSTALL_PREFIX:STRING=${GITHUB_WORKSPACE}/_built @@ -25,3 +25,6 @@ jobs: - name: Test installation run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built + + - name: Run tests + run: ctest --test-dir _build diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index cd6e08aa..3683143a 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -14,13 +14,13 @@ jobs: matrix: arch: [x86_64, arm64] env: - CMAKE_OPTIONS: -DCMAKE_CXX_EXTENSIONS=OFF + CMAKE_OPTIONS: -DCMAKE_CXX_EXTENSIONS=OFF -DBUILD_TESTING=ON steps: - uses: lukka/get-cmake@latest - name: Get pushed code uses: actions/checkout@v3 - + - name: Configure run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} -DCMAKE_INSTALL_PREFIX:STRING=${GITHUB_WORKSPACE}/_built -DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch }}" @@ -29,3 +29,9 @@ jobs: - name: Test installation run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built + + - name: Run tests + run: | + if [ $(uname -m) = "${{ matrix.arch }}" ]; then + ctest --test-dir _build; + fi diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 5ed0487a..9dd47331 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -18,18 +18,18 @@ jobs: { "name": "Static", "option": "OFF"} ] arch: [ - { "name": "x64", "option": "x64"}, - { "name": "x86", "option": "win32"}, - { "name": "arm64", "option": "arm64"}, + { "name": "x64", "option": "x64", "env": "AMD64"}, + { "name": "x86", "option": "win32", "env": "X86"}, + { "name": "arm64", "option": "arm64", "env": "ARM64"}, ] env: - CMAKE_OPTIONS: -DENABLE_WIN32_IO=ON -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_FLAGS_INIT="-DWINVER=0x0501" + CMAKE_OPTIONS: -DENABLE_WIN32_IO=ON -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_FLAGS_INIT="-DWINVER=0x0501" -DBUILD_TESTING=ON steps: - uses: lukka/get-cmake@latest - name: Get pushed code uses: actions/checkout@v3 - + - name: Configure ${{ matrix.shared.name }} library run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} -A ${{ matrix.arch.option }} -DBUILD_SHARED_LIBS=${{ matrix.shared.option }} @@ -38,3 +38,9 @@ jobs: - name: Test installation run: cmake --install _build --config ${{ matrix.config }} --prefix ${GITHUB_WORKSPACE}/_built + + - name: Run tests + run: | + if ($env:PROCESSOR_ARCHITECTURE -match "${{ matrix.arch.env }}") { + ctest --test-dir _build + }