Repository navigation
v2.0.0 - Redesign, Complex Numbers, Custom Tensors #13
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: Git config for fetching pull requests | |
| run: | | |
| git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/images | |
| run: cmake -B ${{github.workspace}}/examples/c/build | |
| env: | |
| LIBNPY_REPO: https://github.com/${{github.repository}} | |
| LIBNPY_TAG: ${{github.sha}} | |
| - 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: Git config for fetching pull requests | |
| run: | | |
| git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* | |
| - name: CMake config | |
| working-directory: ${{github.workspace}}/examples/custom_tensors | |
| run: cmake -B ${{github.workspace}}/examples/c/build --preset release | |
| env: | |
| LIBNPY_REPO: https://github.com/${{github.repository}} | |
| LIBNPY_TAG: ${{github.sha}} | |
| - 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 | |
| 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-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 |