diff --git a/.github/workflows/run_spicebench.yml b/.github/workflows/run_spicebench.yml index be0bb723..9436ac6e 100644 --- a/.github/workflows/run_spicebench.yml +++ b/.github/workflows/run_spicebench.yml @@ -26,9 +26,9 @@ jobs: - name: pull spidapter image run: docker pull ghcr.io/spiceai/spidapter:latest - - name: Cache spicebench binary + - name: Restore spicebench cache id: cache-spicebench - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: ~/.spice/bin/spicebench key: spicebench-${{ runner.os }}-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', '**/*.rs') }} @@ -43,15 +43,23 @@ jobs: cache: false - name: Build spicebench + id: build-spicebench if: steps.cache-spicebench.outputs.cache-hit != 'true' run: | mkdir -p ~/.spice/bin cargo build -p spicebench install -m 755 target/debug/spicebench ~/.spice/bin/spicebench + - name: Save spicebench cache + if: steps.build-spicebench.outcome == 'success' + uses: actions/cache/save@v4 + with: + path: ~/.spice/bin/spicebench + key: spicebench-${{ runner.os }}-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', '**/*.rs') }} + - name: Run spicebench env: - SPICEAI_API_KEY: ${{ secrets.SPICEAI_API_KEY }} + SPICEAI_API_KEY: ${{ env.SPICEAI_API_KEY }} SPICE_CLOUD_API_URL: https://dev-api.spice.ai RUSTFLAGS: "-A warnings" run: | @@ -59,4 +67,4 @@ jobs: --concurrency 2 \ --query-set tpch \ --system-adapter-stdio-cmd docker \ - --system-adapter-stdio-args "run ghcr.io/spiceai/spidapter:latest -e SPICEAI_API_KEY -e SPICE_CLOUD_API_URL run stdio --verbose" + --system-adapter-stdio-args "run -i -e SPICEAI_API_KEY -e SPICE_CLOUD_API_URL ghcr.io/spiceai/spidapter:latest stdio --verbose" diff --git a/src/main.rs b/src/main.rs index 02dea046..e2fad068 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,20 +65,21 @@ async fn main() -> anyhow::Result<()> { }; #[expect(unused_variables)] - let adbc_conn = + let adbc_conn: Option = match AdbcConnection::create(&adbc_driver.driver.to_string(), adbc_driver.db_kwargs) { Ok(conn) => { println!( "ADBC connection established (driver: {})", adbc_driver.driver ); - conn + Some(conn) } Err(e) => { - return Err(anyhow::anyhow!( + eprintln!( "Failed to create ADBC connection for driver {}: {e}", adbc_driver.driver - )); + ); + None } };