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