Skip to content

Commit

Permalink
Use GitHub Actions for continuous integration with firmware builds (#43)
Browse files Browse the repository at this point in the history
* Add a basic Github Action for continuous integration

This github action script installs the required
dependencies before building both SINE and FOC
variants. Unit tests are compiled and run though the
unit tests are expected to fail.

* Update readme to use Github Action for build status

Use relative paths to the github action for continuous
integration builds rather than Travis-CI.

* Disable unit test running in CI until they can be fixed

The unit tests report several failures. Don't run them
until an effort can be spent on fixing them.

* Disable unit test build in CI until they can be fixed

* Publish CI build binaries

This updates the Github Action CI build
process to "upload" the binaries from the
SINE and FOC builds. These will be retained
for 90 days by default.

Update the git checkout action to the latest
release as everything is being tested together.

Tests:
 - Verified after push

* Don't use wildcard patterns for uploads
  • Loading branch information
davefiddes authored Feb 18, 2024
1 parent 0f0e8f8 commit 151858b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/CI-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI
on:
push:
pull_request:

jobs:
build:
name: build-linux
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install build package dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi
- name: Build dependencies
run: |
echo "Number of processors:" `nproc`
make get-deps -j `nproc`
- name: Build SINE firmware
run: |
make CONTROL=SINE clean all
- uses: actions/upload-artifact@v4
with:
name: SINE firmware binary
path: stm32_sine.bin

- uses: actions/upload-artifact@v4
with:
name: SINE firmware hex
path: stm32_sine.hex

- name: Build FOC firmware
run: |
make CONTROL=FOC clean all
- uses: actions/upload-artifact@v4
with:
name: FOC firmware binary
path: stm32_foc.bin

- uses: actions/upload-artifact@v4
with:
name: FOC firmware hex
path: stm32_foc.hex

# Unit tests are currently broken so don't build and run them for now
#- name: Build unit tests on host
# run: |
# make -C test
#
# - name: Run unit tests on host
# run: |
# test/test_sine

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/jsphuebner/stm32-sine.svg?branch=master)](https://travis-ci.com/jsphuebner/stm32-sine)
[![Build status](../../actions/workflows/CI-build.yml/badge.svg)](../../actions/workflows/CI-build.yml)

# stm32-sine
Main firmware of the Huebner inverter project
Expand Down

0 comments on commit 151858b

Please sign in to comment.