Release Dash Evo Tool #59
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: Build ARM64 Binary | |
on: | |
push: | |
tags: | |
- 'v*' | |
- 'v*-dev.*' | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "Version (e.g., v0.1.0)" | |
required: true | |
jobs: | |
build-arm64: | |
runs-on: ubuntu-latest | |
name: Build for ARM64 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Set up Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-unknown-linux-gnu | |
override: true | |
components: rust-src | |
- name: Install cross-compilation dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
gcc-aarch64-linux-gnu \ | |
libc6-dev-arm64-cross \ | |
pkg-config \ | |
libssl-dev:arm64 | |
- name: Configure environment variables | |
run: | | |
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV | |
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV | |
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV | |
echo "PKG_CONFIG_PATH=/usr/aarch64-linux-gnu/lib/pkgconfig" >> $GITHUB_ENV | |
echo "RUSTFLAGS=-C linker=aarch64-linux-gnu-gcc" >> $GITHUB_ENV | |
echo "OPENSSL_DIR=/usr/aarch64-linux-gnu" >> $GITHUB_ENV | |
echo "OPENSSL_LIB_DIR=/usr/aarch64-linux-gnu/lib" >> $GITHUB_ENV | |
echo "OPENSSL_INCLUDE_DIR=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV | |
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV | |
- name: Build the project for ARM64 | |
run: cargo build --release --target=aarch64-unknown-linux-gnu | |
- name: Upload ARM64 binary (optional) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: my_project_arm64 | |
path: target/aarch64-unknown-linux-gnu/release/my_executable |