Skip to content

Commit b61c37a

Browse files
Merge branch 'develop' into ji/tpch-runner-bump
2 parents f146f75 + 3877839 commit b61c37a

File tree

6 files changed

+75
-33
lines changed

6 files changed

+75
-33
lines changed

.github/actions/setup-rust/action.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,40 @@ inputs:
1919
runs:
2020
using: "composite"
2121
steps:
22-
- name: Rust Version
23-
id: rust-version
22+
- name: Resolve Toolchain Config
23+
id: toolchain-config
2424
shell: bash
25-
run: echo "version=$(cat rust-toolchain.toml | grep channel | awk -F'\"' '{print $2}')" >> $GITHUB_OUTPUT
25+
run: |
26+
DEFAULT_VERSION=$(grep channel rust-toolchain.toml | awk -F'"' '{print $2}')
27+
TOOLCHAIN="${TOOLCHAIN_OVERRIDE:-$DEFAULT_VERSION}"
28+
echo "toolchain=$TOOLCHAIN" >> $GITHUB_OUTPUT
29+
echo "targets=$TARGETS" >> $GITHUB_OUTPUT
30+
env:
31+
TOOLCHAIN_OVERRIDE: ${{ inputs.toolchain }}
32+
TARGETS: ${{ inputs.targets }}
2633

2734
- name: Install Mold
2835
if: runner.os == 'Linux'
2936
uses: rui314/setup-mold@v1
3037

3138
- name: Rust Toolchain
3239
id: rust-toolchain
33-
uses: dtolnay/rust-toolchain@master
40+
uses: dtolnay/rust-toolchain@stable
3441
if: steps.rustup-cache.outputs.cache-hit != 'true'
3542
with:
36-
toolchain: "${{ inputs.toolchain || steps.rust-version.outputs.version }}"
37-
targets: "${{inputs.targets || ''}}"
43+
toolchain: "${{ steps.toolchain-config.outputs.toolchain }}"
44+
targets: "${{ steps.toolchain-config.outputs.targets }}"
3845
components: "${{ inputs.components || 'clippy, rustfmt' }}"
3946

4047
- name: Rust Dependency Cache
4148
uses: Swatinem/rust-cache@v2
4249
with:
4350
save-if: ${{ github.ref_name == 'develop' }}
44-
shared-key: "rust-cache-${{ runner.os }}-${{ runner.arch }}-${{ runner.environment }}"
51+
shared-key: "rust-cache-${{ runner.os }}-${{ runner.arch }}-${{ runner.environment }}-${{ steps.toolchain-config.outputs.toolchain }}-${{ steps.toolchain-config.outputs.targets }}"
4552

4653
- name: Rust Compile Cache
4754
uses: mozilla-actions/sccache-action@v0.0.9
4855

49-
- name: Export Path
50-
shell: bash
51-
run: echo "PATH=$PATH" >> $GITHUB_ENV
52-
5356
- name: Install Protoc (for lance-encoding build step)
5457
if: runner.os != 'Windows'
5558
uses: arduino/setup-protoc@v3

.github/workflows/ci.yml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717
issues: write # audit-check creates issues
1818

1919
env:
20-
CARGO_TERM_COLOR: always
20+
CARGO_TERM_COLOR: auto
2121
RUST_BACKTRACE: 1
2222

2323
jobs:
@@ -44,10 +44,22 @@ jobs:
4444
4545
python-lint:
4646
name: "Python (lint)"
47-
runs-on: ubuntu-latest
47+
runs-on:
48+
- runs-on=${{ github.run_id }}
49+
- family=m7i+m7i-flex+m7a
50+
- cpu=16
51+
- image=ubuntu24-full-x64
52+
- extras=s3-cache
53+
- tag=python-lint
4854
timeout-minutes: 120
4955
steps:
56+
- uses: runs-on/action@v2
57+
with:
58+
sccache: s3
5059
- uses: actions/checkout@v6
60+
- uses: ./.github/actions/setup-rust
61+
with:
62+
repo-token: ${{ secrets.GITHUB_TOKEN }}
5163
- name: Install uv
5264
uses: spiraldb/actions/.github/actions/setup-uv@0.18.5
5365
with:
@@ -64,11 +76,20 @@ jobs:
6476

6577
python-test:
6678
name: "Python (test)"
67-
runs-on: ubuntu-latest
79+
runs-on:
80+
- runs-on=${{ github.run_id }}
81+
- family=m7i+m7i-flex+m7a
82+
- cpu=16
83+
- image=ubuntu24-full-x64
84+
- extras=s3-cache
85+
- tag=python-test
6886
timeout-minutes: 120
6987
env:
7088
RUST_LOG: "info,uv=debug"
7189
steps:
90+
- uses: runs-on/action@v2
91+
with:
92+
sccache: s3
7293
- uses: actions/checkout@v6
7394
- uses: ./.github/actions/setup-rust
7495
with:
@@ -81,7 +102,7 @@ jobs:
81102

82103
- name: Pytest - Vortex
83104
run: |
84-
uv run --all-packages pytest --benchmark-disable test/
105+
uv run --all-packages pytest --benchmark-disable -n auto test/
85106
working-directory: vortex-python/
86107

