diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89f27c7..dee755e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,8 @@ on: env: CARGO_TERM_COLOR: always + CARGO_HOME: /home/runner/.cargo + CARGO_INCREMENTAL: 0 jobs: build: @@ -15,12 +17,16 @@ jobs: include: - target: x86_64-apple-darwin os: macos-latest + use_cross: false - target: aarch64-apple-darwin os: macos-latest + use_cross: false - target: x86_64-unknown-linux-gnu os: ubuntu-latest + use_cross: false - target: aarch64-unknown-linux-gnu os: ubuntu-latest + use_cross: true runs-on: ${{ matrix.os }} @@ -32,21 +38,32 @@ jobs: with: targets: ${{ matrix.target }} - - name: Install cross-compilation tools - if: matrix.target == 'aarch64-unknown-linux-gnu' + - name: Install cross + if: matrix.use_cross + run: cargo install cross --git https://github.com/cross-rs/cross + + - name: Install dependencies (Linux) + if: matrix.os == 'ubuntu-latest' && !matrix.use_cross run: | sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu + sudo apt-get install -y libssl-dev pkg-config - - name: Build MCP Server + - 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 }} + - name: Package run: | mkdir -p dist cp target/${{ matrix.target }}/release/vestige-mcp dist/ - cd dist && tar czf vestige-mcp-${{ matrix.target }}.tar.gz vestige-mcp + cp target/${{ matrix.target }}/release/vestige dist/ || 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 - name: Upload artifact uses: actions/upload-artifact@v4