Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cmake): Add sensor variant firmware ci #766

Merged
merged 6 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/build_sensor_fw.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Build firmware sensor variant bundles"
on:
push:
branches:
- '*'
tags:
- 'v*'
workflow_dispatch:

env:
ci: 1

defaults:
run:
shell: bash

jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"
timeout-minutes: 20
steps:
- uses: "actions/checkout@v2"
with:
fetch-depth: 0
- uses: "actions/cache@v3"
with:
path: "./stm32-tools"
key: ${{ runner.os }}-${{ hashFiles('**/cmake/*') }}-${{ secrets.CACHE_VERSION }}
- name: 'CMake configure'
run: |
cmake --preset=cross-sensor-buffer . -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: 'Build images'
run: |
cmake --build --preset=firmware-g4-sensors --target firmware-applications firmware-images
- name: 'Prep images for upload'
run: |
cmake --install ./build-cross-sensor
- name: 'Upload application artifact'
uses: actions/upload-artifact@v3
with:
name: 'firmware-applications-${{github.ref_name}}'
path: |
dist-sensor/applications/*
14 changes: 7 additions & 7 deletions .github/workflows/cross-compile-special-sensors.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "cross-compile/format/lint all targets"
name: "cross-compile-sensors/format/lint all targets"
on:
push:
branches:
Expand Down Expand Up @@ -47,10 +47,10 @@ jobs:
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Configure
run: cmake --preset=cross . -DUSE_PRESSURE_MOVE=true
run: cmake --preset=cross-sensor-buffer .

- name: Build all STM32G4 applications
run: cmake --build --preset=${{ matrix.target }} --target ${{ matrix.target }}-images ${{ matrix.target }}-applications
run: cmake --build ./build-cross-sensor --target ${{ matrix.target }}-images ${{ matrix.target }}-applications

format:
runs-on: "ubuntu-20.04"
Expand All @@ -76,10 +76,10 @@ jobs:
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Configure
run: cmake --preset=cross . -DUSE_PRESSURE_MOVE=true
run: cmake --preset=cross-sensor-buffer .

- name: Format
run: cmake --build ./build-cross --target format-ci
run: cmake --build ./build-cross-sensor --target format-ci

lint:
runs-on: "ubuntu-20.04"
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Configure
run: cmake --preset=cross . -DUSE_PRESSURE_MOVE=true
run: cmake --preset=cross-sensor-buffer .

- name: Format
run: cmake --build ./build-cross --target ${{ matrix.target }}-lint
run: cmake --build ./build-cross-sensor --target ${{ matrix.target }}-lint
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CMakeUserPresets.json
*.pyc
build-cross/
build-cross-pipettes/
build-cross-sensor/
stm32-tools/
build-host/
cmake-build-debug/
Expand All @@ -17,3 +18,4 @@ state_manager/coverage.xml
state_manager/dist/
state_manager/poetry.toml
dist/
dist-sensor/
22 changes: 22 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@
"binaryDir": "${sourceDir}/build-cross",
"inherits": "cross-no-directory-reqs"
},
{
"name": "cross-sensor-buffer",
"displayName": "STM32 G4 OT-3 cross-compilation with sensor data buffers",
"description": "Build application firmware for OT-3 systems that use STM32, for flashing onto boards",
"installDir": "${sourceDir}/dist-sensor",
"binaryDir": "${sourceDir}/build-cross-sensor",
"cacheVariables": {
"USE_PRESSURE_MOVE": true
},
"inherits": "cross"
},
{
"name": "host",
"displayName": "STM32 OT-3 host compilation for tests",
Expand Down Expand Up @@ -88,6 +99,17 @@
"firmware-images"
]
},
{
"name": "firmware-g4-sensors",
"displayName": "All G4 Firmwares With Sensor Data Buffers",
"description": "Environment to build all g4 firmware - see firmware-l5",
"configurePreset": "cross-sensor-buffer",
"jobs": 4,
"targets": [
"firmware-applications",
"firmware-images"
]
},
{
"name": "pipettes",
"displayName": "pipettes binaries",
Expand Down
Loading