build(mrml-cli): build on release #3
Workflow file for this run
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: mrml-cli release | |
on: | |
release: | |
types: [created] | |
workflow_call: | |
push: | |
paths: | |
- ".github/workflows/mrml-cli-release.yml" | |
jobs: | |
build-linux-amd64-binary: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: x86_64-unknown-linux-gnu | |
- name: prepare cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cli-building-${{ hashFiles('**/Cargo.lock') }} | |
- name: build binary | |
run: cargo build --locked --release --target x86_64-unknown-linux-gnu | |
build-linux-arm64-binary: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install aarch64-linux-gnu-gcc | |
run: sudo apt-get install -y gcc-aarch64-linux-gnu | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: aarch64-unknown-linux-gnu | |
- name: prepare cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cli-building-${{ hashFiles('**/Cargo.lock') }} | |
- name: build binary | |
run: cargo build --locked --release --target aarch64-unknown-linux-gnu |