Feature #11 - Multi-database transaction (2PC) support (#18) #65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI and Deploy Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: 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) | |
| - 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 | |
| - 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 | |
| run: | | |
| cmake --build --preset default | |
| - name: Run tests | |
| run: | | |
| ctest --preset default --verbose | |
| - name: Build documentation | |
| run: | | |
| cmake --build --preset default --target docs | |
| - name: Upload documentation artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: build/Debug/doc/docs/html | |
| 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% | |
| - 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.template CMakeUserPresets.json | |
| cmake --preset default | |
| - 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 | |
| shell: cmd | |
| run: | | |
| cmake --build --preset default | |
| - name: Run tests | |
| shell: cmd | |
| run: | | |
| ctest --preset default --verbose | |
| 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: | | |
| cp CMakeUserPresets.json.posix.template CMakeUserPresets.json | |
| cmake --preset default | |
| - 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 | |
| run: | | |
| cmake --build --preset default | |
| - name: Run tests | |
| run: | | |
| ctest --preset default --verbose | |
| deploy-docs: | |
| 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 |