Extend CI/CD to build firmware for all hardware#36
Extend CI/CD to build firmware for all hardware#36glopesdev wants to merge 15 commits intoharp-tech:mainfrom
Conversation
This will ensure the same steps are used when building the firmware either from Atmel Studio or through the CI pipeline.
Currently uses the same AVR-GCC toolchain version to ensure reproducible builds.
Define version numbers using conditional preprocessor flags which are then set via Makefile variants.
|
Feedback from SRM:
|
This is temporary for backwards compatibility until we review firmware file naming conventions.
|
@bruno-f-cruz Added the As discussed we will temporarily use the |
To drop the preview suffix entirely, release tags are expected to start with the character 'v'.
Firmware hex files and packages are included in release assets.
|
@bruno-f-cruz We floated briefly the idea of embedding the
I believe both can work. I like conceptually the idea of simply using the github release tag as the point where we "choose" our versions, same as with other bonsai packages. Otherwise, there is always the possibility of a mismatch between what is in written in the On the other hand, pulling everything from the |
Firmware preview builds are temporarily set contingent on run numbers or removed for releases.
Makefile is refactored to accept arbitrary semver version strings for both firmware and hardware. A specialized fork of configure-build is used to ensure device metadata version is conformant with repository release version.
Extend makefile to accept semver versions with prerelease. Build metadata suffixes are not accepted unless they are prerelease versions. Assembly version defines are removed as they are not used in the new overload.
This avoids relying on specific tag naming conventions and improves future-proofing.
Reads app.h definitions to allow naming files while avoiding redundant specification of version numbers. WHO_AM_I is now also declared in app.h for completeness.
a83c017 to
8075327
Compare
Makefile reads app.h to avoid repeating device name declaration.
For future reference, we ended up going this route, and made all changes required to unify |
Using an external Makefile to build the firmware will ensure that the same steps are used when building the firmware either from Atmel Studio or through the CI pipeline.
Firmware build step on GitHub Actions workflow uses the same AVR-GCC toolchain version to ensure reproducible builds. Version numbers are defined using conditional preprocessor flags which are overridden via Makefile variables to allow building for different hardware targets.