|
| 1 | +name: Compile examples |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths-ignore: |
| 6 | + - '.github/workflows/cpp_lint.yml' |
| 7 | + - '.github/workflows/compile_library.yml' |
| 8 | + pull_request: |
| 9 | + paths-ignore: |
| 10 | + - '.github/workflows/cpp_lint.yml' |
| 11 | + - '.github/workflows/compile_library.yml' |
| 12 | + |
| 13 | +jobs: |
| 14 | + esp8266: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + example: |
| 20 | + - "examples/Sheets/CopyTo/CopyTo.ino" |
| 21 | + - "examples/Spreadsheets/Create/Create.ino" |
| 22 | + - "examples/Spreadsheets/Delete/Delete.ino" |
| 23 | + - "examples/Spreadsheets/Get/Get.ino" |
| 24 | + - "examples/Spreadsheets/List/List.ino" |
| 25 | + - "examples/Values/Append/Append.ino" |
| 26 | + - "examples/Values/Clear/Clear.ino" |
| 27 | + - "examples/Values/Read/Read.ino" |
| 28 | + - "examples/Values/Update/Update.ino" |
| 29 | + - "examples/Values/Create_Update_Read/Create_Update_Read.ino" |
| 30 | + |
| 31 | + |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v2 |
| 34 | + - name: Cache pip |
| 35 | + uses: actions/cache@v2 |
| 36 | + with: |
| 37 | + path: ~/.cache/pip |
| 38 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
| 39 | + restore-keys: ${{ runner.os }}-pip- |
| 40 | + - name: Cache PlatformIO |
| 41 | + uses: actions/cache@v2 |
| 42 | + with: |
| 43 | + path: ~/.platformio |
| 44 | + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} |
| 45 | + - name: Set up Python |
| 46 | + uses: actions/setup-python@v2 |
| 47 | + - name: Install PlatformIO |
| 48 | + run: | |
| 49 | + python -m pip install --upgrade pip |
| 50 | + pip install --upgrade platformio |
| 51 | + - name: Install 3rd party dependecies |
| 52 | + run: | |
| 53 | + pio lib -g install \ |
| 54 | + https://github.com/mobizt/ESP-Google-Sheet-Client |
| 55 | + |
| 56 | + - name: update library |
| 57 | + run: | |
| 58 | + pio lib --global update |
| 59 | +
|
| 60 | + - name: Run PlatformIO Examples |
| 61 | + run: | |
| 62 | + pio ci --board=d1_mini |
| 63 | + env: |
| 64 | + PLATFORMIO_CI_SRC: ${{ matrix.example }} |
| 65 | + |
| 66 | + esp32: |
| 67 | + runs-on: ubuntu-latest |
| 68 | + strategy: |
| 69 | + fail-fast: false |
| 70 | + matrix: |
| 71 | + example: |
| 72 | + - "examples/Sheets/CopyTo/CopyTo.ino" |
| 73 | + - "examples/Spreadsheets/Create/Create.ino" |
| 74 | + - "examples/Spreadsheets/Delete/Delete.ino" |
| 75 | + - "examples/Spreadsheets/Get/Get.ino" |
| 76 | + - "examples/Spreadsheets/List/List.ino" |
| 77 | + - "examples/Values/Append/Append.ino" |
| 78 | + - "examples/Values/Clear/Clear.ino" |
| 79 | + - "examples/Values/Read/Read.ino" |
| 80 | + - "examples/Values/Update/Update.ino" |
| 81 | + - "examples/Values/Create_Update_Read/Create_Update_Read.ino" |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v2 |
| 84 | + - name: Cache pip |
| 85 | + uses: actions/cache@v2 |
| 86 | + with: |
| 87 | + path: ~/.cache/pip |
| 88 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
| 89 | + restore-keys: ${{ runner.os }}-pip- |
| 90 | + - name: Cache PlatformIO |
| 91 | + uses: actions/cache@v2 |
| 92 | + with: |
| 93 | + path: ~/.platformio |
| 94 | + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} |
| 95 | + - name: Set up Python |
| 96 | + uses: actions/setup-python@v2 |
| 97 | + - name: Install PlatformIO |
| 98 | + run: | |
| 99 | + python -m pip install --upgrade pip |
| 100 | + pip install --upgrade platformio |
| 101 | +
|
| 102 | + - name: Install 3rd party dependecies |
| 103 | + run: | |
| 104 | + pio lib -g install \ |
| 105 | + https://github.com/mobizt/ESP-Google-Sheet-Client |
| 106 | + |
| 107 | + - name: update library |
| 108 | + run: | |
| 109 | + pio lib --global update |
| 110 | +
|
| 111 | + - name: Run PlatformIO Examples |
| 112 | + run: | |
| 113 | + pio ci --board=esp32dev |
| 114 | + env: |
| 115 | + PLATFORMIO_CI_SRC: ${{ matrix.example }} |
0 commit comments