duckdb-extension-framework 0.3.0

Purely experimental DuckDB extension framework
Documentation
name: Rust

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always
  RUSTC_WRAPPER: sccache

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      LD_LIBRARY_PATH: ${{ github.workspace }}/duckdb/build/debug/src/

    steps:
    - uses: actions/checkout@v3
      with:
        submodules: recursive
    - uses: hendrikmuhs/ccache-action@v1.2
      with:
        variant: sccache

    - name: Build
      run: cargo build --verbose

    - run: sudo apt install ninja-build build-essential
    - run: make debug
      env:
        GEN: ninja
        DISABLE_SANITIZER: 1
      working-directory: duckdb

    - name: Compile tests
      run: cargo test --no-run --all-features

    - name: Run tests
      run: LD_PRELOAD=$(whereis libasan.so.6 | cut -d ' ' -f 2) cargo test --verbose --all-features

    - name: cleanup
      run: |
        ls
        rm -rf duckdb/*

    - working-directory: duckdb
      run: git checkout src/include/duckdb.h

    - uses: katyo/publish-crates@v1
      if: github.ref == 'refs/heads/main'
      with:
          registry-token: ${{ secrets.CARGO_TOKEN }}
          ignore-unpublished-changes: true