Repository navigation
238 lines (232 loc) · 8.2 KB
/
Copy pathrust.yml
File metadata and controls
238 lines (232 loc) · 8.2 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
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
CARGO_HOME: ${{ github.workspace }}/.cargo
jobs:
test:
runs-on: [self-hosted, linux, X64]
steps:
- uses: actions/checkout@v7
- name: Cache Cargo dependencies
uses: actions/cache@v6
with:
path: |
${{ github.workspace }}/.cargo/registry
${{ github.workspace }}/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Update branch URLs for testing
run: ./scripts/update_branch_urls.sh
- name: Check and set Rust version
run: ./scripts/check_rust_version.sh
- name: Check formatting
run: cargo fmt --check
- name: Build
run: cargo build --release --verbose
- name: Debug Test
run: |
echo "export fn main = (GBuffer([1.i32, 2.i32, 3.i32, 4.i32])!!).map(fn (val: gi32) = val + 2).read.print;" > test.ln
cargo run --release -- test.ln
- if: ${{ github.ref_name == 'main' }}
name: Run tests
run: |
rm -rf ~/.config/alan
npm install -g pnpm
cargo test --release --verbose -- --include-ignored
- if: ${{ github.ref_name != 'main' }}
name: Run tests with Node 22
run: |
rm -rf ~/.config/alan
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 22
nvm use 22
npm install -g pnpm
cargo test --release --verbose
- if: ${{ github.ref_name != 'main' }}
name: Run tests with Node 24
run: |
rm -rf ~/.config/alan
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 24
nvm use 24
npm install -g pnpm
cargo test --release --verbose
- if: ${{ github.ref_name != 'main' }}
name: Run tests with Node 26
run: |
rm -rf ~/.config/alan
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 26
nvm use 26
npm install -g pnpm
cargo test --release --verbose
- name: Run native tests
run: cargo run --release -- test alan/test.ln
- name: Run js tests with Node 22
run: |
rm -rf ~/.config/alan
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 22
nvm use 22
npm install -g pnpm
cargo run --release -- test --js alan/test.ln
- name: Run js tests with Node 24
run: |
rm -rf ~/.config/alan
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 24
nvm use 24
npm install -g pnpm
cargo run --release -- test --js alan/test.ln
- name: Run js tests with Node 26
run: |
rm -rf ~/.config/alan
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 26
nvm use 26
npm install -g pnpm
cargo run --release -- test --js alan/test.ln
- name: Rust-managed Benchmarks
run: cargo bench
- name: Build Alan-managed Benchmarks
run: cargo run --release -- compile alan/benches/bench.ln && cargo run --release -- compile alan/benches/buffer_shader_timings.ln
- name: Alan-managed Benchmarks
run: ./bench && ./buffer_shader_timings
test-windows:
runs-on: [self-hosted, windows]
steps:
- uses: actions/checkout@v7
- name: Cache Cargo dependencies
uses: actions/cache@v6
with:
path: |
${{ github.workspace }}/.cargo/registry
${{ github.workspace }}/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Update branch URLs for testing
run: ./scripts/update_branch_urls.sh
- name: Check and set Rust version
run: pwsh -File ./scripts/check_rust_version.ps1
- name: Build
run: cargo build --release --verbose
- name: Debug Test
run: |
echo "export fn main = (GBuffer([1.i32, 2.i32, 3.i32, 4.i32])!!).map(fn (val: gi32) = val + 2).read.print;" > test.ln
cargo run --release -- compile test.ln
./test
- if: ${{ github.ref_name == 'main' }}
name: Run tests
run: cargo test --release --verbose -- --include-ignored
- if: ${{ github.ref_name != 'main' }}
name: Run tests
run: cargo test --release --verbose
- name: Run native tests
run: cargo run --release -- test alan/test.ln
- name: Run js tests
run: cargo run --release -- test --js alan/test.ln
- name: Rust-managed Benchmarks
run: cargo bench
test-arm-linux:
runs-on: [self-hosted, linux, ARM64]
steps:
- uses: actions/checkout@v7
- name: Cache Cargo dependencies
uses: actions/cache@v6
with:
path: |
${{ github.workspace }}/.cargo/registry
${{ github.workspace }}/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Update branch URLs for testing
run: ./scripts/update_branch_urls.sh
- name: Check and set Rust version
run: ./scripts/check_rust_version.sh
- name: Install pnpm
run: npm install -g pnpm
- name: Build
run: cargo build --release --verbose
- name: Debug Test
run: |
echo "export fn main = (GBuffer([1.i32, 2.i32, 3.i32, 4.i32])!!).map(fn (val: gi32) = val + 2).read.print;" > test.ln
cargo run --release -- compile test.ln
./test
- if: ${{ github.ref_name == 'main' }}
name: Run tests
run: cargo test --release --verbose -- --include-ignored --nocapture
- if: ${{ github.ref_name != 'main' }}
name: Run tests
run: cargo test --release --verbose -- --nocapture
- name: Run native tests
run: cargo run --release -- test alan/test.ln
- name: Run js tests
run: cargo run --release -- test --js alan/test.ln
- name: Rust-managed Benchmarks
run: cargo bench
test-arm-macos:
runs-on: [self-hosted, macOS, ARM64]
steps:
- uses: actions/checkout@v7
- name: Cache Cargo dependencies
uses: actions/cache@v6
with:
path: |
${{ github.workspace }}/.cargo/registry
${{ github.workspace }}/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Update branch URLs for testing
run: ./scripts/update_branch_urls.sh
- name: Check and set Rust version
run: ./scripts/check_rust_version.sh
- name: Install pnpm
run: |
brew unlink pnpm 2>/dev/null || true
brew install pnpm@10
echo "$(brew --prefix pnpm@10)/bin" >> $GITHUB_PATH
- name: Node deps
run: pnpm install --frozen-lockfile && pnpm exec playwright install
- name: Start web server
run: pnpm start-server
- name: Build
run: cargo build --release --verbose
- name: Debug Test
run: |
echo "export fn main = (GBuffer([1.i32, 2.i32, 3.i32, 4.i32])!!).map(fn (val: gi32) = val + 2).read.print;" > test.ln
cargo run --release -- compile test.ln
./test
- if: ${{ github.ref_name == 'main' }}
name: Run tests
run: cargo test --release --verbose -- --include-ignored --nocapture
- if: ${{ github.ref_name != 'main' }}
name: Run tests
run: cargo test --release --verbose -- --nocapture
- if: always()
name: Stop web server
run: pnpm stop-server
- name: Run native tests
run: cargo run --release -- test alan/test.ln
- name: Run js tests
run: cargo run --release -- test --js alan/test.ln
- name: Rust-managed Benchmarks
run: cargo bench
- name: Build Alan-managed Benchmarks
run: cargo run --release -- compile alan/benches/bench.ln && cargo run --release -- compile alan/benches/buffer_shader_timings.ln
- name: Alan-managed Benchmarks
run: ./bench && ./buffer_shader_timings