feat: Add GitHub Actions for CI and Release#1
Merged
manupawickramasinghe merged 5 commits intomasterfrom Aug 19, 2025
Merged
Conversation
This change introduces two GitHub Actions workflows to automate the build and release process for the stm32-slcan firmware. The `ci.yml` workflow is triggered on every push to the `master` branch and on pull requests. It builds the firmware and uploads the resulting binaries as artifacts. This will help ensure that the firmware always compiles correctly. The `release.yml` workflow is triggered when a new tag is pushed (e.g., `v1.0.0`). It builds the firmware and then creates a GitHub Release, attaching the compiled `.bin` and `.elf` files as release assets. This automates the process of releasing new versions of the firmware.
The previous implementation of the CI and Release workflows was failing because the `libopencm3` git submodule was not being checked out. This resulted in a "file not found" error during the `make` process. This commit adds `with: submodules: 'recursive'` to the `actions/checkout` step in both `ci.yml` and `release.yml` to ensure that all submodules are correctly checked out before the build starts.
The CI and Release workflows were failing because the `libopencm3` library was not being built before the main firmware project. This resulted in "file not found" errors for headers and linker errors for the library. This commit adds a `make -C libopencm3` step to both `ci.yml` and `release.yml` to ensure that the dependency is built before the main project.
This is a temporary commit to debug an issue where the `upload-artifact` action cannot find the compiled firmware binaries. This commit adds a step to `ci.yml` that runs `ls -R` after the `make` command. The output of this command will be used to determine the correct path to the build artifacts. This step should be removed once the issue is resolved.
This change introduces two GitHub Actions workflows to automate the build and release process for the stm32-slcan firmware. The `ci.yml` workflow is triggered on every push to the `master` branch and on pull requests. It performs the following steps: 1. Checks out the repository, including git submodules. 2. Installs the necessary build dependencies (`gcc-arm-none-eabi`, `make`). 3. Builds the `libopencm3` library. 4. Builds the main firmware project. 5. Uploads the compiled firmware binaries (`stm32-slcan.bin`, `stm32-slcan.elf`) as build artifacts. The `release.yml` workflow is triggered when a new tag is pushed (e.g., `v1.0.0`). It performs the same build steps as the CI workflow and then creates a GitHub Release, attaching the compiled firmware binaries as release assets. This automates the entire build and release pipeline, ensuring that every change is tested and that releases are easy to create.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change introduces two GitHub Actions workflows to automate the build and release process for the stm32-slcan firmware.
The
ci.ymlworkflow is triggered on every push to themasterbranch and on pull requests. It builds the firmware and uploads the resulting binaries as artifacts. This will help ensure that the firmware always compiles correctly.The
release.ymlworkflow is triggered when a new tag is pushed (e.g.,v1.0.0). It builds the firmware and then creates a GitHub Release, attaching the compiled.binand.elffiles as release assets. This automates the process of releasing new versions of the firmware.