Add sources.list for building #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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust for Raspberry Pi cross-compilation | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: arm-unknown-linux-gnueabihf | |
- name: Prepare for cross compilation | |
run: sudo dpkg --add-architecture armhf && sudo apt-get update | |
- name: Install dependencies for cross-compilation | |
run: sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross libsqlite3-0:armhf | |
- name: Build binary for Raspberry Pi | |
run: cargo build --release --target=arm-unknown-linux-gnueabihf | |
- name: Upload binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: boiler-watch-api | |
path: target/arm-unknown-linux-gnueabihf/release/boiler-watch-api |