release: database_system v1.0.0 (#567) #779
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: Integration Tests | |
| on: | |
| push: | |
| branches: [ main, develop, feat/* ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| integration-tests: | |
| name: ${{ matrix.os }} - ${{ matrix.build_type }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Ubuntu 24.04 and macOS 14 for full C++20 std::format support | |
| os: [ubuntu-24.04, macos-14] | |
| build_type: [Debug, Release] | |
| include: | |
| - os: ubuntu-24.04 | |
| cc: gcc-13 | |
| cxx: g++-13 | |
| - os: macos-14 | |
| cc: clang | |
| cxx: clang++ | |
| steps: | |
| - name: Checkout database_system | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Checkout common_system | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: kcenon/common_system | |
| path: common_system | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install dependencies (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| # Remove problematic Microsoft repositories that may cause 403 errors | |
| sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | |
| sudo rm -f /etc/apt/sources.list.d/azure-cli.list | |
| sudo apt-get update | |
| # Use GCC 13 for full C++20 std::format support | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| ninja-build \ | |
| g++-13 \ | |
| libgtest-dev \ | |
| libsqlite3-dev \ | |
| lcov | |
| - name: Install dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install \ | |
| cmake \ | |
| ninja \ | |
| googletest \ | |
| sqlite3 \ | |
| lcov | |
| - name: Set up environment | |
| run: | | |
| echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV | |
| echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV | |
| - name: Build and install common_system | |
| shell: bash | |
| run: | | |
| cd common_system | |
| cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DUSE_UNIT_TEST=OFF \ | |
| -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} | |
| cmake --build build --config Release | |
| sudo cmake --install build --prefix /usr/local | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build \ | |
| -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| -DCMAKE_C_COMPILER=${{ matrix.cc }} \ | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
| -DUSE_UNIT_TEST=ON \ | |
| -DDATABASE_BUILD_INTEGRATION_TESTS=ON \ | |
| -DUSE_SQLITE=ON \ | |
| -DALLOW_BUILD_WITHOUT_NETWORK_SYSTEM=ON \ | |
| -DCMAKE_CXX_FLAGS="--coverage -fprofile-arcs -ftest-coverage" | |
| - name: Build integration tests | |
| run: | | |
| cmake --build build --target database_integration_tests -j $(nproc 2>/dev/null || sysctl -n hw.ncpu) | |
| - name: Run integration tests | |
| working-directory: build | |
| run: | | |
| ./bin/database_integration_tests --gtest_output=xml:integration_test_results.xml | |
| - name: Generate coverage report | |
| if: matrix.build_type == 'Debug' | |
| working-directory: build | |
| run: | | |
| # Ubuntu 22.04 lcov 1.14 only supports --ignore-errors: source | |
| lcov --capture --directory . --output-file coverage.info --ignore-errors source --rc lcov_branch_coverage=0 2>/dev/null || \ | |
| lcov --capture --directory . --output-file coverage.info 2>/dev/null || true | |
| if [ -f coverage.info ]; then | |
| lcov --remove coverage.info '/usr/*' '*/tests/*' '*/gtest/*' '*/benchmark/*' \ | |
| --output-file coverage_filtered.info --ignore-errors source 2>/dev/null || true | |
| if [ -f coverage_filtered.info ]; then | |
| lcov --list coverage_filtered.info --ignore-errors source 2>/dev/null || echo "Coverage summary skipped" | |
| fi | |
| fi | |
| - name: Upload coverage to Codecov | |
| if: matrix.build_type == 'Debug' && matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: ./build/coverage_filtered.info | |
| flags: integration-tests | |
| name: integration-tests-coverage | |
| fail_ci_if_error: false | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: integration-test-results-${{ matrix.os }}-${{ matrix.build_type }} | |
| path: build/integration_test_results.xml | |
| retention-days: 7 | |
| - name: Validate performance baselines | |
| if: matrix.build_type == 'Release' | |
| working-directory: build | |
| run: | | |
| # Run performance tests and check against baselines | |
| ./bin/database_integration_tests --gtest_filter=*Performance* --gtest_color=yes | |
| integration-tests-summary: | |
| name: Integration Tests Summary | |
| needs: integration-tests | |
| runs-on: ubuntu-24.04 | |
| if: always() | |
| steps: | |
| - name: Check integration test results | |
| run: | | |
| echo "Integration tests completed" | |
| if [ "${{ needs.integration-tests.result }}" == "failure" ]; then | |
| echo "Some integration tests failed" | |
| exit 1 | |
| fi |