Use Firebird client from vcpkg #37
Workflow file for this run
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: 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) | |
| - 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: 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: | | |
| 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 | |
| # FIXME: | |
| - name: List vcpkg_installed | |
| run: | | |
| find build/Release/vcpkg_installed | |
| - 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% | |
| - 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: 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 | |
| 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 | |
| # FIXME: | |
| - name: List vcpkg_installed | |
| shell: bash | |
| run: | | |
| find build/vcpkg_installed | |
| 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: 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: | | |
| export ISC_USER=sysdba | |
| export ISC_PASSWORD=masterkey | |
| export FBCPP_TEST_SERVER=localhost | |
| ./build/Release/out/bin/fb-cpp-test --log_level=all | |
| # FIXME: | |
| - name: List vcpkg_installed | |
| run: | | |
| find build/Release/vcpkg_installed |