Skip to content

rtc: guard against rtc error #842

rtc: guard against rtc error

rtc: guard against rtc error #842

Workflow file for this run

name: sfy-buoy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
steps:
- name: Install deps
run: |
apt-get -y update
apt-get -y install build-essential libssl-dev gcc-arm-none-eabi binutils-arm-none-eabi libclang-dev clang curl git
- name: Work around git permission issue
run: git config --global --add safe.directory /__w/sfy/sfy
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Add rust target for thumbv7em
run: |
rustup default nightly
rustup component add rust-src llvm-tools-preview rustc-dev
rustup target add thumbv7em-none-eabihf
- name: Build (buoy)
working-directory: sfy-buoy/sfy-artemis
run: cargo build --verbose --release
- name: Test (host-tests)
working-directory: sfy-buoy/
run: make host-test
- name: Build (target tests)
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-artemis.bin target/bins/sfy-fw-default-no-storage.bin
CARGO_FLAGS="--features storage" make T=r bin
mv target/sfy-artemis.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-artemis.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-artemis.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-artemis.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-artemis.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-artemis.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-artemis.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-artemis.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-artemis.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-artemis.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-artemis.bin target/bins/sfy-fw-52Hz-mooring-with-storage.bin
- uses: actions/upload-artifact@v4
with:
name: firmware
path: sfy-buoy/target/bins