Skip to content

Commit

Permalink
Build todos for Raspberry Pis in build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Jan 20, 2022
1 parent 33d52b5 commit 2b3528e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,29 @@ jobs:
with:
name: todos-x86_64-apple-darwin
path: target/release/todos

todos_raspberry:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
- uses: actions/checkout@master
- name: Install cross
run: cargo install cross
- name: Enable Link Time Optimizations
run: |
echo "[profile.release]" >> Cargo.toml
echo "lto = true" >> Cargo.toml
- name: Build todos binary for Raspberry Pi 3/4 (64 bits)
run: cross build --verbose --release --package todos --target aarch64-unknown-linux-gnu
- name: Archive todos binary
uses: actions/upload-artifact@v1
with:
name: todos-aarch64-unknown-linux-gnu
path: target/aarc64-unknown-linux-gnu/release/todos
- name: Build todos binary for Raspberry Pi 2/3/4 (32 bits)
run: cross build --verbose --release --package todos --target armv7-unknown-linux-gnueabihf
- name: Archive todos binary
uses: actions/upload-artifact@v1
with:
name: todos-armv7-unknown-linux-gnueabihf
path: target/armv7-unknown-linux-gnueabihf/release/todos
10 changes: 5 additions & 5 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[target.armv7-unknown-linux-gnueabihf]
image = "iced-rs/armv7"
[target.aarch64-unknown-linux-gnu]
image = "icedrs/iced:aarch64"
xargo = false

[target.aarch64-unknown-linux-gnu]
image = "iced-rs/aarch64"
xargo = false
[target.armv7-unknown-linux-gnueabihf]
image = "icedrs/iced:armv7"
xargo = false

0 comments on commit 2b3528e

Please sign in to comment.