diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d578a0d..ad80dd2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,62 +15,41 @@ jobs: fail-fast: false matrix: include: - # macOS ARM64 (native on Apple Silicon runners) + # macOS ARM64 (Apple Silicon) - target: aarch64-apple-darwin os: macos-latest - # macOS x86_64 (uses older Intel-based runner) + # macOS x86_64 (Intel) - target: x86_64-apple-darwin os: macos-13 # Linux x86_64 - target: x86_64-unknown-linux-gnu os: ubuntu-latest - # Linux ARM64 (uses cross for proper cross-compilation) + # Linux ARM64 (uses cross via actions-rust-cross) - target: aarch64-unknown-linux-gnu os: ubuntu-latest - use_cross: true runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - name: Build binary + uses: houseabsolute/actions-rust-cross@v1 with: - targets: ${{ matrix.target }} - - - name: Install cross - if: matrix.use_cross - run: cargo install cross --git https://github.com/cross-rs/cross - - - name: Install dependencies (Ubuntu) - if: matrix.os == 'ubuntu-latest' && !matrix.use_cross - run: | - sudo apt-get update - sudo apt-get install -y libssl-dev pkg-config - - - name: Install dependencies (macOS) - if: startsWith(matrix.os, 'macos') - run: | - brew install openssl@3 - echo "OPENSSL_DIR=$(brew --prefix openssl@3)" >> $GITHUB_ENV - - - name: Build MCP Server (native) - if: "!matrix.use_cross" - run: | - cargo build --release --package vestige-mcp --target ${{ matrix.target }} - - - name: Build MCP Server (cross) - if: matrix.use_cross - run: | - cross build --release --package vestige-mcp --target ${{ matrix.target }} + command: build + target: ${{ matrix.target }} + args: "--locked --release --package vestige-mcp" + strip: true - name: Package run: | mkdir -p dist - cp target/${{ matrix.target }}/release/vestige-mcp dist/ + cp target/${{ matrix.target }}/release/vestige-mcp dist/ 2>/dev/null || true cp target/${{ matrix.target }}/release/vestige dist/ 2>/dev/null || true - cd dist && tar czf vestige-mcp-${{ matrix.target }}.tar.gz vestige-mcp vestige 2>/dev/null || tar czf vestige-mcp-${{ matrix.target }}.tar.gz vestige-mcp + cd dist + if [ -f vestige-mcp ]; then + tar czf vestige-mcp-${{ matrix.target }}.tar.gz vestige-mcp vestige 2>/dev/null || tar czf vestige-mcp-${{ matrix.target }}.tar.gz vestige-mcp + fi - name: Upload artifact uses: actions/upload-artifact@v4 diff --git a/crates/vestige-core/Cargo.toml b/crates/vestige-core/Cargo.toml index fe960cb..ae8d6c2 100644 --- a/crates/vestige-core/Cargo.toml +++ b/crates/vestige-core/Cargo.toml @@ -52,7 +52,8 @@ tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros"] } tracing = "0.1" # Git integration for codebase memory -git2 = "0.20" +# vendored-openssl: Compile OpenSSL from source for cross-compilation support +git2 = { version = "0.20", features = ["vendored-openssl"] } # File watching for codebase memory notify = "8"