Repository navigation
Patch release adding vcpkg packaging support. #28
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: PR Gate | |
| on: | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| jobs: | |
| cpp-format: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| path: | |
| - check: src | |
| exclude: (/miniz/) | |
| - check: test | |
| exclude: '' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run clang-format style check | |
| uses: jidicula/clang-format-action@v4.8.0 | |
| with: | |
| clang-format-version: '18' | |
| check-path: ${{matrix.path['check']}} | |
| exclude-regex: ${{matrix.path['exclude']}} | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get dependencies | |
| run: | | |
| sudo apt-get install ninja-build | |
| - name: CMake config | |
| run: cmake -B ${{github.workspace}}/build --preset release-clang | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/build | |
| run: ninja | |
| - name: Use Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Generate large NPZ files | |
| working-directory: ${{github.workspace}}/ | |
| run: | | |
| pip install numpy | |
| python ${{github.workspace}}/test/generate_large_test.py | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| linux-examples-images: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/images | |
| run: cmake -B ${{github.workspace}}/examples/images/build | |
| env: | |
| LIBNPY_REPO: LOCAL | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/examples/images/build | |
| run: make | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/examples/images/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| linux-examples-custom_tensors: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/custom_tensors | |
| run: cmake -B ${{github.workspace}}/examples/custom_tensors/build | |
| env: | |
| LIBNPY_REPO: LOCAL | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/examples/custom_tensors/build | |
| run: make | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/examples/custom_tensors/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test -L npy | |
| linux-asan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get dependencies | |
| run: | | |
| sudo apt-get install ninja-build | |
| - name: CMake config | |
| run: cmake -B ${{github.workspace}}/build --preset release-clang -DLIBNPY_SANITIZE=address | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/build | |
| run: ninja | |
| - name: Use Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Generate large NPZ files | |
| working-directory: ${{github.workspace}}/ | |
| run: | | |
| pip install numpy | |
| python ${{github.workspace}}/test/generate_large_test.py | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| run: | | |
| cmake -B ${{github.workspace}}/build --preset release | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/build | |
| run: cmake --build . --config Release | |
| - name: Use Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Generate large NPZ files | |
| working-directory: ${{github.workspace}}/ | |
| run: | | |
| pip install numpy | |
| python ${{github.workspace}}/test/generate_large_test.py | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| windows-examples-images: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/images | |
| run: cmake -B ${{github.workspace}}/examples/images/build | |
| env: | |
| LIBNPY_REPO: LOCAL | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/examples/images/build | |
| run: cmake --build . --config Release | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/examples/images/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| windows-examples-custom_tensors: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/custom_tensors | |
| run: cmake -B ${{github.workspace}}/examples/custom_tensors/build | |
| env: | |
| LIBNPY_REPO: LOCAL | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/examples/custom_tensors/build | |
| run: cmake --build . --config Release | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/examples/custom_tensors/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test -L npy | |
| macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get dependencies | |
| run: | | |
| brew update && brew install ninja | |
| - name: CMake config | |
| run: cmake -B ${{github.workspace}}/build --preset release-clang | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/build | |
| run: ninja | |
| - name: Use Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Generate large NPZ files | |
| working-directory: ${{github.workspace}}/ | |
| run: | | |
| pip install numpy | |
| python ${{github.workspace}}/test/generate_large_test.py | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| macos-examples-images: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/images | |
| run: cmake -B ${{github.workspace}}/examples/images/build | |
| env: | |
| LIBNPY_REPO: LOCAL | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/examples/images/build | |
| run: make | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/examples/images/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| macos-examples-custom_tensors: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/custom_tensors | |
| run: cmake -B ${{github.workspace}}/examples/custom_tensors/build | |
| env: | |
| LIBNPY_REPO: LOCAL | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/examples/custom_tensors/build | |
| run: make | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/examples/custom_tensors/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test -L npy | |
| macos-x86_64: | |
| runs-on: macos-15-intel | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get dependencies | |
| run: | | |
| brew update && brew install ninja | |
| - name: CMake config | |
| run: cmake -B ${{github.workspace}}/build --preset release-clang | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/build | |
| run: ninja | |
| - name: Use Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Generate large NPZ files | |
| working-directory: ${{github.workspace}}/ | |
| run: | | |
| pip install numpy | |
| python ${{github.workspace}}/test/generate_large_test.py | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| macos-x86_64-examples-images: | |
| runs-on: macos-15-intel | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/images | |
| run: cmake -B ${{github.workspace}}/examples/images/build | |
| env: | |
| LIBNPY_REPO: LOCAL | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/examples/images/build | |
| run: make | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/examples/images/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test | |
| macos-x86_64-examples-custom_tensors: | |
| runs-on: macos-15-intel | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/custom_tensors | |
| run: cmake -B ${{github.workspace}}/examples/custom_tensors/build | |
| env: | |
| LIBNPY_REPO: LOCAL | |
| - name: CMake build | |
| working-directory: ${{github.workspace}}/examples/custom_tensors/build | |
| run: make | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/examples/custom_tensors/build | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test -L npy | |
| linux-vcpkg: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Bootstrap vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git $HOME/vcpkg | |
| bash $HOME/vcpkg/bootstrap-vcpkg.sh | |
| - name: CMake config | |
| run: | | |
| cmake -B ${{github.workspace}}/build-vcpkg-test \ | |
| -S ${{github.workspace}}/test/vcpkg \ | |
| -DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake \ | |
| -DVCPKG_OVERLAY_PORTS=${{github.workspace}}/test/vcpkg/port | |
| - name: CMake build | |
| run: cmake --build ${{github.workspace}}/build-vcpkg-test --config Release | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/build-vcpkg-test | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure | |
| windows-vcpkg: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: pwsh | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Bootstrap vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git "$env:USERPROFILE\vcpkg" | |
| & "$env:USERPROFILE\vcpkg\bootstrap-vcpkg.bat" | |
| - name: CMake config | |
| run: | | |
| cmake -B "${{github.workspace}}\build-vcpkg-test" ` | |
| -S "${{github.workspace}}\test\vcpkg" ` | |
| -DCMAKE_TOOLCHAIN_FILE="$env:USERPROFILE\vcpkg\scripts\buildsystems\vcpkg.cmake" ` | |
| -DVCPKG_OVERLAY_PORTS="${{github.workspace}}\test\vcpkg\port" | |
| - name: CMake build | |
| run: cmake --build ${{github.workspace}}\build-vcpkg-test --config Release | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}\build-vcpkg-test | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure | |
| macos-vcpkg: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Bootstrap vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git $HOME/vcpkg | |
| bash $HOME/vcpkg/bootstrap-vcpkg.sh | |
| - name: CMake config | |
| run: | | |
| cmake -B ${{github.workspace}}/build-vcpkg-test \ | |
| -S ${{github.workspace}}/test/vcpkg \ | |
| -DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake \ | |
| -DVCPKG_OVERLAY_PORTS=${{github.workspace}}/test/vcpkg/port | |
| - name: CMake build | |
| run: cmake --build ${{github.workspace}}/build-vcpkg-test --config Release | |
| - name: CMake test | |
| working-directory: ${{github.workspace}}/build-vcpkg-test | |
| run: ctest -V --build-config Release --timeout 120 --output-on-failure |