Introduction to the Automatic Upload of RT-Thread CI Build Artifacts
This article is contributed by RTT Xiaoyao
Recently, in the RT-Thread open-source project, we have introduced a practical feature improvement: automatically uploading the artifacts generated from each CI (Continuous Integration) build to GitHub. This makes it easier for developers and users to access and test the latest compiled results.
Reference link: https://github.com/RT-Thread/rt-thread/actions/runs/14015695988
Below, we will provide a detailed introduction to this feature.
1. Background of the Function
In the software development process, Continuous Integration (CI) is a crucial step to ensure code quality and smooth project progression. After each code submission, the CI system automatically compiles and tests the code, generating corresponding outputs known as artifacts. However, previously, these artifacts were stored only within the CI system, making it impossible for developers to access the latest compiled results for testing and verification. Additionally, for older commits, developers had to download the code and recompile it for testing.
With this new functionality, each commit will now produce corresponding artifacts, providing a convenient basis for future issue tracing.
2. Implementation of the Function
Using GitHub Actions, we have incorporated an artifact upload step into the CI process of the RT-Thread project. Specifically, after each successful CI build, the system automatically uploads the generated executable files (elf, hex, bin) to the corresponding GitHub Actions run log. This process requires no manual intervention, ensuring the timeliness and accuracy of the compiled artifacts.
3. Advantages of the Function
● Convenient Access to the Latest Build Results: Developers no longer need to manually search for or request others to provide the latest compiled artifacts. They can simply visit the GitHub Actions run results page to quickly download the required files for testing.
● Improve Testing Efficiency:Team members can test and validate new code submissions more quickly, reducing time wastage caused by waiting for compiled artifacts. This accelerates the pace of discovering and resolving issues. There is no need to select the corresponding menu config to generate the artifacts each time; developers can directly download the relevant artifacts by simply placing the configuration in the YAML file.
For example, using the L496ZG, after downloading, you can obtain all the executable files.
● Convenient for Subsequent Testing and Upgrades:For testing purposes, testers can directly test the hex files to complete the testing process.
4. How to Use It During PR
Every time a Pull Request (PR) is created, a CI check will be performed. Upon completion of the checks, the results will be available in the workflow.
● In the corresponding CI workflow run logs, scroll to the bottom to view the list of generated artifacts.
● Select and download the appropriate compiled artifacts for testing and verification as needed.
The implementation of this feature marks another advancement in optimizing the development process for the RT-Thread project, aimed at providing developers with a more efficient and convenient development experience. We hope this feature will help everyone participate more effectively in the development and testing of RT-Thread, contributing to the project’s continued growth.