Combine workflow steps and upload executable #12
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: Docker Image CI | |
on: | |
push: | |
branches: [ "main", "testing-ci" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build container for cross-compilation | |
run: docker build docker/ -f docker/pizero.dockerfile -t pizero:local | |
- name: Cross-compile haxo001 for Raspberry Pi Zero | |
run: | | |
docker run --rm --mount "type=bind,source=$(pwd),target=/haxo" \ | |
--mount "type=bind,source=$HOME/.cargo,target=/cargo" pizero:local \ | |
cargo build --target arm-unknown-linux-gnueabihf --release --features midi | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: haxo001-rpiz | |
path: target/arm-unknown-linux-gnueabihf/release/haxo001 |