Skip to content

Commit

Permalink
💚 Set correct LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D committed Oct 29, 2023
1 parent cb002b8 commit 26edfb9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ jobs:

- name: Install Firebird
run: |
sudo apt-get install libtommath1 libncurses5
sudo apt-get install libtommath1 libncurses5 musl-dev gcc
sudo ln -sf /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0
sudo ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
wget -nv -O Firebird-3.0.10.33601-0.amd64.tar.gz "https://github.com/FirebirdSQL/firebird/releases/download/v3.0.10/Firebird-3.0.10.33601-0.amd64.tar.gz"
tar xzvf Firebird-3.0.10.33601-0.amd64.tar.gz
(cd Firebird-3.0.10.33601-0.amd64; sudo ./install.sh -silent)
Expand All @@ -45,11 +46,12 @@ jobs:
sudo chown -R firebird:firebird .
while ! nc -z localhost 3050; do sleep 1 ; done
sleep 2
ldconfig -p | grep libfbclient
- name: Tests
run: |
sudo mkdir coverage
sudo chown -R firebird:firebird coverage
sudo chmod -R 777 coverage
sg firebird -c "yarn global add env-cmd; env-cmd -f /opt/firebird/SYSDBA.password yarn test"
sg firebird -c "yarn global add env-cmd; LD_LIBRARY_PATH=/usr/lib64 env-cmd -f /opt/firebird/SYSDBA.password yarn test"
bash <(curl -s https://codecov.io/bash)
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ class Client_Firebird extends Client {
async acquireRawConnection() {
assert(!this._connectionForTransactions);

// FIREBIRD_HOST="fsdm.farmsoft.cz"
// FIREBIRD_PORT="3050"
// FIREBIRD_USER="SYSDBA"
// FIREBIRD_PASSWORD="AgrosofT"
// FIREBIRD_POOL_SIZE="1"
// FIREBIRD_KRONOS_PATH="/var/lib/firebird/3.0/data/kronos/kronos.fdb"

/** @type {import('node-firebird-driver-native').Client} client */
const client = this.driver.createNativeClient(this.config.libraryPath || this._driver().getDefaultLibraryFilename())
const databasePath = this.config.connection.database || this.config.connection.path
Expand Down
1 change: 1 addition & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const generateConfig = () => ({
pool: { min: 1, max: 1 },
createDatabaseIfNotExists: true,
debug: false,
libraryPath: process.env.LIBRARY_PATH
});

describe("Basic operations", () => {
Expand Down

0 comments on commit 26edfb9

Please sign in to comment.