Skip to content

Commit

Permalink
build firmware (fix #48)
Browse files Browse the repository at this point in the history
  • Loading branch information
gauteh committed Sep 10, 2024
1 parent 706a538 commit b938f7a
Showing 1 changed file with 66 additions and 2 deletions.
68 changes: 66 additions & 2 deletions .github/workflows/sfy-buoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

env:
CARGO_TERM_COLOR: always
BUOYPR: test.product

jobs:
build:
Expand Down Expand Up @@ -41,7 +40,7 @@ jobs:
- name: Build (buoy)
working-directory: sfy-buoy/sfy-artemis
run: cargo build --verbose
run: cargo build --verbose --release

- name: Test (host-tests)
working-directory: sfy-buoy/
Expand All @@ -51,3 +50,68 @@ jobs:
working-directory: sfy-buoy/target-test
run: cargo build --verbose --tests

- name: Build firmware (default)
working-directory: sfy-buoy/
run: |
mkdir -p target/bins
make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-default-no-storage.bin
CARGO_FLAGS="--features storage" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-default-with-storage.bin
- name: Build firmware (5 min GPS)
working-directory: sfy-buoy/
run: |
mkdir -p target/bins
GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-5min-gps-no-storage.bin
GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features storage" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-5min-gps-with-storage.bin
- name: Build firmware (surf)
working-directory: sfy-buoy/
run: |
mkdir -p target/bins
GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features surf" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-surf-no-storage.bin
GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features surf,storage" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-surf-with-storage.bin
- name: Build firmware (26Hz, 10min GPS, drifter)
working-directory: sfy-buoy/
run: |
mkdir -p target/bins
GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features 20Hz" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-26Hz-drifter-no-storage.bin
GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features 20Hz,storage" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-26Hz-drifter-with-storage.bin
- name: Build firmware (Mooring, 1h gps, 26Hz)
working-directory: sfy-buoy/
run: |
mkdir -p target/bins
GPS_PERIOD=3600 GPS_HEARTBEAT=1 SYNC_PERIOD=40 CARGO_FLAGS="--features 20Hz" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-26Hz-mooring-no-storage.bin
GPS_PERIOD=3600 GPS_HEARTBEAT=1 SYNC_PERIOD=40 CARGO_FLAGS="--features 20Hz,storage" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-26Hz-mooring-with-storage.bin
- name: Build firmware (Mooring, 1h gps, 52Hz)
working-directory: sfy-buoy/
run: |
mkdir -p target/bins
GPS_PERIOD=3600 GPS_HEARTBEAT=1 SYNC_PERIOD=40 make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-52Hz-mooring-no-storage.bin
GPS_PERIOD=3600 GPS_HEARTBEAT=1 SYNC_PERIOD=40 CARGO_FLAGS="--features storage" make T=r bin
mv target/sfy-buoy.bin target/bins/sfy-fw-52Hz-mooring-with-storage.bin
- uses: actions/upload-artifact@v4
with:
name: firmware
path: sfy-buoy/target/bins

0 comments on commit b938f7a

Please sign in to comment.