issue #241: add infrastructure for range checking #611
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: "CMake build" | |
| on: | |
| push: | |
| pull_request: | |
| workflow_call: | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| name: ${{ matrix.toolchain }} (MATIO_EXTENDED_SPARSE=${{ matrix.extended-sparse }}, MATIO_MCOS=${{ matrix.mcos }}, MATIO_MAT73=${{ matrix.mat73 }}, MATIO_WITH_ZLIB=${{ matrix.with-zlib }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: | |
| - linux-gcc | |
| - macos-clang | |
| - windows-msvc | |
| - windows-mingw | |
| configuration: | |
| - Release | |
| python-version: | |
| - 3.13 | |
| extended-sparse: | |
| - ON | |
| - OFF | |
| mcos: | |
| - ON | |
| - OFF | |
| mat73: | |
| - ON | |
| - OFF | |
| with-zlib: | |
| - ON | |
| - OFF | |
| include: | |
| - toolchain: linux-gcc | |
| os: ubuntu-latest | |
| compiler: gcc | |
| - toolchain: macos-clang | |
| os: macos-latest | |
| compiler: clang | |
| - toolchain: windows-msvc | |
| os: windows-latest | |
| compiler: msvc | |
| - toolchain: windows-mingw | |
| os: windows-latest | |
| compiler: mingw | |
| exclude: | |
| - toolchain: windows-mingw | |
| mat73: ON | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 5 | |
| submodules: recursive | |
| - name: Setup python environment | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install python packages | |
| run: | | |
| if [ "${{ matrix.toolchain }}" == "macos-clang" ]; then | |
| echo "/Users/runner/Library/Python/${{ matrix.python-version }}/bin" >> $GITHUB_PATH | |
| fi | |
| pip install --disable-pip-version-check --user "conan>=2.16.1,<3" | |
| - name: Install cppcheck | |
| if: matrix.toolchain == 'linux-gcc' | |
| run: sudo apt-get update && sudo apt-get install -y cppcheck | |
| - name: Cache conan folder | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.conan2 | |
| key: ${{ runner.os }}-conan2-${{ hashFiles('conanfile.txt', 'conanfile.py', 'conan.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-conan2- | |
| - name: Configure (${{ matrix.configuration }}) | |
| run: | | |
| if [ "${{ matrix.toolchain }}" == "macos-clang" ]; then | |
| echo "/Users/runner/Library/Python/${{ matrix.python-version }}/bin" >> $GITHUB_PATH | |
| fi | |
| if [ "${{ matrix.toolchain }}" == "windows-msvc" ]; then | |
| cmake -S . -B build -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=conan_provider -DCONAN_HOST_PROFILE="default;auto-cmake;${{ github.workspace }}/.ci/conan_static_profile_windows-msvc.cmake" -DMATIO_SHARED=OFF -DMATIO_EXTENDED_SPARSE=${{ matrix.extended-sparse }} -DMATIO_MCOS=${{ matrix.mcos }} -DMATIO_MAT73=${{ matrix.mat73 }} -DMATIO_WITH_ZLIB=${{ matrix.with-zlib }} | |
| elif [ "${{ matrix.toolchain }}" == "windows-mingw" ]; then | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=conan_provider -DCONAN_HOST_PROFILE="default;auto-cmake;${{ github.workspace }}/.ci/conan_static_profile_windows-mingw.cmake" -DMATIO_SHARED=OFF -DMATIO_EXTENDED_SPARSE=${{ matrix.extended-sparse }} -DMATIO_MCOS=${{ matrix.mcos }} -DMATIO_MAT73=${{ matrix.mat73 }} -DMATIO_WITH_ZLIB=${{ matrix.with-zlib }} -DMATIO_WITH_HDF5=${{ matrix.mat73 }} -G "MinGW Makefiles" | |
| elif [ "${{ matrix.toolchain }}" == "linux-gcc" ]; then | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=conan_provider -DCONAN_HOST_PROFILE="default;auto-cmake;${{ github.workspace }}/.ci/conan_static_profile_linux-gcc.cmake" -DMATIO_SHARED=OFF -DMATIO_ENABLE_CPPCHECK=ON -DMATIO_EXTENDED_SPARSE=${{ matrix.extended-sparse }} -DMATIO_MCOS=${{ matrix.mcos }} -DMATIO_MAT73=${{ matrix.mat73 }} -DMATIO_WITH_ZLIB=${{ matrix.with-zlib }} | |
| else | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=conan_provider -DCONAN_HOST_PROFILE="default;auto-cmake;${{ github.workspace }}/.ci/conan_static_profile_${{ matrix.toolchain }}.cmake" -DMATIO_SHARED=OFF -DMATIO_EXTENDED_SPARSE=${{ matrix.extended-sparse }} -DMATIO_MCOS=${{ matrix.mcos }} -DMATIO_MAT73=${{ matrix.mat73 }} -DMATIO_WITH_ZLIB=${{ matrix.with-zlib }} | |
| fi | |
| - name: Build with ${{ matrix.compiler }} | |
| run: | | |
| if [ "${{ matrix.toolchain }}" == "windows-msvc" ]; then | |
| cmake --build build --config ${{ matrix.configuration }} | |
| else | |
| cmake --build build -- -j8 | |
| fi | |
| - name: Test | |
| run: ctest --no-tests=error --test-dir build --build-config ${{ matrix.configuration }} --parallel 8 | |
| build-windows-arm: | |
| name: windows-arm-msvc | |
| runs-on: windows-11-arm | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 5 | |
| submodules: recursive | |
| - name: Setup python environment | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.13 | |
| - name: Configure | |
| run: cmake -S . -B build -A ARM64 -DMATIO_SHARED=OFF -DMATIO_MAT73=OFF -DMATIO_WITH_ZLIB=OFF | |
| - name: Build with msvc | |
| run: cmake --build build --config Release | |
| - name: Test | |
| run: ctest --no-tests=error --test-dir build --build-config Release --parallel 8 | |
| build-openbsd: | |
| name: openbsd-clang | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 5 | |
| submodules: recursive | |
| - name: Test with clang | |
| uses: vmactions/openbsd-vm@v1 | |
| with: | |
| usesh: true | |
| copyback: false | |
| prepare: | | |
| set -e | |
| pkg_add cmake | |
| run: | | |
| set -e | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DMATIO_SHARED=OFF -DMATIO_MAT73=OFF | |
| cmake --build build -- -j8 | |
| ctest --no-tests=error --test-dir build --build-config Release --parallel 8 | |
| build-solaris: | |
| name: solaris-gcc | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 5 | |
| submodules: recursive | |
| - name: Test with gcc | |
| uses: vmactions/solaris-vm@v1 | |
| with: | |
| release: 11.4 | |
| usesh: true | |
| copyback: false | |
| prepare: | | |
| set -e | |
| pkg install cmake gcc | |
| run: | | |
| set -e | |
| mkdir build | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DMATIO_SHARED=OFF -DMATIO_MAT73=OFF | |
| cmake --build build -- -j8 | |
| ctest --no-tests=error --test-dir build --build-config Release --parallel 8 | |
| build-cygwin: | |
| name: windows-cygwin | |
| runs-on: windows-latest | |
| steps: | |
| - name: Set git to use LF | |
| run: git config --global core.autocrlf input | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 5 | |
| submodules: recursive | |
| - name: Setup cygwin | |
| uses: cygwin/cygwin-install-action@master | |
| with: | |
| packages: >- | |
| cmake | |
| gcc-core | |
| gcc-g++ | |
| hdf5 | |
| libaec-devel | |
| libhdf5-devel | |
| make | |
| ninja | |
| python | |
| zlib-devel | |
| - name: Configure | |
| run: | | |
| export PATH=/usr/bin:$PATH | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G Ninja | |
| shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' | |
| - name: Build with gcc | |
| run: | | |
| export PATH=/usr/bin:$PATH | |
| cmake --build build -- -j8 | |
| shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' | |
| - name: Test | |
| run: | | |
| export PATH=/usr/bin:$PATH | |
| ctest --no-tests=error --test-dir build --build-config Release --parallel 8 | |
| shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' |