new action for windows build

This commit is contained in:
KlausMu 2024-03-12 22:53:29 +01:00
parent 70c3d13b5b
commit a757f61193

View file

@ -0,0 +1,53 @@
name: ESP32 and Sim build (64 and 32 bit) on Windows
on: [push,workflow_dispatch]
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- { sys: xtensa }
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
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.12"
- name: Install MSYS2 MINGW64/32 and SDL2
if: ${{matrix.sys != 'xtensa'}}
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
install: >-
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-gdb
mingw-w64-${{matrix.env}}-SDL2
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO env:ESP32
working-directory: ./Platformio
run: pio run -e esp32
- name: Build PlatformIO env:windows_linux_64bit
if: ${{matrix.sys == 'mingw64'}}
working-directory: ./Platformio
run: pio run -e windows_linux_64bit
- name: Build PlatformIO env:windows_linux_64bit
if: ${{matrix.sys == 'mingw32'}}
working-directory: ./Platformio
run: pio run -e windows_linux_32bit