From 0407a47971b2c33189de209f36d622224f4eeccb Mon Sep 17 00:00:00 2001 From: ToMe25 <38815969+ToMe25@users.noreply.github.com> Date: Thu, 11 Jan 2024 15:49:35 +0100 Subject: [PATCH] Run platform io build on multiple OSs --- .github/workflows/{pio.yml => pio_build.yml} | 24 ++++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) rename .github/workflows/{pio.yml => pio_build.yml} (65%) diff --git a/.github/workflows/pio.yml b/.github/workflows/pio_build.yml similarity index 65% rename from .github/workflows/pio.yml rename to .github/workflows/pio_build.yml index 2bac0e4..51b9de3 100644 --- a/.github/workflows/pio.yml +++ b/.github/workflows/pio_build.yml @@ -7,16 +7,25 @@ on: paths: - src/** - lib/** - - test/** - include/** - platformio.ini - - .github/workflows/pio.yml + - .github/workflows/pio_build.yml pull_request: - branches: [ master ] + branches: + - master + workflow_dispatch: + +permissions: + contents: read jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + name: Platform IO build ${{ matrix.os == 'ubuntu-latest' && 'all' || 'some' }}(${{ matrix.os }}) + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: - name: Checkout Repo uses: actions/checkout@v3 @@ -46,5 +55,10 @@ jobs: echo "MQTT Username" > mqttuser.txt echo "MQTT Password" > mqttpass.txt - - name: Run Platform IO builds + - name: Platform IO build all + if: ${{ matrix.os == 'ubuntu-latest' }} run: pio run + + - name: Platform IO build some + if: ${{ matrix.os != 'ubuntu-latest' }} + run: pio run -e esp32dev -e esp_wroom_02