Skip to content

fix: Prevent DB.Connect from panicking with P2P disabled #1527

fix: Prevent DB.Connect from panicking with P2P disabled

fix: Prevent DB.Connect from panicking with P2P disabled #1527

# Copyright 2026 Democratized Data Foundation
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.
name: Build and Test C Shared Library (Linux)
on:
pull_request:
branches:
- master
- develop
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- master
- develop
defaults:
run:
shell: bash
jobs:
build-c-shared-linux:
name: Build and test Linux C shared library
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Go environment
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
check-latest: true
cache: false
- name: Build Go modules
run: make deps:modules
- name: Build Linux C shared library
run: |
chmod +x tools/scripts/build-c-shared-linux.sh
make build-c-shared-linux
- name: Compile C test program
run: gcc -o c_test tests/c/basic_test.c -I./build -L./build -ldefradb
- name: Run C test program
run: LD_LIBRARY_PATH=./build ./c_test