Skip to content

Commit

Permalink
CI: run cmake tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 committed Dec 19, 2023
1 parent dec3349 commit 190f9b2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/linux-gcc13.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -26,5 +26,8 @@ jobs:
- name: Build
run: cmake --build _build --parallel

- name: Run tests
run: ctest --test-dir _build

- name: Test installation
run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built
7 changes: 5 additions & 2 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ 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

- name: Build
run: cmake --build _build --parallel

- name: Run tests
run: ctest --test-dir _build

- name: Test installation
run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built
7 changes: 5 additions & 2 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ 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 }}"

- name: Build
run: cmake --build _build --parallel

- name: Run tests
run: ctest --test-dir _build

- name: Test installation
run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built
7 changes: 5 additions & 2 deletions .github/workflows/uwp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,22 @@ jobs:
{ "name": "arm64", "option": "arm64"},
]
env:
CMAKE_OPTIONS: -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_SYSTEM_NAME="WindowsStore" -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_CXX_FLAGS_INIT="-DWINVER=0x0A00 -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP"
CMAKE_OPTIONS: -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_SYSTEM_NAME="WindowsStore" -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_CXX_FLAGS_INIT="-DWINVER=0x0A00 -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP" -DBUILD_TESTING=ON
# TODO use CreateFile2 and add -DENABLE_WIN32_IO=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 }} -A ${{ matrix.arch.option }} -DBUILD_SHARED_LIBS=OFF

- name: Build
run: cmake --build _build --config ${{ matrix.config }} --parallel

- name: Run tests
run: ctest --test-dir _build

- name: Test installation
run: cmake --install _build --config ${{ matrix.config }} --prefix ${GITHUB_WORKSPACE}/_built
7 changes: 5 additions & 2 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,21 @@ jobs:
{ "name": "arm64", "option": "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 }}

- name: Build
run: cmake --build _build --config ${{ matrix.config }} --parallel

- name: Run tests
run: ctest --test-dir _build

- name: Test installation
run: cmake --install _build --config ${{ matrix.config }} --prefix ${GITHUB_WORKSPACE}/_built

0 comments on commit 190f9b2

Please sign in to comment.