Skip to content

Add Request (BLR) API #176

Add Request (BLR) API

Add Request (BLR) API #176

Workflow file for this run

name: CI and Deploy Docs
on:
push:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
packages: write
jobs:
clang-format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format-20
- name: Check clang-format
run: |
./check-format.sh
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
- name: static
buildSharedLibs: 'OFF'
triplet: x64-linux
- name: dynamic
buildSharedLibs: 'ON'
triplet: x64-linux-dynamic
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v5
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-v4-${{ matrix.variant.name }}-${{ matrix.variant.triplet }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'CMakePresets.json', 'cmake/triplets/*.cmake') }}
restore-keys: |
${{ runner.os }}-vcpkg-v4-${{ matrix.variant.name }}-${{ matrix.variant.triplet }}-
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
autoconf \
autoconf-archive \
automake \
libtool \
libtool-bin \
doxygen \
graphviz \
ninja-build \
libtommath1 \
libtomcrypt1 \
mono-complete
- name: Install Firebird
run: |
wget -nv -O Firebird-5.0.3.1683-0-linux-x64.tar.gz \
"https://github.com/FirebirdSQL/firebird/releases/download/v5.0.3/Firebird-5.0.3.1683-0-linux-x64.tar.gz"
tar xzf Firebird-5.0.3.1683-0-linux-x64.tar.gz
(cd Firebird-5.0.3.1683-0-linux-x64 && sudo ./install.sh -silent)
- name: Configure Firebird
run: |
sudo systemctl stop firebird
echo "alter user SYSDBA password 'masterkey';" | \
sudo /opt/firebird/bin/isql employee -user SYSDBA -q
sudo systemctl start firebird
- name: Bootstrap vcpkg
run: |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Configure CMake
run: |
cp CMakeUserPresets.json.posix.template CMakeUserPresets.json
cmake --preset default -DBUILD_SHARED_LIBS=${{ matrix.variant.buildSharedLibs }} -DVCPKG_TARGET_TRIPLET=${{ matrix.variant.triplet }}
- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: vcpkg-logs-${{ github.job }}-${{ matrix.variant.name }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore
- name: Build
run: |
cmake --build --preset default
- name: Run tests
run: |
ctest --preset default --output-on-failure -j8
- name: Build documentation
if: matrix.variant.name == 'dynamic'
run: |
cmake --build --preset default --target docs
- name: Upload documentation artifact
if: matrix.variant.name == 'dynamic'
uses: actions/upload-pages-artifact@v4
with:
path: build/Debug/doc/docs/html
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
variant:
- name: static
buildSharedLibs: 'OFF'
triplet: x64-windows-static-md
- name: dynamic
buildSharedLibs: 'ON'
triplet: x64-windows
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v5
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-v4-${{ matrix.variant.name }}-${{ matrix.variant.triplet }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'CMakePresets.json', 'cmake/triplets/*.cmake') }}
restore-keys: |
${{ runner.os }}-vcpkg-v4-${{ matrix.variant.name }}-${{ matrix.variant.triplet }}-
- name: Install Firebird
shell: cmd
run: |
set FB_ZIP=Firebird-5.0.3.1683-0-windows-x64.zip
powershell Invoke-WebRequest ^
"https://github.com/FirebirdSQL/firebird/releases/download/v5.0.3/$env:FB_ZIP" -OutFile "$env:FB_ZIP"
7z x -oC:\Firebird %FB_ZIP%
- name: Configure Firebird
shell: cmd
run: |
echo create user SYSDBA password 'masterkey'; ^
| "C:\Firebird\isql.exe" employee -user SYSDBA -q
- name: Start Firebird Server
shell: cmd
working-directory: C:\Firebird
run: |
call install_service.bat
- name: Bootstrap vcpkg
shell: cmd
run: |
vcpkg\bootstrap-vcpkg.bat -disableMetrics
- name: Configure CMake
shell: cmd
run: |
copy CMakeUserPresets.json.windows-vs2026.template CMakeUserPresets.json
cmake --preset default -DBUILD_SHARED_LIBS=${{ matrix.variant.buildSharedLibs }} -DVCPKG_TARGET_TRIPLET=${{ matrix.variant.triplet }}
- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: vcpkg-logs-${{ github.job }}-${{ matrix.variant.name }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore
- name: Build
shell: cmd
run: |
cmake --build --preset default
- name: Run tests
shell: cmd
run: |
ctest --preset default --output-on-failure -j8
build-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
variant:
- name: static
buildSharedLibs: 'OFF'
triplet: arm64-osx
- name: dynamic
buildSharedLibs: 'ON'
triplet: arm64-osx-dynamic
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v5
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-v4-${{ matrix.variant.name }}-${{ matrix.variant.triplet }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'CMakePresets.json', 'cmake/triplets/*.cmake') }}
restore-keys: |
${{ runner.os }}-vcpkg-v4-${{ matrix.variant.name }}-${{ matrix.variant.triplet }}-
- name: Install system dependencies
run: |
brew install \
autoconf \
autoconf-archive \
automake \
libtool \
mono \
llvm
- name: Install Firebird
run: |
wget -nv -O Firebird-5.0.3.1683-0-macos-arm64.pkg \
"https://github.com/FirebirdSQL/firebird/releases/download/v5.0.3/Firebird-5.0.3.1683-0-macos-arm64.pkg"
sudo installer -verbose -pkg Firebird-5.0.3.1683-0-macos-arm64.pkg -target /
- name: Configure Firebird
run: |
sudo launchctl unload /Library/LaunchDaemons/org.firebird.gds.plist
echo "alter user SYSDBA password 'masterkey';" | \
sudo /Library/Frameworks/Firebird.framework/Versions/A/Resources/bin/isql employee -user SYSDBA -q
sudo launchctl load /Library/LaunchDaemons/org.firebird.gds.plist
- name: Bootstrap vcpkg
run: |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Add LLVM tools to PATH
if: runner.os == 'MacOS'
run: echo "$(brew --prefix llvm)/bin" >> "$GITHUB_PATH"
- name: Configure CMake
run: |
cp CMakeUserPresets.json.posix.template CMakeUserPresets.json
cmake --preset default -DBUILD_SHARED_LIBS=${{ matrix.variant.buildSharedLibs }} -DVCPKG_TARGET_TRIPLET=${{ matrix.variant.triplet }}
- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: vcpkg-logs-${{ github.job }}-${{ matrix.variant.name }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore
- name: Build
run: |
cmake --build --preset default
- name: Run tests
run: |
# Parallel test execution on macOS often causes failures in EventListener tests
ctest --preset default --output-on-failure
deploy-docs:
if: github.repository == 'asfernandes/fb-cpp' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- clang-format-check
- build-linux
- build-windows
- build-macos
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4