87108
- name: Pytest Benchmarks - Vortex
@@ -256,7 +277,9 @@ jobs:
256277
- name: Rust Lint - Format
257278
run: cargo +nightly fmt --all --check
258279
- name: Rustc check
259-
run: cargo check --locked --all-features --all-targets
280+
run: RUSTFLAGS="-D warnings" cargo check --locked --all-features --all-targets
281+
- name: Rustc check (release)
282+
run: RUSTFLAGS="-D warnings" cargo check --locked --all-features --all-targets --release
260283
- name: Rust Lint - Clippy All Features
261284
run: cargo clippy --locked --all-features --all-targets -- -D warnings
262285
- name: Rust Lint - Clippy Default Features
@@ -302,7 +325,7 @@ jobs:
302325
runs-on:
303326
- runs-on=${{ github.run_id }}
304327
- family=m7i+m7i-flex+m7a
305-
- cpu=8
328+
- cpu=16
306329
- image=ubuntu24-full-x64
307330
- extras=s3-cache
308331
- tag=rust-coverage
@@ -368,7 +391,7 @@ jobs:
368391
runs-on:
369392
- runs-on=${{ github.run_id }}
370393
- family=m7i+m7i-flex+m7a
371-
- cpu=8
394+
- cpu=16
372395
- image=ubuntu24-full-x64
373396
- extras=s3-cache
374397
- tag=rust-test-sanitizer
@@ -392,6 +415,7 @@ jobs:
392415
uses: aminya/setup-cpp@v1
393416
with:
394417
compiler: llvm
418+
cache-tools: true
395419
- uses: ./.github/actions/setup-rust
396420
with:
397421
repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -473,9 +497,18 @@ jobs:
473497

474498
build-java:
475499
name: "Java"
476-
runs-on: ubuntu-latest
500+
runs-on:
501+
- runs-on=${{ github.run_id }}
502+
- family=m7i+m7i-flex+m7a
503+
- cpu=16
504+
- image=ubuntu24-full-x64
505+
- extras=s3-cache
506+
- tag=java
477507
timeout-minutes: 120
478508
steps:
509+
- uses: runs-on/action@v2
510+
with:
511+
sccache: s3
479512
- uses: actions/checkout@v6
480513
- uses: actions/setup-java@v5
481514
with:

vortex-array/src/arrays/dict/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use vortex_dtype::PType;
77
use vortex_dtype::match_each_integer_ptype;
88
use vortex_error::VortexExpect;
99
use vortex_error::VortexResult;
10-
use vortex_error::VortexUnwrap;
1110
use vortex_error::vortex_bail;
1211
use vortex_error::vortex_ensure;
1312
use vortex_mask::AllOr;
@@ -81,6 +80,7 @@ impl DictArray {
8180

8281
#[cfg(debug_assertions)]
8382
{
83+
use vortex_error::VortexUnwrap;
8484
self.validate_all_values_referenced().vortex_unwrap()
8585
}
8686

vortex-array/src/expr/vtable.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ use vortex_dtype::DType;
1515
use vortex_error::VortexExpect;
1616
use vortex_error::VortexResult;
1717
use vortex_error::vortex_bail;
18-
use vortex_error::vortex_ensure;
1918
use vortex_error::vortex_err;
2019
use vortex_vector::Vector;
2120
use vortex_vector::VectorOps;
22-
use vortex_vector::vector_matches_dtype;
2321

2422
use crate::ArrayRef;
2523
use crate::expr::ExprId;
@@ -318,11 +316,15 @@ impl<V: VTable> DynExprVTable for VTableAdapter<V> {
318316

319317
// In debug mode, validate that the output dtype matches the expected return dtype.
320318
#[cfg(debug_assertions)]
321-
vortex_ensure!(
322-
vector_matches_dtype(&result, &expected_dtype),
323-
"Expression execution invalid for dtype {}",
324-
expected_dtype
325-
);
319+
{
320+
use vortex_error::vortex_ensure;
321+
use vortex_vector::vector_matches_dtype;
322+
vortex_ensure!(
323+
vector_matches_dtype(&result, &expected_dtype),
324+
"Expression execution invalid for dtype {}",
325+
expected_dtype
326+
);
327+
}
326328

327329
Ok(result)
328330
}

vortex-buffer/benches/vortex_bitbuffer.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,15 @@ impl FromIterator<bool> for Arrow<BooleanBuffer> {
2626

2727
const INPUT_SIZE: &[usize] = &[128, 1024, 2048, 16_384, 65_536];
2828

29-
#[divan::bench(
30-
types = [Arrow<BooleanBuffer>, BitBuffer],
31-
args = INPUT_SIZE,
32-
)]
33-
fn from_iter<B: FromIterator<bool>>(n: usize) {
34-
B::from_iter((0..n).map(|i| i % 2 == 0));
29+
#[cfg(not(codspeed))]
30+
#[divan::bench(args = INPUT_SIZE)]
31+
fn from_iter_arrow(n: usize) {
32+
Arrow::<BooleanBuffer>::from_iter((0..n).map(|i| i % 2 == 0));
33+
}
34+
35+
#[divan::bench(args = INPUT_SIZE)]
36+
fn from_iter_bit_buffer(n: usize) {
37+
BitBuffer::from_iter((0..n).map(|i| i % 2 == 0));
3538
}
3639

3740
#[divan::bench(args = INPUT_SIZE)]

vortex-python/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ dev = [
7272
"pcodec>=0.3.3",
7373
"pyarrow-stubs>=17.16",
7474
"pytest-benchmark>=5.1.0",
75+
"pytest-xdist>=3.5.0",
7576
]

0 commit comments

Comments
 (0)