Skip to content

chore(ci) : expand lib targets #47

chore(ci) : expand lib targets

chore(ci) : expand lib targets #47

name: Consumer smoke test
on:
push:
branches:
- main
pull_request:
branches:
- main
# Only fire on PRs that could affect the install layout / consumer-facing
# build. Pure src/*.rs changes are covered by the regular Tests jobs.
paths:
- 'CMakeLists.txt'
- 'cmake/**'
- 'include/**'
- 'examples/cmake-consumer/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/consumer-smoke-test.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
jobs:
consumer-smoke-test:
name: find_package(LanceC) smoke test
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
os_label: linux
target: x86_64-unknown-linux-gnu
- runner: macos-14
os_label: macos
target: aarch64-apple-darwin
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v4
- name: Load baseline floors
shell: bash
run: |
set -a
source .github/baseline.env
set +a
{
echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
echo "GLIBC_BASELINE=$GLIBC_BASELINE"
} >>"$GITHUB_ENV"
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
- name: Install protobuf-compiler (Linux)
if: matrix.os_label == 'linux'
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: Setup Zig Toolchain (Linux Only)
if: matrix.os_label == 'linux'
uses: mlugg/setup-zig@v2
with:
version: 0.13.0
- name: Install protobuf (macOS)
if: matrix.os_label == 'macos'
run: brew install protobuf
- name: Configure CMake
uses: ./.github/actions/configure-cmake
with:
target: ${{ matrix.target }}
os_label: ${{ matrix.os_label }}
- name: build + install lance-c
run: |
cmake --build build
cmake --install build --prefix "$PWD/_install"
- name: Verify GLIBC Baseline
if: matrix.os_label == 'linux'
uses: ./.github/actions/verify-glibc-baseline
with:
search_root: ${{ github.workspace }}/_install
- name: Build consumer example against the install
run: |
cmake -S examples/cmake-consumer -B consumer-build \
-DCMAKE_PREFIX_PATH="$PWD/_install" \
-DCMAKE_BUILD_TYPE=Release
cmake --build consumer-build
- name: Verify the binary links and runs (no dataset → expect usage error)
run: |
set +e
consumer-build/consumer
rc=$?
if [ "$rc" -ne 2 ]; then
echo "Expected exit code 2 (usage error), got $rc"
exit 1
fi