Merge pull request #100 from mineshp-mecha/chore/networking #26
This file contains 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: Agent - Build aarch64 | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- dev-build | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUST_BACKTRACE: short | |
RUSTUP_MAX_RETRIES: 10 | |
MACOSX_DEPLOYMENT_TARGET: 10.7 | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- name: Mecha Agent | |
package: mecha-agent | |
artifact: mecha-agent-aarch64-unknown-linux-gnu.tar.gz | |
path: . | |
runs-on: ubicloud-standard-2-arm | |
continue-on-error: false | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust 1.75.0 | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
rustup default 1.75.0 | |
- name: Install cargo-deb | |
run: cargo install cargo-deb | |
- name: Update apt | |
run: sudo apt update | |
- name: Install dependencies | |
run: | | |
sudo apt install \ | |
libssl-dev \ | |
protobuf-compiler \ | |
libprotobuf-dev | |
- name: Build [${{ matrix.package }}] | |
run: | | |
cd ${{ matrix.path }} | |
cargo --config net.git-fetch-with-cli=true fetch | |
cargo build --release --package ${{ matrix.package }} | |
ls -la | |
- name: Package deb [${{ matrix.package }}] | |
continue-on-error: true | |
run: | | |
cd ${{ matrix.path }} | |
cargo deb --no-build --package ${{ matrix.package }} | |
ls -la | |
- name: Prepare artifacts [${{ matrix.package }}] | |
run: | | |
mkdir build | |
cp ./target/release/${{ matrix.package }} ./build | |
cp ./target/debian/*.deb ./build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact }} | |
path: ./build/* |