|
| 1 | +name: Main workflow |
| 2 | +on: |
| 3 | + push: |
| 4 | + tags: |
| 5 | + - '*' |
| 6 | + |
| 7 | +jobs: |
| 8 | + build3: |
| 9 | + name: Build libraries v3 |
| 10 | + runs-on: ubuntu-latest |
| 11 | + container: |
| 12 | + image: espressif/esp32-arduino-lib-builder |
| 13 | + volumes: |
| 14 | + - ${{ github.workspace }}:/w |
| 15 | + steps: |
| 16 | + - name: Install zip |
| 17 | + run: apt update && apt install -y zip |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v4 |
| 20 | + - name: Modify configs |
| 21 | + run: | |
| 22 | + for path in `ls /w/configs/defconfig.*` |
| 23 | + do |
| 24 | + config=$(basename $path) |
| 25 | + cat /w/configs/$config >>/opt/esp/lib-builder/configs/$config |
| 26 | + done |
| 27 | + - name: Build |
| 28 | + run: | |
| 29 | + cd /opt/esp/lib-builder/ |
| 30 | + ./build.sh |
| 31 | + - name: Zip artifacts |
| 32 | + run: | |
| 33 | + cd /opt/esp/lib-builder/out/tools/ |
| 34 | + zip -r /w/esp32-arduino-libs.zip esp32-arduino-libs |
| 35 | + - name: Upload artifacts |
| 36 | + uses: actions/upload-artifact@v4 |
| 37 | + with: |
| 38 | + name: esp32-arduino-libs-v3 |
| 39 | + path: /w/*.zip |
| 40 | + |
| 41 | + build2: |
| 42 | + name: Build libraries v2 |
| 43 | + runs-on: ubuntu-latest |
| 44 | + container: |
| 45 | + image: espressif/esp32-arduino-lib-builder |
| 46 | + volumes: |
| 47 | + - ${{ github.workspace }}:/w |
| 48 | + steps: |
| 49 | + - name: Install zip |
| 50 | + run: apt update && apt install -y unzip zip |
| 51 | + - name: Checkout |
| 52 | + uses: actions/checkout@v4 |
| 53 | + - name: Switch to branch |
| 54 | + run: | |
| 55 | + cd /opt/esp/lib-builder/ |
| 56 | + git switch release/v4.4 |
| 57 | + - name: Modify configs |
| 58 | + run: | |
| 59 | + for path in `ls /w/configs/defconfig.*` |
| 60 | + do |
| 61 | + config=$(basename $path) |
| 62 | + cat /w/configs/$config >>/opt/esp/lib-builder/configs/$config |
| 63 | + done |
| 64 | + - name: Build |
| 65 | + run: | |
| 66 | + cd /opt/esp/lib-builder/ |
| 67 | + ./build.sh |
| 68 | + - name: Zip artifacts |
| 69 | + run: | |
| 70 | + ver=2.0.17 |
| 71 | + cd /w/ |
| 72 | + wget https://github.com/espressif/arduino-esp32/releases/download/$ver/esp32-$ver.zip |
| 73 | + unzip esp32-$ver.zip |
| 74 | + rm -f esp32-$ver.zip |
| 75 | + cp -r /opt/esp/lib-builder/out/tools/* esp32-$ver/tools/ |
| 76 | + zip -r esp32-$ver.zip esp32-$ver |
| 77 | + - name: Upload artifacts |
| 78 | + uses: actions/upload-artifact@v4 |
| 79 | + with: |
| 80 | + name: esp32-arduino-libs-v2 |
| 81 | + path: /w/*.zip |
| 82 | + |
| 83 | + release: |
| 84 | + needs: [build2, build3] |
| 85 | + name: Release |
| 86 | + runs-on: ubuntu-latest |
| 87 | + permissions: |
| 88 | + contents: write |
| 89 | + pull-requests: write |
| 90 | + repository-projects: write |
| 91 | + steps: |
| 92 | + - name: Download artifacts |
| 93 | + uses: actions/download-artifact@v4 |
| 94 | + - name: Release |
| 95 | + uses: softprops/action-gh-release@v2 |
| 96 | + with: |
| 97 | + files: | |
| 98 | + esp32-arduino-libs-v2/*.zip |
| 99 | + esp32-arduino-libs-v3/*.zip |
0 commit comments