diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 9b7f41b..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,198 +0,0 @@ -name: Build and Test - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - name: Build and Test - runs-on: ${{ matrix.os }} - timeout-minutes: 45 - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - - os: macos-latest - target: x86_64-apple-darwin - - os: macos-latest - target: aarch64-apple-darwin - - os: windows-latest - target: x86_64-pc-windows-msvc - - steps: - - uses: actions/checkout@v3 - - - name: Install OpenSSL (Ubuntu) - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y libssl-dev pkg-config - - - name: Install OpenSSL (macOS) - if: runner.os == 'macOS' - run: | - brew install openssl@3 pkg-config - echo "OPENSSL_DIR=$(brew --prefix openssl@3)" >> $GITHUB_ENV - echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig" >> $GITHUB_ENV - - - name: Install OpenSSL (Windows) - if: runner.os == 'Windows' - shell: powershell - run: | - # Download and install Win32OpenSSL for better compatibility - Write-Host "Downloading Win32OpenSSL..." - $url = "https://slproweb.com/download/Win64OpenSSL-3_2_1.exe" - $output = "$env:TEMP\Win64OpenSSL.exe" - - try { - Invoke-WebRequest -Uri $url -OutFile $output -UseBasicParsing - Write-Host "Installing Win32OpenSSL..." - Start-Process -FilePath $output -ArgumentList "/SILENT", "/VERYSILENT", "/SP-", "/SUPPRESSMSGBOXES" -Wait - Remove-Item $output -Force - Write-Host "Win32OpenSSL installation completed" - } catch { - Write-Host "Win32OpenSSL download failed, falling back to chocolatey..." - choco install openssl -y - } - - # Define possible OpenSSL installation paths - $possiblePaths = @( - "C:\Program Files\OpenSSL-Win64", - "C:\Program Files\OpenSSL", - "C:\OpenSSL-Win64", - "C:\OpenSSL" - ) - - $opensslPath = $null - foreach ($path in $possiblePaths) { - if (Test-Path "$path\lib") { - $opensslPath = $path - Write-Host "Found OpenSSL at: $path" - break - } - } - - if (-not $opensslPath) { - Write-Host "ERROR: OpenSSL installation not found in any expected location" - Write-Host "Searched paths:" - foreach ($path in $possiblePaths) { - Write-Host " - $path" - } - exit 1 - } - - # Set environment variables for cargo and the linker - echo "OPENSSL_DIR=$opensslPath" | Out-File -FilePath $env:GITHUB_ENV -Append - echo "OPENSSL_LIB_DIR=$opensslPath\lib" | Out-File -FilePath $env:GITHUB_ENV -Append - echo "OPENSSL_INCLUDE_DIR=$opensslPath\include" | Out-File -FilePath $env:GITHUB_ENV -Append - echo "OPENSSL_ROOT_DIR=$opensslPath" | Out-File -FilePath $env:GITHUB_ENV -Append - - # Add OpenSSL bin directory to PATH for DLL resolution during linking - $currentPath = [Environment]::GetEnvironmentVariable("PATH", "Process") - $newPath = "$opensslPath\bin;$currentPath" - echo "PATH=$newPath" | Out-File -FilePath $env:GITHUB_ENV -Append - - # Verify all required files exist - $requiredFiles = @( - "$opensslPath\lib\libssl.lib", - "$opensslPath\lib\libcrypto.lib", - "$opensslPath\bin\libssl-3-x64.dll", - "$opensslPath\bin\libcrypto-3-x64.dll" - ) - - $missingFiles = @() - foreach ($file in $requiredFiles) { - if (-not (Test-Path $file)) { - $missingFiles += $file - } - } - - if ($missingFiles.Count -gt 0) { - Write-Host "WARNING: Some OpenSSL files are missing:" - foreach ($file in $missingFiles) { - Write-Host " - $file" - } - } else { - Write-Host "All required OpenSSL files found" - } - - # Display environment for debugging - Write-Host "OpenSSL configuration:" - Write-Host " OPENSSL_DIR: $opensslPath" - Write-Host " OPENSSL_LIB_DIR: $opensslPath\lib" - Write-Host " OPENSSL_INCLUDE_DIR: $opensslPath\include" - - - name: Install Perl dependencies for OpenSSL (Windows fallback) - if: runner.os == 'Windows' - run: | - cpan install Locale::Maketext::Simple - continue-on-error: true - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - targets: ${{ matrix.target }} - - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - - name: Build - timeout-minutes: 15 - run: | - # On Windows, display OpenSSL environment for debugging - if [ "${{ runner.os }}" = "Windows" ]; then - echo "=== OpenSSL Environment Debug Info ===" - echo "OPENSSL_DIR: $OPENSSL_DIR" - echo "OPENSSL_LIB_DIR: $OPENSSL_LIB_DIR" - echo "OPENSSL_INCLUDE_DIR: $OPENSSL_INCLUDE_DIR" - echo "PATH (first 500 chars): ${PATH:0:500}" - - # List OpenSSL library files if directory exists - if [ -d "$OPENSSL_LIB_DIR" ]; then - echo "OpenSSL lib directory contents:" - ls -la "$OPENSSL_LIB_DIR" || true - fi - - # Check if OpenSSL DLLs are accessible - if [ -d "$OPENSSL_DIR/bin" ]; then - echo "OpenSSL bin directory contents:" - ls -la "$OPENSSL_DIR/bin" || true - fi - echo "=== End OpenSSL Debug Info ===" - fi - - cargo build --release --target ${{ matrix.target }} - - - name: Check for dependency drift - timeout-minutes: 5 - run: | - cargo update --dry-run - - - name: Run tests - timeout-minutes: 20 - run: | - # Run unit tests for all platforms - cargo test --lib --target ${{ matrix.target }} - - # Run integration tests only on native platforms - if [[ "${{ matrix.os }}" == "ubuntu-latest" && "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]] || \ - [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.target }}" == "x86_64-apple-darwin" ]] || \ - [[ "${{ matrix.os }}" == "windows-latest" && "${{ matrix.target }}" == "x86_64-pc-windows-msvc" ]]; then - echo "Running integration tests on native platform..." - cargo test --test '*' --target ${{ matrix.target }} || echo "Integration tests may fail due to network restrictions" - else - echo "Skipping integration tests for cross-compilation target ${{ matrix.target }}" - fi - shell: bash - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 0a96830..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,212 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v*' - -jobs: - build-and-release: - name: Build and Release - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - matrix: - include: - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - artifact_name: solana-mcp-server - asset_name: solana-mcp-server-linux-amd64 - - os: macos-latest - target: x86_64-apple-darwin - artifact_name: solana-mcp-server - asset_name: solana-mcp-server-macos-amd64 - - os: macos-latest - target: aarch64-apple-darwin - artifact_name: solana-mcp-server - asset_name: solana-mcp-server-macos-arm64 - - os: windows-latest - target: x86_64-pc-windows-msvc - artifact_name: solana-mcp-server.exe - asset_name: solana-mcp-server-windows-amd64.exe - - steps: - - uses: actions/checkout@v3 - - - name: Install OpenSSL (Ubuntu) - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y libssl-dev pkg-config - - - name: Install OpenSSL (macOS) - if: runner.os == 'macOS' - run: | - brew install openssl@3 pkg-config - echo "OPENSSL_DIR=$(brew --prefix openssl@3)" >> $GITHUB_ENV - echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig" >> $GITHUB_ENV - - - name: Install OpenSSL (Windows) - if: runner.os == 'Windows' - shell: powershell - run: | - # Download and install Win32OpenSSL for better compatibility - Write-Host "Downloading Win32OpenSSL..." - $url = "https://slproweb.com/download/Win64OpenSSL-3_2_1.exe" - $output = "$env:TEMP\Win64OpenSSL.exe" - - try { - Invoke-WebRequest -Uri $url -OutFile $output -UseBasicParsing - Write-Host "Installing Win32OpenSSL..." - Start-Process -FilePath $output -ArgumentList "/SILENT", "/VERYSILENT", "/SP-", "/SUPPRESSMSGBOXES" -Wait - Remove-Item $output -Force - Write-Host "Win32OpenSSL installation completed" - } catch { - Write-Host "Win32OpenSSL download failed, falling back to chocolatey..." - choco install openssl -y - } - - # Define possible OpenSSL installation paths - $possiblePaths = @( - "C:\Program Files\OpenSSL-Win64", - "C:\Program Files\OpenSSL", - "C:\OpenSSL-Win64", - "C:\OpenSSL" - ) - - $opensslPath = $null - foreach ($path in $possiblePaths) { - if (Test-Path "$path\lib") { - $opensslPath = $path - Write-Host "Found OpenSSL at: $path" - break - } - } - - if (-not $opensslPath) { - Write-Host "ERROR: OpenSSL installation not found in any expected location" - Write-Host "Searched paths:" - foreach ($path in $possiblePaths) { - Write-Host " - $path" - } - exit 1 - } - - # Set environment variables for cargo and the linker - echo "OPENSSL_DIR=$opensslPath" | Out-File -FilePath $env:GITHUB_ENV -Append - echo "OPENSSL_LIB_DIR=$opensslPath\lib" | Out-File -FilePath $env:GITHUB_ENV -Append - echo "OPENSSL_INCLUDE_DIR=$opensslPath\include" | Out-File -FilePath $env:GITHUB_ENV -Append - echo "OPENSSL_ROOT_DIR=$opensslPath" | Out-File -FilePath $env:GITHUB_ENV -Append - - # Add OpenSSL bin directory to PATH for DLL resolution during linking - $currentPath = [Environment]::GetEnvironmentVariable("PATH", "Process") - $newPath = "$opensslPath\bin;$currentPath" - echo "PATH=$newPath" | Out-File -FilePath $env:GITHUB_ENV -Append - - # Verify all required files exist - $requiredFiles = @( - "$opensslPath\lib\libssl.lib", - "$opensslPath\lib\libcrypto.lib", - "$opensslPath\bin\libssl-3-x64.dll", - "$opensslPath\bin\libcrypto-3-x64.dll" - ) - - $missingFiles = @() - foreach ($file in $requiredFiles) { - if (-not (Test-Path $file)) { - $missingFiles += $file - } - } - - if ($missingFiles.Count -gt 0) { - Write-Host "WARNING: Some OpenSSL files are missing:" - foreach ($file in $missingFiles) { - Write-Host " - $file" - } - } else { - Write-Host "All required OpenSSL files found" - } - - # Display environment for debugging - Write-Host "OpenSSL configuration:" - Write-Host " OPENSSL_DIR: $opensslPath" - Write-Host " OPENSSL_LIB_DIR: $opensslPath\lib" - Write-Host " OPENSSL_INCLUDE_DIR: $opensslPath\include" - - - name: Install Perl dependencies for OpenSSL (Windows fallback) - if: runner.os == 'Windows' - run: | - cpan install Locale::Maketext::Simple - continue-on-error: true - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - targets: ${{ matrix.target }} - - - name: Build - run: | - # On Windows, display OpenSSL environment for debugging - if [ "${{ runner.os }}" = "Windows" ]; then - echo "=== OpenSSL Environment Debug Info ===" - echo "OPENSSL_DIR: $OPENSSL_DIR" - echo "OPENSSL_LIB_DIR: $OPENSSL_LIB_DIR" - echo "OPENSSL_INCLUDE_DIR: $OPENSSL_INCLUDE_DIR" - echo "PATH (first 500 chars): ${PATH:0:500}" - - # List OpenSSL library files if directory exists - if [ -d "$OPENSSL_LIB_DIR" ]; then - echo "OpenSSL lib directory contents:" - ls -la "$OPENSSL_LIB_DIR" || true - fi - - # Check if OpenSSL DLLs are accessible - if [ -d "$OPENSSL_DIR/bin" ]; then - echo "OpenSSL bin directory contents:" - ls -la "$OPENSSL_DIR/bin" || true - fi - echo "=== End OpenSSL Debug Info ===" - fi - - cargo build --release --target ${{ matrix.target }} - - - name: Prepare asset - shell: bash - run: | - mkdir -p release - if [ "${{ matrix.os }}" = "windows-latest" ]; then - cp target/${{ matrix.target }}/release/${{ matrix.artifact_name }} release/${{ matrix.asset_name }} - else - cp target/${{ matrix.target }}/release/${{ matrix.artifact_name }} release/${{ matrix.asset_name }} - chmod +x release/${{ matrix.asset_name }} - fi - - - name: Upload Release Asset - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: release/${{ matrix.asset_name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - create-release: - name: Create Release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Get version from tag - id: get_version - run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - - - name: Create Release - id: create_release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - name: Release ${{ steps.get_version.outputs.VERSION }} - draft: false - prerelease: false - generate_release_notes: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/_docs/timeout-configuration.md b/_docs/timeout-configuration.md index a130b59..1f99aba 100644 --- a/_docs/timeout-configuration.md +++ b/_docs/timeout-configuration.md @@ -56,12 +56,6 @@ If no `config.json` is provided, the server uses default timeout values. Individ The CI/CD workflows have been updated with comprehensive timeout protection: -### Build Workflow (`build.yml`) -- **Overall job timeout**: 45 minutes -- **Build step**: 15 minutes -- **Dependency check**: 5 minutes -- **Test execution**: 20 minutes - ### Benchmark Workflow (`benchmark.yml`) - **Overall job timeout**: 60 minutes - **Individual benchmarks**: 15 minutes each @@ -73,9 +67,6 @@ The CI/CD workflows have been updated with comprehensive timeout protection: - **Dependency check**: 3 minutes - **Audit execution**: 5 minutes -### Release Workflow (`release.yml`) -- **Overall job timeout**: 60 minutes (for cross-compilation) - ## Server Implementation ### HTTP Server Timeouts