chore: bump package version for v0.1.32 #415
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: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: ["*"] | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| packages: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: build (${{ matrix.os_short }}, ${{ matrix.build_type == 'Release' && 'release' || 'debug' }}) | |
| runs-on: ${{ matrix.os }} | |
| if: github.repository_owner == 'bniladridas' | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| os_short: ubuntu | |
| build_type: release | |
| - os: ubuntu-latest | |
| os_short: ubuntu | |
| build_type: debug | |
| - os: macos-latest | |
| os_short: macos | |
| build_type: release | |
| - os: macos-latest | |
| os_short: macos | |
| build_type: debug | |
| - os: windows-latest | |
| os_short: windows | |
| build_type: release | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| build | |
| ~/.cache/vcpkg | |
| C:\vcpkg\installed | |
| key: ${{ runner.os }}-${{ matrix.build_type }}-${{ hashFiles('CMakeLists.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.build_type }}- | |
| - name: setup | |
| shell: bash | |
| run: | | |
| if [[ "$RUNNER_OS" == "Linux" ]]; then | |
| sudo apt update | |
| sudo apt install -y gh nlohmann-json3-dev cmake build-essential \ | |
| libcurl4-openssl-dev libpqxx-dev expect clang-tidy | |
| elif [[ "$RUNNER_OS" == "macOS" ]]; then | |
| export HOMEBREW_NO_REQUIRE_TAP_TRUST=1 | |
| brew update | |
| brew install gh cmake nlohmann-json cpr libpqxx expect llvm | |
| else | |
| powershell -Command " | |
| Set-ExecutionPolicy Bypass -Scope Process -Force; | |
| iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex; | |
| choco install -y cmake gh --no-progress; | |
| git clone https://github.com/microsoft/vcpkg.git C:\vcpkg; | |
| C:\vcpkg\bootstrap-vcpkg.bat -disableMetrics; | |
| C:\vcpkg\vcpkg.exe integrate install; | |
| C:\vcpkg\vcpkg.exe install cpr nlohmann-json libpqxx --triplet x64-windows | |
| " | |
| fi | |
| - name: build | |
| shell: bash | |
| run: | | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| cmake -S . -B build \ | |
| -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| else | |
| FLAGS="" | |
| [[ "$RUNNER_OS" == "macOS" ]] && FLAGS="-DCMAKE_PREFIX_PATH=/opt/homebrew" | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} $FLAGS | |
| fi | |
| cmake --build build --config ${{ matrix.build_type }} | |
| - name: test | |
| shell: bash | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "=== Unit Tests ===" | |
| ctest --test-dir build --output-on-failure -C ${{ matrix.build_type }} | |
| echo "=== Summary ===" | |
| echo "Unit tests passed" | |
| - name: scenario tests | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "=== Scenario Tests ===" | |
| cmake --build build --target check-scenarios --config ${{ matrix.build_type }} | |
| echo "=== Summary ===" | |
| echo "Scenarios passed" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: cursor-${{ matrix.os }}-${{ matrix.build_type }} | |
| path: | | |
| build/bin/cursor-agent* | |
| build/bin/Release/cursor-agent.exe | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.event_name != 'release' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: | | |
| sudo apt update | |
| sudo apt install -y nlohmann-json3-dev cmake build-essential libcurl4-openssl-dev libpqxx-dev lcov | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug | |
| cmake --build build --target cursor-agent | |
| chmod +x build/bin/cursor-agent || true | |
| cmake --build build --target coverage | |
| - uses: codecov/codecov-action@v7 | |
| with: | |
| files: build/coverage/coverage.info | |
| flags: unittests | |
| name: codecov | |
| fail_ci_if_error: false | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: | | |
| sudo apt update | |
| sudo apt install -y clang-tidy cmake build-essential \ | |
| libcurl4-openssl-dev nlohmann-json3-dev libpqxx-dev | |
| cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| echo "Running basic syntax check..." | |
| clang-tidy --list-checks > /dev/null && echo "✅ Clang-tidy available" | |
| echo "✅ Lint check completed (detailed linting handled by pre-commit hooks)" | |
| e2e: | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/setup-buildx-action@v4 | |
| - run: docker compose -f tests/e2e/docker-compose.yml --project-directory . up --abort-on-container-exit --exit-code-from e2e-tests | |
| - if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: e2e-logs | |
| path: tests/e2e/e2e_test.log | |
| docker: | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/setup-buildx-action@v4 | |
| - uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ghcr.io/${{ github.repository }} | |
| tags: | | |
| type=ref,event=branch | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| - uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./.github/packaging/docker/Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |