mirror of
https://github.com/samvallad33/vestige.git
synced 2026-04-25 00:36:22 +02:00
fix(ci): use cross for ARM64 Linux builds
Cross-compilation for aarch64-unknown-linux-gnu requires OpenSSL dev libraries for the target platform. Using `cross` handles this automatically via Docker containers with pre-installed dependencies. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
3fb6a77bc7
commit
9af06f0e67
1 changed files with 22 additions and 5 deletions
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue