This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
209 lines (169 loc) · 5.1 KB
/
build.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: Build Project
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, x86]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies (React)
run: npm install
- name: Build React
run: npm run build
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build Backend (Rust)
run: cargo build --verbose
working-directory: backend/
windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies (React)
run: npm install
- name: Build React
run: npm run build
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build Backend (Rust)
run: cargo build --verbose
working-directory: backend/
macos:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies (React)
run: npm install
- name: Build React
run: npm run build
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
run: cargo build --verbose
working-directory: backend/
cuda:
name: Build with CUDA support
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies (React)
run: npm install
- name: Build React
run: npm run build
- uses: Jimver/[email protected]
name: Install CUDA toolkit on Linux
if: matrix.os == 'ubuntu-latest'
id: cuda-toolkit-linux
with:
cuda: "12.2.0"
method: "network"
non-cuda-sub-packages: '["libcublas","libcublas-dev"]'
sub-packages: '["nvcc","compiler","libraries","libraries-dev","cudart","cudart-dev"]'
- uses: Jimver/[email protected]
name: Install CUDA toolkit on Windows
if: matrix.os == 'windows-latest'
id: cuda-toolkit-windows
with:
cuda: "12.2.0"
method: "local"
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build with CUDA
run: cargo build --verbose --features cublas
working-directory: backend/
opencl:
name: Build with OpenCL support
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies (React)
run: npm install
- name: Build React
run: npm run build
- name: Install CLBlast on linux
if: matrix.os == 'ubuntu-latest'
run: sudo apt install libclblast-dev
- name: Install vcpkg on windows
if: matrix.os == 'windows-latest'
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
ls -la
shell: bash
- name: Install OpenCL on windows
if: matrix.os == 'windows-latest'
run: |
${{ github.workspace }}\vcpkg\vcpkg.exe install opencl:x64-windows
shell: pwsh
- name: Install CLBlast on windows
if: matrix.os == 'windows-latest'
run: |
${{ github.workspace }}\vcpkg\vcpkg.exe install clblast:x64-windows
shell: pwsh
- name: Set Windows Environment Variables
if: matrix.os == 'windows-latest'
run: |
echo "CLBLAST_PATH=${{ github.workspace }}/vcpkg/packages/clblast_x64-windows" >> $GITHUB_ENV
echo "OPENCL_PATH=${{ github.workspace }}/vcpkg/packages/opencl_x64-windows" >> $GITHUB_ENV
echo "${{ github.workspace }}/vcpkg/packages/clblast_x64-windows/bin" >> $GITHUB_PATH
echo "${{ github.workspace }}/vcpkg/packages/opencl_x64-windows/bin" >> $GITHUB_PATH
shell: bash
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build with OpenCL
run: cargo build --verbose --features clblast
working-directory: backend/