|
6 | 6 | - main
|
7 | 7 | paths:
|
8 | 8 | - 'src/**'
|
| 9 | + - 'hal/**' |
9 | 10 | - 'platformio.ini'
|
10 | 11 |
|
11 | 12 | jobs:
|
12 |
| - Linux: |
13 |
| - runs-on: ubuntu-latest |
| 13 | + build: |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + environment: |
| 18 | + - "stm32f429_disco" |
| 19 | + - "emulator_64bits" |
| 20 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 21 | + |
| 22 | + runs-on: ${{ matrix.os }} |
14 | 23 | steps:
|
15 |
| - - name: Install Linux dependencies |
16 |
| - run: | |
17 |
| - sudo apt-get update |
18 |
| - sudo apt-get install libsdl2-dev |
19 |
| -
|
20 | 24 | - uses: actions/checkout@v4
|
21 |
| - - uses: actions/setup-python@v5 |
22 |
| - |
23 |
| - - name: Install PlatformIO |
24 |
| - run: | |
25 |
| - python -m pip install --upgrade pip |
26 |
| - pip install -U platformio |
27 |
| - platformio update |
| 25 | + with: |
| 26 | + token: ${{ secrets.OSQ_REPO_TOKEN }} |
28 | 27 |
|
29 |
| - - name: Build bare metal (stm32f429_disco) |
30 |
| - run: platformio run -e stm32f429_disco |
31 | 28 |
|
32 |
| - - name: Build emulator (sdl2, 64bits) |
33 |
| - run: platformio run -e emulator_64bits |
34 |
| - |
35 |
| - |
36 |
| - #Linux_i386: |
37 |
| - # runs-on: ubuntu-latest |
38 |
| - # steps: |
39 |
| - # - name: Install Linux dependencies |
40 |
| - # run: | |
41 |
| - # sudo dpkg --add-architecture i386 |
42 |
| - # sudo apt-get update |
43 |
| - # sudo apt-get install libsdl2-dev:i386 gcc-multilib g++-multilib |
44 |
| - # |
45 |
| - # - uses: actions/checkout@v4 |
46 |
| - # - uses: actions/setup-python@v5 |
47 |
| - # |
48 |
| - # - name: Install PlatformIO |
49 |
| - # run: | |
50 |
| - # python -m pip install --upgrade pip |
51 |
| - # pip install -U platformio |
52 |
| - # platformio update |
53 |
| - # |
54 |
| - # - name: Build emulator (sdl2, 32bits) |
55 |
| - # run: platformio run -e emulator_32bits |
56 |
| - |
57 |
| - |
58 |
| - macOS: |
59 |
| - runs-on: macos-latest |
60 |
| - steps: |
61 |
| - - name: Install macOS dependencies |
62 |
| - run: | |
63 |
| - HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2 |
64 |
| -
|
65 |
| - - uses: actions/checkout@v4 |
66 |
| - - uses: actions/setup-python@v5 |
| 29 | + - name: Setup Python |
| 30 | + uses: actions/setup-python@v5 |
| 31 | + with: |
| 32 | + python-version: "3.10" |
67 | 33 |
|
68 | 34 | - name: Install PlatformIO
|
69 | 35 | run: |
|
70 | 36 | python -m pip install --upgrade pip
|
71 | 37 | pip install -U platformio
|
72 | 38 | platformio update
|
73 | 39 |
|
74 |
| - - name: Build bare metal (stm32f429_disco) |
75 |
| - run: platformio run -e stm32f429_disco |
| 40 | + # - name: Install dependencies |
| 41 | + # run: | |
| 42 | + # pip install -U https://github.com/OS-Q/pio/archive/main.zip |
76 | 43 |
|
77 |
| - - name: Build emulator (sdl2, 64bits) |
78 |
| - run: platformio run -e emulator_64bits |
| 44 | + - name: Run on Linux |
| 45 | + if: startsWith(matrix.os, 'ubuntu') |
| 46 | + run: | |
| 47 | + sudo apt-get update |
| 48 | + sudo apt-get install libsdl2-dev |
| 49 | + platformio run -e ${{ matrix.environment }} |
79 | 50 |
|
| 51 | + - name: Run on macOS |
| 52 | + if: startsWith(matrix.os, 'macos') |
| 53 | + run: | |
| 54 | + HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2 |
| 55 | + platformio run -e ${{ matrix.environment }} |
80 | 56 |
|
81 |
| - Windows: |
82 |
| - runs-on: windows-latest |
83 |
| - steps: |
84 |
| - - name: Activate msys2 & mingw64 |
| 57 | + - name: Run on Windows |
| 58 | + if: startsWith(matrix.os, 'windows') |
85 | 59 | run: |
|
86 | 60 | echo "C:\msys64\usr\bin" >> $env:GITHUB_PATH
|
87 | 61 | echo "C:\msys64\mingw64\bin" >> $env:GITHUB_PATH
|
88 |
| -
|
89 |
| - - name: Install deps |
90 |
| - run: | |
91 | 62 | pacman --noconfirm -S --needed mingw-w64-x86_64-SDL2
|
92 | 63 | gcc --version
|
93 |
| -
|
94 |
| - - uses: actions/checkout@v4 |
95 |
| - #- uses: actions/setup-python@v5 |
96 |
| - |
97 |
| - - name: Install PlatformIO |
98 |
| - run: | |
99 |
| - python -m pip install --upgrade pip |
100 |
| - pip install -U platformio |
101 |
| - platformio update |
102 |
| -
|
103 |
| - - name: Build bare metal (stm32f429_disco) |
104 |
| - run: platformio run -e stm32f429_disco |
105 |
| - |
106 |
| - - name: Build emulator (sdl2, 64bits) |
107 |
| - run: platformio run -e emulator_64bits |
| 64 | + platformio run -e ${{ matrix.environment }} |
0 commit comments