Skip to content

Latest commit

 

History

History
159 lines (96 loc) · 2.87 KB

slides.md

File metadata and controls

159 lines (96 loc) · 2.87 KB
theme title
default
Welcome to Devcon

Streamlining Development with CI/CD

Benefits and Best Practices

Fu Hanxi


Contents

  • How we do CI/CD internally?
  • Tools we developed for CI/CD
  • How to use CI/CD in your project?
  • What else can CI/CD do while releasing?

Overview of Our Internal CI/CD Process


Difficulties we were Facing

  • Support multiple targets
  • Support multiple configurations
  • Interact with multiple serial devices
  • Support multiple OS and platforms

Tools We Developed for CI/CD


idf-build-apps

  • Project
  • Configuration
  • Target
  • Application

Key Features

  • Build matrix for multiple targets and configurations
  • Manifest file for fine-grained control over the build matrix
  • Skip build if the app is not modified, or the dependencies are not changed

pytest-embedded


Key Features

  • Support all operating systems and platforms
  • Run on different platforms without any code change
  • Automatically setup firmware while setup

Same Script, Different Platform​

# test_hello_world.py
from pytest_embedded_idf import IdfDut

def test_hello_world(dut: IdfDut):
    dut.expect("Hello World!")

Test ESP-IDF Project on Real Target

pytest --embedded-services esp,idf

Test arduino-esp32 Project

pytest --embedded-services esp,arduino

Test ESP-IDF Project with QEMU

pytest --embedded-services idf,qemu

How to use CI/CD in your project?


Different Platforms

Test with Real Targets

Self-hosted runners on GitHub Actions - https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners

Test with QEMU

Qemu is still under beta testing, but you can try it now.


Demo with GitHub Actions


What Else Can CI/CD Do?


Thanks for Watching!