Skip to content

Fix sqld test (#1579) #3599

Fix sqld test (#1579)

Fix sqld test (#1579) #3599

Workflow file for this run

name: C bindings tests CI
on:
push:
branches: [ "main" ]
pull_request:
merge_group:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
c-bundle-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Generate C bundle
run: cargo xtask build-bundled
- name: Check that C bundle is up to date
run: git diff --quiet || (echo "found uncommited changes in the bundle; please run 'cargo xtask build-bundled' and commit the result" && exit 1)
c-bindings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build crates
run: cargo build --release
- name: copy lib
working-directory: bindings/c
run: cp ../../target/release/libsql_experimental.a .
- name: clean rust
run: cargo clean
- name: Build C bindings example
working-directory: bindings/c
env:
LIBSQL_EXPERIMENTAL_PATH: libsql_experimental.a
run: make