Update type docs #42
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: Test | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-14] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Fetch Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.14.0 | |
| cache: 'npm' | |
| - name: Install Modules | |
| run: npm ci | |
| - name: Install OpenCL - Ubuntu ARM | |
| if: matrix.os == 'ubuntu-22.04-arm' | |
| run: | | |
| sudo apt update -qq | |
| sudo apt install -qq ocl-icd-opencl-dev pocl-opencl-icd | |
| - name: Install OpenCL - Windows 1 | |
| if: matrix.os == 'windows-2022' | |
| run: | | |
| curl -o opencl-installer.exe 'https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b6dccdb7-b503-41ea-bd4b-a78e9c2d8dd6/w_opencl_runtime_p_2025.1.0.972.exe' | |
| ./opencl-installer.exe --s --x --f ocl | |
| cp "./ocl/w_opencl_runtime_p_2025.1.0.972.msi" "./opencl-rt.msi" | |
| touch install.log | |
| # echo "Start Msiexec" | |
| # msiexec /i "opencl-rt.msi" /qn /passive /quiet | |
| # echo "End Msiexec" | |
| - name: Install OpenCL - Windows 2 | |
| shell: pwsh | |
| if: matrix.os == 'windows-2022' | |
| run: | | |
| $file = "opencl-rt.msi" | |
| $log = "install.log" | |
| $procMain = Start-Process "msiexec" "/i `"$file`" /qn /l*! `"$log`"" -NoNewWindow -PassThru | |
| $procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru | |
| $procMain.WaitForExit() | |
| $procLog.Kill() | |
| - name: Install OpenCL - Ubuntu | |
| if: matrix.os == 'ubuntu-22.04' | |
| run: | | |
| # download the key to system keyring | |
| wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | |
| | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null | |
| # add signed entry to apt sources and configure the APT client to use Intel repository: | |
| echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | |
| sudo apt update -qq | |
| sudo apt install -qq ocl-icd-opencl-dev intel-oneapi-runtime-opencl | |
| - name: Build Current Binary | |
| run: npm run build | |
| - name: Run Unit Tests | |
| if: matrix.os != 'macos-14' && matrix.os != 'ubuntu-22.04-arm' | |
| run: npm run test-ci | |
| - name: Run Index Tests - MacOS | |
| if: matrix.os == 'macos-14' || matrix.os == 'ubuntu-22.04-arm' | |
| run: node index.js |