Skip to content

Commit

Permalink
ci: enable rust nightly in CI (#1966)
Browse files Browse the repository at this point in the history
We have a code path that is nightly only.
  • Loading branch information
eddyxu authored Feb 19, 2024
1 parent eaede1e commit 2a330a3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ env:

jobs:
linux-build:
runs-on:
group: large-runners
labels: ubuntu-22.04-4core
runs-on: ubuntu-22.04
timeout-minutes: 45
strategy:
matrix:
toolchain:
- stable
- nightly
defaults:
run:
working-directory: ./rust
Expand All @@ -44,19 +47,28 @@ jobs:
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
rustup component add rustfmt
- name: Run cargo fmt
run: cargo fmt --check
# split everything us so we know what's slow.
- name: Build
run: |
cargo build --all-features --tests
- name: Start DynamoDB local for tests
if: ${{ matrix.toolchain == 'stable' }}
run: |
docker run -d -e AWS_ACCESS_KEY_ID=DUMMYKEY -e AWS_SECRET_ACCESS_KEY=DUMMYKEY -p 8000:8000 amazon/dynamodb-local
- name: Run tests
if: ${{ matrix.toolchain == 'stable' }}
run: |
cargo test --features dynamodb,tensorflow,dynamodb_tests,cli
- name: Run tests (nightly)
if: ${{ matrix.toolchain != 'stable' }}
run: |
cargo test
- name: Build benchmarks
if: ${{ matrix.toolchain == 'stable' }}
run: cargo build --benches
linux-arm:
runs-on: buildjet-4vcpu-ubuntu-2204-arm
Expand Down Expand Up @@ -99,13 +111,16 @@ jobs:
mac-build:
runs-on: "macos-14"
timeout-minutes: 45
strategy:
matrix:
toolchain:
- stable
- nightly
defaults:
run:
working-directory: ./rust/lance
steps:
- uses: actions/checkout@v4
- name: CPU features
run: sysctl -a | grep cpu
- uses: Swatinem/rust-cache@v2
with:
workspaces: rust
Expand Down
2 changes: 1 addition & 1 deletion rust/lance-index/src/vector/pq/distance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub(super) fn compute_l2_distance<const C: usize, const V: usize>(
}
}
}
#[cfg(not(any(feature = "nightly", target_feature = "avx512f")))]
#[cfg(not(all(feature = "nightly", target_feature = "avx512f")))]
{
let s = c[vec_start + i..]
.iter()
Expand Down

0 comments on commit 2a330a3

Please sign in to comment.