@@ -37,16 +37,45 @@ jobs:
3737 gpu : vulkan
3838 package : linux-x64-vulkan
3939
40- # Windows
40+ # Windows x64
4141 - os : windows-2022
4242 arch : x64
4343 gpu : cpu
4444 package : win32-x64
4545 - os : windows-2022
4646 arch : x64
4747 gpu : cuda
48- cuda_version : 12.2.0
4948 package : win32-x64-cuda
49+ - os : windows-2022
50+ arch : x64
51+ gpu : vulkan
52+ package : win32-x64-vulkan
53+
54+ # Windows ARM64 (cross-compiled from x64)
55+ - os : windows-2022
56+ arch : arm64
57+ gpu : cpu
58+ package : win32-arm64
59+ cross_compile : true
60+ - os : windows-2022
61+ arch : arm64
62+ gpu : vulkan
63+ package : win32-arm64-vulkan
64+ cross_compile : true
65+
66+ # Linux ARM64 (native runners)
67+ - os : ubuntu-22.04-arm
68+ arch : arm64
69+ gpu : cpu
70+ package : linux-arm64
71+ - os : ubuntu-22.04-arm
72+ arch : arm64
73+ gpu : cuda
74+ package : linux-arm64-cuda
75+ - os : ubuntu-22.04-arm
76+ arch : arm64
77+ gpu : vulkan
78+ package : linux-arm64-vulkan
5079
5180 steps :
5281 - name : Checkout code
@@ -57,45 +86,91 @@ jobs:
5786 - name : Setup Node.js
5887 uses : actions/setup-node@v4
5988 with :
60- node-version : 20
89+ node-version : 24
6190 registry-url : ' https://registry.npmjs.org'
6291
6392 # Platform-specific dependencies
64- - name : Install build tools (Linux)
65- if : runner.os == 'Linux' && matrix.gpu == 'cpu'
93+ - name : Install build tools (Linux x64 )
94+ if : runner.os == 'Linux' && matrix.arch == 'x64' && matrix. gpu == 'cpu'
6695 run : |
6796 sudo apt-get update
6897 sudo apt-get install -y build-essential cmake
6998
70- - name : Install CUDA toolkit (Linux)
71- if : matrix.gpu == 'cuda ' && runner.os == 'Linux '
99+ - name : Install build tools (Linux ARM64 )
100+ if : runner.os == 'Linux ' && matrix.arch == 'arm64 '
72101 run : |
73- wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
74- sudo dpkg -i cuda-keyring_1.1-1_all.deb
75102 sudo apt-get update
76- sudo apt-get install -y cuda-toolkit-12-2 build-essential cmake
103+ sudo apt-get install -y build-essential cmake
104+
105+ - name : Provision CUDA toolkit
106+ if : matrix.gpu == 'cuda' && runner.os == 'Linux'
107+ uses : ./.github/actions/provision-cuda
108+ with :
109+ version : ' 12.6.2'
110+ arch : ${{ matrix.arch }}
77111
78112 - name : Install Vulkan SDK (Linux)
79113 if : matrix.gpu == 'vulkan' && runner.os == 'Linux'
80- run : |
81- sudo apt-get update
82- sudo apt-get install -y build-essential cmake libvulkan-dev vulkan-tools
114+ uses : jakoch/install-vulkan-sdk-action@v1.2.4
115+ with :
116+ vulkan_version : ' 1.4.313.0'
117+ install_runtime : true
118+ optional_components : com.lunarg.vulkan.arm64
119+ cache : true
120+ stripdown : true
83121
84- - name : Install CUDA toolkit (Windows)
122+ - name : Provision CUDA toolkit
85123 if : matrix.gpu == 'cuda' && runner.os == 'Windows'
86- uses : Jimver/cuda-toolkit@v0.2.11
124+ uses : ./.github/actions/provision-cuda
87125 with :
88- cuda : ' 12.2.0'
126+ version : ' 12.6.2'
127+ arch : ${{ matrix.arch }}
128+
129+ - name : Install Vulkan SDK (Windows)
130+ if : matrix.gpu == 'vulkan' && runner.os == 'Windows'
131+ uses : jakoch/install-vulkan-sdk-action@v1.2.4
132+ with :
133+ vulkan_version : ' 1.4.313.0'
134+ install_runtime : true
135+ cache : true
136+ stripdown : true
137+
138+ - name : Setup LLVM and Ninja for Windows ARM64 cross-compilation
139+ if : runner.os == 'Windows' && matrix.cross_compile == true
140+ shell : pwsh
141+ run : |
142+ # Install LLVM for cross-compilation
143+ choco install llvm ninja -y
144+
145+ # Set environment for clang cross-compilation
146+ echo "CC=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Append
147+ echo "CXX=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Append
148+ echo "CMAKE_GENERATOR=Ninja" | Out-File -FilePath $env:GITHUB_ENV -Append
89149
90150 # Build
91151 - name : Install npm dependencies
92152 run : npm install
93153
94- - name : Build native module
154+ - name : Build native module (Native builds)
155+ if : matrix.cross_compile != true
95156 run : npm run build
96157 env :
97158 LLOYAL_GPU : ${{ matrix.gpu }}
98159
160+ - name : Build native module (Windows ARM64 cross-compile)
161+ if : runner.os == 'Windows' && matrix.cross_compile == true
162+ shell : pwsh
163+ run : |
164+ # Set up cross-compilation environment
165+ $env:CMAKE_GENERATOR = "Ninja"
166+ $env:CMAKE_TOOLCHAIN_FILE = "${{ github.workspace }}/cmake/arm64-cross.cmake"
167+
168+ # Build with cross-compilation
169+ npm run build
170+ env :
171+ LLOYAL_GPU : ${{ matrix.gpu }}
172+ ARCH : arm64
173+
99174 # Package
100175 - name : Create platform package
101176 shell : bash
@@ -122,7 +197,7 @@ jobs:
122197 - name : Setup Node.js
123198 uses : actions/setup-node@v4
124199 with :
125- node-version : 20
200+ node-version : 24
126201 registry-url : ' https://registry.npmjs.org'
127202
128203 - name : Sync package versions
0 commit comments