From 3827c83be4ddfad6b69ffa761e98d928012beb00 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Tue, 28 Feb 2023 11:52:24 +0100 Subject: [PATCH 1/2] ci: split arduino and pio builds Signed-off-by: Frederic Pillon --- ...uous-Integration.yml => Arduino-build.yml} | 23 +++------- .github/workflows/PIO-build.yml | 44 +++++++++++++++++++ 2 files changed, 49 insertions(+), 18 deletions(-) rename .github/workflows/{Continuous-Integration.yml => Arduino-build.yml} (65%) create mode 100644 .github/workflows/PIO-build.yml diff --git a/.github/workflows/Continuous-Integration.yml b/.github/workflows/Arduino-build.yml similarity index 65% rename from .github/workflows/Continuous-Integration.yml rename to .github/workflows/Arduino-build.yml index 37b6b8d1b0..66bced91ca 100644 --- a/.github/workflows/Continuous-Integration.yml +++ b/.github/workflows/Arduino-build.yml @@ -1,33 +1,31 @@ -name: STM32 Core Continuous Integration +name: STM32 Core build using arduino-cli on: push: branches: - main paths-ignore: - .github/** - - '!.github/workflows/Continuous-Integration.yml' + - '!.github/workflows/Arduino-build.yml' - '*.json' - '**.md' - keywords.txt - CI/** - '!CI/build/arduino-cli.py' - - '!CI/build/platformio-builder.py' - '!CI/build/examples/**' + - cmake/** - tools/** - - '!tools/platformio-build.py' pull_request: paths-ignore: - .github/** - - '!.github/workflows/Continuous-Integration.yml' + - '!.github/workflows/Arduino-build.yml' - '*.json' - '**.md' - keywords.txt - CI/** - '!CI/build/arduino-cli.py' - - '!CI/build/platformio-builder.py' - '!CI/build/examples/**' + - cmake/** - tools/** - - '!tools/platformio-build.py' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: @@ -51,14 +49,3 @@ jobs: run: | cat ${{ steps.Compile.outputs.compile-result }} exit 1 - pio_build: - runs-on: ubuntu-latest - name: PlatformIO test - steps: - # First of all, clone the repo using the checkout action. - - name: Checkout - uses: actions/checkout@main - - - name: PlatformIO - id: Compile - uses: ./.github/actions/pio-build diff --git a/.github/workflows/PIO-build.yml b/.github/workflows/PIO-build.yml new file mode 100644 index 0000000000..23316d9a3c --- /dev/null +++ b/.github/workflows/PIO-build.yml @@ -0,0 +1,44 @@ +name: PlatformIO build +on: + push: + branches: + - main + paths-ignore: + - .github/** + - '!.github/actions/pio-build/**' + - '!.github/workflows/PIO-build.yml' + - '*.json' + - '**.md' + - keywords.txt + - CI/** + - '!CI/build/platformio-builder.py' + - cmake/** + - tools/** + - '!tools/platformio-build.py' + pull_request: + paths-ignore: + - .github/** + - '!.github/actions/pio-build/**' + - '!.github/workflows/PIO-build.yml' + - '*.json' + - '**.md' + - keywords.txt + - CI/** + - '!CI/build/platformio-builder.py' + - cmake/** + - tools/** + - '!tools/platformio-build.py' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + pio_build: + runs-on: ubuntu-latest + name: PlatformIO test + steps: + # First of all, clone the repo using the checkout action. + - name: Checkout + uses: actions/checkout@main + + - name: PlatformIO + id: Compile + uses: ./.github/actions/pio-build From 014cb89311b7c8483e6a774cad41778c1f06c8e5 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Tue, 28 Feb 2023 11:52:45 +0100 Subject: [PATCH 2/2] ci(cmake): build only if needed Signed-off-by: Frederic Pillon --- .github/workflows/Cmake.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/Cmake.yml b/.github/workflows/Cmake.yml index f136ea76c2..8091e00221 100644 --- a/.github/workflows/Cmake.yml +++ b/.github/workflows/Cmake.yml @@ -4,7 +4,23 @@ on: push: branches: - main + paths-ignore: + - .github/** + - '!.github/workflows/Cmake.yml' + - '*.json' + - '**.md' + - keywords.txt + - CI/** + - tools/** pull_request: + paths-ignore: + - .github/** + - '!.github/workflows/Arduino-build.yml' + - '*.json' + - '**.md' + - keywords.txt + - CI/** + - tools/** # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: