Skip to content

Use Firebird client from vcpkg #28

Use Firebird client from vcpkg

Use Firebird client from vcpkg #28

Workflow file for this run

name: Pull Request
on:
pull_request:
branches:
- main
jobs:
clang-format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format
- name: Check clang-format
run: |
./check-format.sh
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/Release/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- 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
- 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)
# FIXME:
#- name: Debug
# uses: fawazahmed0/action-debug@main
# with:
# credentials: "user:${{ secrets.DEBUG }}"
- 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: |
./gen-linux-x64-release.sh
- name: Show vcpkg failure logs
if: failure()
shell: bash
run: |
echo "VCPKG failure detected. Dumping logs..."
find "vcpkg/buildtrees" -type f -name '*.log' -print0 | \
while IFS= read -r -d '' file; do
echo "::group::$file"
cat "$file"
echo "::endgroup::"
done
- name: Build Release targets
run: |
cmake --build build/Release
- name: Run tests
run: |
export ISC_USER=sysdba
export ISC_PASSWORD=masterkey
export FBCPP_TEST_SERVER=localhost
export FBCPP_TEST_DIR=/tmp
./build/Release/out/bin/fb-cpp-test --log_level=all
- name: Build documentation
run: |
cmake --build build/Release --target docs
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- 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%
# FIXME:
#- name: Debug
# uses: fawazahmed0/action-debug@main
# with:
# credentials: "user:${{ secrets.DEBUG }}"
- 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: |
.\gen-windows.bat
- name: Show vcpkg failure logs
if: failure()
shell: pwsh
run: |
Write-Host "VCPKG failure detected. Dumping logs..."
Get-ChildItem "vcpkg\buildtrees" -Recurse -Filter *.log | ForEach-Object {
Write-Host "::group::$($_.FullName)"
Get-Content $_.FullName
Write-Host "::endgroup::"
}
- name: Build Release targets
shell: cmd
run: |
cmake --build build --config Release
- name: Run tests
shell: cmd
run: |
set ISC_USER=sysdba
set ISC_PASSWORD=masterkey
set FBCPP_TEST_SERVER=localhost
build\out\bin\Release\fb-cpp-test.exe --log_level=all
build-macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/Release/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Install system dependencies
run: |
brew install \
autoconf \
autoconf-archive \
automake \
libtool
- 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: Configure CMake
run: |
./gen-osx-arm64-release.sh
- name: Show vcpkg failure logs
if: failure()
shell: bash
run: |
echo "VCPKG failure detected. Dumping logs..."
find "vcpkg/buildtrees" -type f -name '*.log' -print0 | \
while IFS= read -r -d '' file; do
echo "::group::$file"
cat "$file"
echo "::endgroup::"
done
- name: Build Release targets
run: |
cmake --build build/Release
# FIXME:
- name: Debug
uses: fawazahmed0/action-debug@main
with:
credentials: "user:${{ secrets.DEBUG }}"
- name: Run tests
run: |
export ISC_USER=sysdba
export ISC_PASSWORD=masterkey
export FBCPP_TEST_SERVER=localhost
# FIXME:
#export DYLD_LIBRARY_PATH=`pwd`/build/Release/vcpkg_installed/arm64-osx-custom/lib
./build/Release/out/bin/fb-cpp-test --log_level=all