-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 2.67 KB
/
test.yml
File metadata and controls
84 lines (70 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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
- 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