Better integration of boost.test and CTest allowing parallel test execution #92
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 | |
| workflow_dispatch: | |
| permissions: | |
| 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 | |
| - name: Check clang-format | |
| run: | | |
| ./check-format.sh | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| env: | |
| USERNAME: asfernandes | |
| VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg | |
| FEED_URL: ${{ github.repository == 'asfernandes/fb-cpp' && 'https://nuget.pkg.github.com/asfernandes/index.json' || '' }} | |
| VCPKG_BINARY_SOURCES: ${{ github.repository == 'asfernandes/fb-cpp' && 'clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite' || '' }} | |
| 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-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-v3- | |
| - 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 vcpkg binary caching | |
| if: github.repository == 'asfernandes/fb-cpp' | |
| run: | | |
| mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ | |
| sources add \ | |
| -Source "${{ env.FEED_URL }}" \ | |
| -StorePasswordInClearText \ | |
| -Name GitHubPackages \ | |
| -UserName "${{ env.USERNAME }}" \ | |
| -Password "${{ secrets.GITHUB_TOKEN }}" | |
| mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ | |
| setapikey "${{ secrets.GITHUB_TOKEN }}" \ | |
| -Source "${{ env.FEED_URL }}" | |
| - 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@v7 | |
| 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 --output-on-failure -j8 | |
| - name: Build documentation | |
| run: | | |
| cmake --build --preset default --target docs | |
| build-windows: | |
| runs-on: windows-latest | |
| env: | |
| USERNAME: asfernandes | |
| VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg | |
| FEED_URL: ${{ github.repository == 'asfernandes/fb-cpp' && 'https://nuget.pkg.github.com/asfernandes/index.json' || '' }} | |
| VCPKG_BINARY_SOURCES: ${{ github.repository == 'asfernandes/fb-cpp' && 'clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite' || '' }} | |
| 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-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-v3- | |
| - 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 vcpkg binary caching | |
| if: github.repository == 'asfernandes/fb-cpp' | |
| shell: pwsh | |
| run: | | |
| .$(${{ env.VCPKG_EXE }} fetch nuget) ` | |
| sources add ` | |
| -Source "${{ env.FEED_URL }}" ` | |
| -StorePasswordInClearText ` | |
| -Name GitHubPackages ` | |
| -UserName "${{ env.USERNAME }}" ` | |
| -Password "${{ secrets.GITHUB_TOKEN }}" | |
| .$(${{ env.VCPKG_EXE }} fetch nuget) ` | |
| setapikey "${{ secrets.GITHUB_TOKEN }}" ` | |
| -Source "${{ env.FEED_URL }}" | |
| - 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@v7 | |
| 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: | | |
| set ISC_USER=sysdba | |
| set ISC_PASSWORD=masterkey | |
| ctest --preset default --output-on-failure -j8 | |
| build-macos: | |
| runs-on: macos-latest | |
| env: | |
| USERNAME: asfernandes | |
| VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg | |
| FEED_URL: ${{ github.repository == 'asfernandes/fb-cpp' && 'https://nuget.pkg.github.com/asfernandes/index.json' || '' }} | |
| VCPKG_BINARY_SOURCES: ${{ github.repository == 'asfernandes/fb-cpp' && 'clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite' || '' }} | |
| 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-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-v3- | |
| - name: Install system dependencies | |
| run: | | |
| brew install \ | |
| autoconf \ | |
| autoconf-archive \ | |
| automake \ | |
| libtool \ | |
| mono | |
| - 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 vcpkg binary caching | |
| if: github.repository == 'asfernandes/fb-cpp' | |
| run: | | |
| mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ | |
| sources add \ | |
| -Source "${{ env.FEED_URL }}" \ | |
| -StorePasswordInClearText \ | |
| -Name GitHubPackages \ | |
| -UserName "${{ env.USERNAME }}" \ | |
| -Password "${{ secrets.GITHUB_TOKEN }}" | |
| mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ | |
| setapikey "${{ secrets.GITHUB_TOKEN }}" \ | |
| -Source "${{ env.FEED_URL }}" | |
| - 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@v7 | |
| 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: | | |
| # Parallel test execution on macOS often causes failures in EventListener tests | |
| ctest --preset default --output-on-failure |