From 97aff1fa70bf830d25da63fcab40d3edbf1b2689 Mon Sep 17 00:00:00 2001 From: ShallowGreen123 <2608653986@qq.com> Date: Mon, 2 Sep 2024 10:42:05 +0800 Subject: [PATCH] =?UTF-8?q?test=EF=BC=9AUpdate=20GitHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/platformio.yml | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/platformio.yml diff --git a/.github/workflows/platformio.yml b/.github/workflows/platformio.yml new file mode 100644 index 0000000..35851a2 --- /dev/null +++ b/.github/workflows/platformio.yml @@ -0,0 +1,51 @@ +name: PlatformIO CI + +# GitHub Actions 的工作流语法 : https://docs.github.com/zh/actions/writing-workflows/workflow-syntax-for-github-actions + +on: + push: + paths: # 推送以下文件时,就会运行工作流 + - "examples/**" + - ".github/workflows/platformio.yml" + - "platformio.ini" + +jobs: + build: + runs-on: ${{ matrix.os }} # 指定的运行器环境中运行 + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + example: + - examples/factory + - examples/test_BHI260AP + - examples/test_EPD + - examples/test_factory + - examples/test_GPS + - examples/test_keypad + - examples/test_lora_recv + - examples/test_lora_send + - examples/test_LTR_553ALS + - examples/test_lvgl + - examples/test_sd + - examples/test_touchpad + - examples/test_wifi + + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: | + ~/.cache/pip + ~/.platformio/.cache + key: ${{ runner.os }}-pio + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install PlatformIO Core + run: pip install --upgrade platformio + + - name: Run PlatformIO + run: pio ci --lib="." --board=uno --board=teensy31 --board=due + env: + PLATFORMIO_CI_SRC: ${{ matrix.example }} \ No newline at end of file