-
-
Notifications
You must be signed in to change notification settings - Fork 2
186 lines (149 loc) · 5.71 KB
/
ci.yml
File metadata and controls
186 lines (149 loc) · 5.71 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
name: Rust CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
lint:
name: fmt + clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy (default features, no LLVM)
run: cargo clippy --workspace --all-targets
native-platform-tests:
name: native tests (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
- os: windows-2025
target: x86_64-pc-windows-msvc
- os: macos-15-intel
target: x86_64-apple-darwin
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
with:
key: native-${{ matrix.target }}
- name: Show Rust host and target
run: rustc -vV
- name: Run workspace tests
env:
RUST_MIN_STACK: 134217728
run: cargo test --workspace --lib --bins --tests --target ${{ matrix.target }}
backend-feature-matrix:
name: backend features (${{ matrix.lane }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- lane: default
cargo_features: ""
- lane: llvm-backend
cargo_features: "--features llvm-backend"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Install LLVM 21 (llvm-backend lane only)
if: matrix.lane == 'llvm-backend'
run: |
wget -qO llvm.sh https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21 all
echo "LLVM_SYS_211_PREFIX=/usr/lib/llvm-21" >> "$GITHUB_ENV"
- name: Build zynml for selected backend lane
run: cargo check -p zynml ${{ matrix.cargo_features }}
- name: Run runtime-profile smoke test for selected backend lane
run: |
RUST_MIN_STACK=134217728 cargo test -p zynml ${{ matrix.cargo_features }} --test e2e_tests runtime::test_runtime_profile_tiered_development -- --nocapture
parse-conformance:
name: parse conformance
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run docs snippet parse conformance
run: |
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests docs_conformance:: -- --nocapture
- name: Run examples parse regression suite
run: |
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests examples_regression:: -- --nocapture
type-lowering-conformance:
name: type + lowering conformance
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run Grammar2 typed parsing conformance
run: |
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests grammar2_parsing:: -- --nocapture
- name: Run type-system conformance
run: |
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests type_system:: -- --nocapture
- name: Run lowering/runtime cast conformance
run: |
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests execution::test_execute_implicit_numeric_casts_in_assignments -- --nocapture
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests execution::test_execute_implicit_numeric_casts_in_call_args -- --nocapture
simd-contract:
name: SIMD contract (Cranelift)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run Cranelift SIMD vector contract tests
run: cargo test -p zyntax_compiler --test cranelift_backend_tests vector_ -- --nocapture
runtime-smoke:
name: runtime smoke
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run runtime smoke tests
run: |
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests execution::test_execute_simple_expression -- --nocapture
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests execution::test_execute_prelude_only_example -- --nocapture
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests runtime::test_runtime_profile_tiered_development -- --nocapture
RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests runtime::test_runtime_event_capture_render_and_stream -- --nocapture