|
| 1 | +# Cross-platform builds to ensure our Core and toolchain works |
| 2 | + |
| 3 | +name: Build IDE examples |
| 4 | + |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + paths-ignore: |
| 8 | + - "boards.txt" |
| 9 | + - "package/**" |
| 10 | + - "tools/boards.txt.py" |
| 11 | + - 'doc/**' |
| 12 | + |
| 13 | +permissions: |
| 14 | + contents: read |
| 15 | + |
| 16 | +jobs: |
| 17 | + |
| 18 | + # Examples are built in parallel to avoid CI total job time limitation |
| 19 | + |
| 20 | + build-linux: |
| 21 | + name: Linux - LwIP ${{ matrix.lwip }} (${{ matrix.chunk }}) |
| 22 | + runs-on: ubuntu-latest |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + shell: bash |
| 26 | + strategy: |
| 27 | + matrix: |
| 28 | + lwip: ["default", "IPv6"] |
| 29 | + chunk: [0, 1, 2, 3, 4, 5, 6, 7] |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v3 |
| 32 | + with: |
| 33 | + submodules: true |
| 34 | + - uses: actions/setup-python@v4 |
| 35 | + with: |
| 36 | + python-version: '3.x' |
| 37 | + - uses: actions/cache@v3 |
| 38 | + with: |
| 39 | + path: ./tools/dist |
| 40 | + key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh', 'tests/build.sh') }} |
| 41 | + - name: Build Sketches |
| 42 | + env: |
| 43 | + ESP8266_ARDUINO_BUILDER: "arduino" |
| 44 | + ESP8266_ARDUINO_IDE: "${{ runner.temp }}/arduino_ide" |
| 45 | + ESP8266_ARDUINO_LWIP: ${{ matrix.lwip }} |
| 46 | + run: | |
| 47 | + bash ./tests/build.sh 8 ${{ matrix.chunk }} |
| 48 | +
|
| 49 | + # Just try to build at least one sketch, since we spend so much time with the matrix above |
| 50 | + |
| 51 | + build-windows: |
| 52 | + name: Windows |
| 53 | + runs-on: windows-latest |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v3 |
| 56 | + with: |
| 57 | + submodules: false |
| 58 | + - uses: actions/setup-python@v4 |
| 59 | + with: |
| 60 | + python-version: '3.x' |
| 61 | + - uses: actions/cache@v3 |
| 62 | + with: |
| 63 | + path: ./tools/dist |
| 64 | + key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh', 'tests/build.sh') }} |
| 65 | + - name: Build Sketch |
| 66 | + env: |
| 67 | + ESP8266_ARDUINO_HARDWARE: "${{ runner.temp }}/hardware" |
| 68 | + ESP8266_ARDUINO_IDE: "${{ runner.temp }}/arduino_ide" |
| 69 | + ESP8266_ARDUINO_SKETCHES: "libraries/esp8266/examples/Blink/Blink.ino" |
| 70 | + run: | |
| 71 | + bash ./tests/build.sh |
| 72 | +
|
| 73 | + build-mac: |
| 74 | + name: macOS |
| 75 | + runs-on: macOS-latest |
| 76 | + defaults: |
| 77 | + run: |
| 78 | + shell: bash |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v3 |
| 81 | + with: |
| 82 | + submodules: false |
| 83 | + - uses: actions/setup-python@v4 |
| 84 | + with: |
| 85 | + python-version: '3.x' |
| 86 | + - uses: actions/cache@v3 |
| 87 | + with: |
| 88 | + path: ./tools/dist |
| 89 | + key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh', 'tests/build.sh') }} |
| 90 | + - name: Build Sketch |
| 91 | + env: |
| 92 | + ESP8266_ARDUINO_HARDWARE: "${{ runner.temp }}/hardware" |
| 93 | + ESP8266_ARDUINO_IDE: "${{ runner.temp }}/arduino_ide" |
| 94 | + ESP8266_ARDUINO_SKETCHES: "libraries/esp8266/examples/Blink/Blink.ino" |
| 95 | + run: | |
| 96 | + bash ./tests/build.sh |
0 commit comments