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: Build | ||
on: | ||
workflow_call: | ||
inputs: | ||
upload: | ||
description: 'Whether to upload created artifacts to the current release' | ||
default: false | ||
required: false | ||
type: boolean | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
name: Build blazecli | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# Please update the test workflow cross-compile matrix when adding a new | ||
# target here. | ||
target: [ | ||
aarch64-linux-android, | ||
arm-linux-androideabi, | ||
armv7-linux-androideabi, | ||
x86_64-unknown-linux-musl, | ||
] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/setup-cross-toolchain-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
- run: | | ||
cargo install --path=cli --root=. --target ${{ matrix.target }} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: blazecli-${{ matrix.target }} | ||
path: bin/blazecli | ||
- if: ${{ inputs.upload }} == 'true' | ||
name: Upload release asset | ||
run: | | ||
mv bin/blazecli blazecli-${{ matrix.target }} | ||
gh release upload assets blazecli-${{ matrix.target }} |