Skip to content

Commit

Permalink
cli: Build for more targets
Browse files Browse the repository at this point in the history
It can come in handy to have blazecli readily build for more targets,
especially for Android, where it can be especially painful to get a
working build from scratch.
This change adjusts the build workflow to use a proper cross compilation
setup that makes it easy for us to accomplish the same. With that in
hand, it adds builds for a few Android targets.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o committed Nov 16, 2023
1 parent d8d963a commit 881a692
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,26 @@ on:

jobs:
build:
name: Build statically linked binary
name: Build
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
- name: Install dependencies
run: sudo apt-get install musl-tools
- uses: actions-rs/toolchain@v1
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
toolchain: stable
profile: minimal
override: true
target: x86_64-unknown-linux-musl
target: ${{ matrix.target }}
- run: |
cargo install --path=cli --root=. --target x86_64-unknown-linux-musl
strip bin/blazecli
cargo install --path=cli --root=. --target ${{ matrix.target }}
- uses: actions/upload-artifact@v3
with:
name: blazecli
name: blazecli-${{ matrix.target }}
path: bin/blazecli

0 comments on commit 881a692

Please sign in to comment.