Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 68 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
autoconf \
autoconf-archive \
automake \
libtool \
libtool-bin \
doxygen \
graphviz \
ninja-build \
Expand All @@ -73,27 +78,38 @@ jobs:

- name: Configure Firebird
run: |
{
echo "FIREBIRD=/opt/firebird"
echo "FIREBIRD_LOCK=${RUNNER_TEMP}"
echo "LD_LIBRARY_PATH=/opt/firebird/lib:${LD_LIBRARY_PATH}"
} >> "$GITHUB_ENV"
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: |
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release -G Ninja
./gen-linux-x64-release.sh

- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: vcpkg-logs-${{ github.job }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore

- name: Build Release targets
run: |
cmake --build build/Release

- name: Run tests
run: |
./build/Release/out/bin/fb-cpp-test --log_level=all
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

- name: Build documentation
run: |
Expand Down Expand Up @@ -136,7 +152,14 @@ jobs:
- name: Configure Firebird
shell: cmd
run: |
echo C:\Firebird>>%GITHUB_PATH%
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
Expand All @@ -146,7 +169,15 @@ jobs:
- name: Configure CMake
shell: cmd
run: |
cmake -S . -B build -G "Visual Studio 17 2022"
.\gen-windows.bat

- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: vcpkg-logs-${{ github.job }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore

- name: Build Release targets
shell: cmd
Expand All @@ -156,6 +187,9 @@ jobs:
- 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

build-macos:
Expand All @@ -179,6 +213,14 @@ jobs:
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 \
Expand All @@ -187,28 +229,37 @@ jobs:

- name: Configure Firebird
run: |
{
echo "FIREBIRD_LOCK=${RUNNER_TEMP}"
echo "DYLD_LIBRARY_PATH=/Library/Frameworks/Firebird.framework/Resources/lib:${DYLD_LIBRARY_PATH}"
echo "ISC_USER=sysdba"
echo "ISC_PASSWORD=masterkey"
} >> "$GITHUB_ENV"
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: |
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release -G Ninja
./gen-osx-arm64-release.sh

- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: vcpkg-logs-${{ github.job }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore

- name: Build Release targets
run: |
cmake --build build/Release

- name: Run tests
run: |
./build/Release/out/bin/fb-cpp-test --log_level=all
export ISC_USER=sysdba
export ISC_PASSWORD=masterkey
export FBCPP_TEST_SERVER=localhost
./build/Release/out/bin/fb-cpp-test

deploy-docs:
runs-on: ubuntu-latest
Expand Down
85 changes: 68 additions & 17 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
autoconf \
autoconf-archive \
automake \
libtool \
libtool-bin \
doxygen \
graphviz \
ninja-build \
Expand All @@ -64,27 +69,38 @@ jobs:

- name: Configure Firebird
run: |
{
echo "FIREBIRD=/opt/firebird"
echo "FIREBIRD_LOCK=${RUNNER_TEMP}"
echo "LD_LIBRARY_PATH=/opt/firebird/lib:${LD_LIBRARY_PATH}"
} >> "$GITHUB_ENV"
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: |
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release -G Ninja
./gen-linux-x64-release.sh

- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: vcpkg-logs-${{ github.job }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore

- name: Build Release targets
run: |
cmake --build build/Release

- name: Run tests
run: |
./build/Release/out/bin/fb-cpp-test --log_level=all
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

- name: Build documentation
run: |
Expand Down Expand Up @@ -122,7 +138,14 @@ jobs:
- name: Configure Firebird
shell: cmd
run: |
echo C:\Firebird>>%GITHUB_PATH%
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
Expand All @@ -132,7 +155,15 @@ jobs:
- name: Configure CMake
shell: cmd
run: |
cmake -S . -B build -G "Visual Studio 17 2022"
.\gen-windows.bat

- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: vcpkg-logs-${{ github.job }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore

- name: Build Release targets
shell: cmd
Expand All @@ -142,6 +173,9 @@ jobs:
- 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

build-macos:
Expand All @@ -165,6 +199,14 @@ jobs:
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 \
Expand All @@ -173,25 +215,34 @@ jobs:

- name: Configure Firebird
run: |
{
echo "FIREBIRD_LOCK=${RUNNER_TEMP}"
echo "DYLD_LIBRARY_PATH=/Library/Frameworks/Firebird.framework/Resources/lib:${DYLD_LIBRARY_PATH}"
echo "ISC_USER=sysdba"
echo "ISC_PASSWORD=masterkey"
} >> "$GITHUB_ENV"
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: |
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release -G Ninja
./gen-osx-arm64-release.sh

- name: Upload vcpkg failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: vcpkg-logs-${{ github.job }}
path: vcpkg/buildtrees/**/*.log
if-no-files-found: ignore

- name: Build Release targets
run: |
cmake --build build/Release

- name: Run tests
run: |
./build/Release/out/bin/fb-cpp-test --log_level=all
export ISC_USER=sysdba
export ISC_PASSWORD=masterkey
export FBCPP_TEST_SERVER=localhost
./build/Release/out/bin/fb-cpp-test
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
```

### Build
- If .cpp files are added, it's necessary to run `./gen-linux-debug.sh` (non-Windows) or `gen-windows.bat` (Windows) from the repo root.
- If .cpp files are added, it's necessary to run `./gen-linux-x64-debug.sh` (non-Windows) or `gen-windows.bat` (Windows) from the repo root.
- Use `cmake --build build/Debug/` (non-Windows) or `cmake --build build --config Debug` (Windows) from the repo root.

### Tests
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ cmake_minimum_required(VERSION 3.18)
set(VCPKG_ROOT "vcpkg")
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")

if(NOT DEFINED VCPKG_OVERLAY_TRIPLETS)
set(VCPKG_OVERLAY_TRIPLETS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/triplets" CACHE STRING "")
endif()

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
10 changes: 10 additions & 0 deletions cmake/triplets/arm64-osx-custom.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

if(PORT MATCHES "^(icu)$")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
9 changes: 9 additions & 0 deletions cmake/triplets/x64-linux-custom.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Linux)

if(PORT MATCHES "^(icu)$")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
2 changes: 0 additions & 2 deletions gen-linux-debug.sh

This file was deleted.

2 changes: 0 additions & 2 deletions gen-linux-release.sh

This file was deleted.

7 changes: 7 additions & 0 deletions gen-linux-x64-debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
cmake -S . -B build/Debug \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DVCPKG_TARGET_TRIPLET=x64-linux-custom \
-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets \
-G Ninja
7 changes: 7 additions & 0 deletions gen-linux-x64-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
cmake -S . -B build/Release \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DVCPKG_TARGET_TRIPLET=x64-linux-custom \
-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets \
-G Ninja
7 changes: 7 additions & 0 deletions gen-osx-arm64-debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
cmake -S . -B build/Debug \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DVCPKG_TARGET_TRIPLET=arm64-osx-custom \
-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets \
-G Ninja
7 changes: 7 additions & 0 deletions gen-osx-arm64-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
cmake -S . -B build/Release \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DVCPKG_TARGET_TRIPLET=arm64-osx-custom \
-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets \
-G Ninja
Loading