Skip to content

Merge pull request #38 from chdb-io/feat/guard-engine-pin #103

Merge pull request #38 from chdb-io/feat/guard-engine-pin

Merge pull request #38 from chdb-io/feat/guard-engine-pin #103

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
# Seconds, and ahead of the build, because a pin that disagrees with itself
# makes everything after it a test of an engine nobody chose.
engine_pin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: .github/scripts/check-engine-pin.sh
build:
# Not merely ordered before the build — a gate on it. Without this the two run
# side by side, and a disagreeing pin still downloads an engine, links against
# it and reports test results for it, which is exactly the misleading outcome
# the check exists to prevent.
needs: engine_pin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch library
run: |
bash update_libchdb.sh --local
sudo mv libchdb.so /usr/lib/libchdb.so
sudo ldconfig
- name: Check formatting
run: cargo fmt --check
- name: Check clippy
run: cargo clippy --all-targets --all-features -- --deny warnings
- name: Build
run: cargo build --verbose
env:
RUST_BACKTRACE: full
- name: Run tests
run: cargo test -- --test-threads=1
env:
RUST_BACKTRACE: full