-
Notifications
You must be signed in to change notification settings - Fork 130
63 lines (55 loc) · 1.97 KB
/
build-platformio-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Windows build
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:
update: true
msystem: ${{matrix.sys}}
install: >-
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-SDL2
- name: Add paths mingw64
if: ${{matrix.sys == 'mingw64'}}
run: |
echo "${{runner.temp}}\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{runner.temp}}\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Add paths mingw32
if: ${{matrix.sys == 'mingw32'}}
run: |
echo "${{runner.temp}}\msys64\mingw32\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{runner.temp}}\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- 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_64bit
if: ${{matrix.sys == 'mingw64'}}
working-directory: ./Platformio
run: pio run -e windows_64bit
- name: Build PlatformIO env:windows_32bit
if: ${{matrix.sys == 'mingw32'}}
working-directory: ./Platformio
run: pio run -e windows_32bit