Skip to content

Commit

Permalink
CI: add debug binary
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandreyc committed May 15, 2024
1 parent 4117114 commit 39f9d5e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,13 @@ jobs:
if: matrix.os == 'macos-13'
run: |
echo "DYLD_LIBRARY_PATH=/usr/local/opt/sqlite/lib:${{ github.workspace }}/build/lib:$DYLD_LIBRARY_PATH" >> "$GITHUB_ENV"
- name: Debug print
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" /v LoadAppInit_DLLs
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" /v LoadAppInit_DLLs /t REG_DWORD /d 1 /f
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" /v LoadAppInit_DLLs
bcdedit /?
- name: Install DLLs
if: matrix.os == 'windows-latest'
run: |
cp ../build/driver/sqlite/Debug/*.dll "/C/Windows/System32/"
cp ../build/driver/postgresql/Debug/*.dll "/C/Windows/System32/"
- name: Run debug binary
run: cargo run --example debug --all-features -vvv
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings
- name: Test
Expand Down
16 changes: 16 additions & 0 deletions rust/core/examples/debug.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use adbc_core::{driver_manager::ManagedDriver, options::AdbcVersion};

fn main() {
let mut _driver =
ManagedDriver::load_dynamic_from_name("adbc_driver_sqlite", None, AdbcVersion::V100);

if let Err(err) = _driver {
println!("{:?}", err);
} else {
println!("OK!")
}
// let opts = [(OptionDatabase::Uri, ":memory:".into())];
// let mut database = driver.new_database_with_opts(opts)?;
// let mut connection = database.new_connection()?;
// let mut statement = connection.new_statement()?;
}

0 comments on commit 39f9d5e

Please sign in to comment.