Skip to content

Comments

feat: Add GitHub Actions for CI and Release#1

Merged
manupawickramasinghe merged 5 commits intomasterfrom
add-ci-cd-workflows
Aug 19, 2025
Merged

feat: Add GitHub Actions for CI and Release#1
manupawickramasinghe merged 5 commits intomasterfrom
add-ci-cd-workflows

Conversation

@manupawickramasinghe
Copy link
Member

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.

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.
@manupawickramasinghe manupawickramasinghe merged commit f3798cd into master Aug 19, 2025
1 check passed
@manupawickramasinghe manupawickramasinghe deleted the add-ci-cd-workflows branch August 19, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant