@@ -124,8 +124,102 @@ jobs:
124124 name : dria-node-${{ matrix.osname }}-${{ matrix.arch }}
125125 path : dria-node-${{ matrix.osname }}-${{ matrix.arch }}${{ matrix.extension }}
126126
127+ build-cuda :
128+ runs-on : ${{ matrix.runner }}
129+ strategy :
130+ matrix :
131+ include :
132+ - {
133+ runner : ubuntu-latest,
134+ osname : linux,
135+ arch : amd64-cuda,
136+ target : x86_64-unknown-linux-gnu,
137+ cuda : " 12.6.3" ,
138+ }
139+ - {
140+ runner : windows-latest,
141+ osname : windows,
142+ arch : amd64-cuda,
143+ target : x86_64-pc-windows-msvc,
144+ cuda : " 12.6.3" ,
145+ extension : " .exe" ,
146+ }
147+
148+ steps :
149+ - name : Checkout code
150+ uses : actions/checkout@v4
151+ with :
152+ ref : ${{ env.RELEASE_TAG }}
153+
154+ - name : Install CUDA toolkit
155+ uses : Jimver/cuda-toolkit@v0.2.19
156+ with :
157+ cuda : ${{ matrix.cuda }}
158+ method : network
159+
160+ - name : Install build dependencies (Linux)
161+ if : matrix.osname == 'linux'
162+ run : sudo apt-get update && sudo apt-get install -y cmake
163+
164+ - name : Install Rust toolchain
165+ uses : dtolnay/rust-toolchain@stable
166+
167+ - name : Build binary with CUDA
168+ run : cargo build --bin dria-node --release --target ${{ matrix.target }} --features cuda
169+
170+ - name : Strip binary (Linux)
171+ if : matrix.osname == 'linux'
172+ run : strip target/${{ matrix.target }}/release/dria-node
173+
174+ - name : Prepare Release File
175+ shell : bash
176+ run : |
177+ mv target/${{ matrix.target }}/release/dria-node${{ matrix.extension }} ./dria-node-${{ matrix.osname }}-${{ matrix.arch }}${{ matrix.extension }}
178+
179+ - name : Upload Launch Artifacts
180+ uses : actions/upload-artifact@v4
181+ with :
182+ name : dria-node-${{ matrix.osname }}-${{ matrix.arch }}
183+ path : dria-node-${{ matrix.osname }}-${{ matrix.arch }}${{ matrix.extension }}
184+
185+ build-rocm :
186+ runs-on : ubuntu-22.04
187+
188+ steps :
189+ - name : Checkout code
190+ uses : actions/checkout@v4
191+ with :
192+ ref : ${{ env.RELEASE_TAG }}
193+
194+ - name : Install ROCm HIP SDK
195+ run : |
196+ wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/rocm.gpg
197+ echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.3.3 jammy main" | sudo tee /etc/apt/sources.list.d/rocm.list
198+ echo 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
199+ sudo apt-get update
200+ sudo apt-get install -y --no-install-recommends cmake hip-dev rocm-hip-runtime-dev
201+
202+ - name : Install Rust toolchain
203+ uses : dtolnay/rust-toolchain@stable
204+
205+ - name : Build binary with ROCm
206+ run : cargo build --bin dria-node --release --target x86_64-unknown-linux-gnu --features rocm
207+
208+ - name : Strip binary
209+ run : strip target/x86_64-unknown-linux-gnu/release/dria-node
210+
211+ - name : Prepare Release File
212+ run : |
213+ mv target/x86_64-unknown-linux-gnu/release/dria-node ./dria-node-linux-amd64-rocm
214+
215+ - name : Upload Launch Artifacts
216+ uses : actions/upload-artifact@v4
217+ with :
218+ name : dria-node-linux-amd64-rocm
219+ path : dria-node-linux-amd64-rocm
220+
127221 release :
128- needs : build
222+ needs : [ build, build-cuda, build-rocm]
129223 runs-on : ubuntu-latest
130224
131225 steps :
0 commit comments