Skip to content

Commit 397e1ce

Browse files
committed
Retry CI
1 parent 1c89d9f commit 397e1ce

3 files changed

Lines changed: 27 additions & 15 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ jobs:
5151
run: sudo bash scripts/setup-benchmark.sh
5252
- uses: ./.github/actions/setup-prebuild
5353
- uses: ./.github/actions/system-info
54-
- name: Install Mojo
54+
- name: Install Mojo SDK (optional, falls back to Rust kernels)
5555
if: contains(matrix.packages, 'vortex-array') || contains(matrix.packages, 'vortex-runend')
56+
continue-on-error: true
5657
run: |
57-
pip install --user mojo
58-
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
58+
pip install --user mojo && echo "$HOME/.local/bin" >> "$GITHUB_PATH" || echo "Mojo install failed, falling back to Rust SIMD kernels"
5959
- name: Install Codspeed
6060
uses: taiki-e/cache-cargo-install-action@66c9585ef5ca780ee69399975a5e911f47905995
6161
with:

encodings/runend/build.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn main() {
4949
let lib_path = out_dir.join("libvortex_mojo_runend.a");
5050

5151
// Compile Mojo source to object file
52-
let status = Command::new(&mojo)
52+
let Ok(status) = Command::new(&mojo)
5353
.arg("build")
5454
.arg("kernels/decode.mojo")
5555
.arg("--emit")
@@ -63,23 +63,29 @@ fn main() {
6363
.arg("-o")
6464
.arg(&obj_path)
6565
.status()
66-
.expect("failed to invoke mojo compiler");
66+
else {
67+
println!("cargo:warning=Mojo compiler failed to launch, falling back to Rust kernels");
68+
return;
69+
};
6770

6871
if !status.success() {
69-
eprintln!("Mojo compilation failed (status {status}), skipping Mojo kernels");
72+
println!("cargo:warning=Mojo compilation failed ({status}), falling back to Rust kernels");
7073
return;
7174
}
7275

7376
// Archive into a static library
74-
let ar_status = Command::new("ar")
77+
let Ok(ar_status) = Command::new("ar")
7578
.arg("rcs")
7679
.arg(&lib_path)
7780
.arg(&obj_path)
7881
.status()
79-
.expect("failed to invoke ar");
82+
else {
83+
println!("cargo:warning=ar failed to launch, falling back to Rust kernels");
84+
return;
85+
};
8086

8187
if !ar_status.success() {
82-
eprintln!("ar archiving failed, skipping Mojo kernels");
88+
println!("cargo:warning=ar archiving failed, falling back to Rust kernels");
8389
return;
8490
}
8591

vortex-array/build.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn main() {
4949
let lib_path = out_dir.join("libvortex_mojo_take.a");
5050

5151
// Compile Mojo source to object file
52-
let status = Command::new(&mojo)
52+
let Ok(status) = Command::new(&mojo)
5353
.arg("build")
5454
.arg("kernels/take.mojo")
5555
.arg("--emit")
@@ -63,23 +63,29 @@ fn main() {
6363
.arg("-o")
6464
.arg(&obj_path)
6565
.status()
66-
.expect("failed to invoke mojo compiler");
66+
else {
67+
println!("cargo:warning=Mojo compiler failed to launch, falling back to Rust kernels");
68+
return;
69+
};
6770

6871
if !status.success() {
69-
eprintln!("Mojo compilation failed (status {status}), skipping Mojo kernels");
72+
println!("cargo:warning=Mojo compilation failed ({status}), falling back to Rust kernels");
7073
return;
7174
}
7275

7376
// Archive into a static library
74-
let ar_status = Command::new("ar")
77+
let Ok(ar_status) = Command::new("ar")
7578
.arg("rcs")
7679
.arg(&lib_path)
7780
.arg(&obj_path)
7881
.status()
79-
.expect("failed to invoke ar");
82+
else {
83+
println!("cargo:warning=ar failed to launch, falling back to Rust kernels");
84+
return;
85+
};
8086

8187
if !ar_status.success() {
82-
eprintln!("ar archiving failed, skipping Mojo kernels");
88+
println!("cargo:warning=ar archiving failed, falling back to Rust kernels");
8389
return;
8490
}
8591

0 commit comments

Comments
 (0)