|
| 1 | +name: Build Release |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + |
| 7 | +env: |
| 8 | + FILENAME_PREFIX: RTK_Surveyor_Firmware_v2.4 |
| 9 | + POINTPERFECT_TOKEN: ${{ secrets.POINTPERFECT_TOKEN }} |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + |
| 14 | + name: Build |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@master |
| 20 | + |
| 21 | + - name: Setup Arduino CLI |
| 22 | + uses: arduino/setup-arduino-cli@v1 |
| 23 | + |
| 24 | + #We limit the ESP32 core to v2.0.2 |
| 25 | + - name: Install platform |
| 26 | + run: arduino-cli core install esp32:[email protected] |
| 27 | + --additional-urls 'https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json' |
| 28 | + |
| 29 | + - name: Start config file |
| 30 | + run: arduino-cli config init |
| 31 | + |
| 32 | + - name: Enable external libs |
| 33 | + run: arduino-cli config set library.enable_unsafe_install true |
| 34 | + |
| 35 | + - name: Get Libraries |
| 36 | + run: arduino-cli lib install --git-url |
| 37 | + https://github.com/fbiego/ESP32Time.git |
| 38 | + https://github.com/me-no-dev/ESPAsyncWebServer.git |
| 39 | + https://github.com/me-no-dev/AsyncTCP.git |
| 40 | + https://github.com/JChristensen/JC_Button.git |
| 41 | + https://github.com/greiman/SdFat.git |
| 42 | + https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library.git |
| 43 | + https://github.com/sparkfun/SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library.git |
| 44 | + https://github.com/sparkfun/SparkFun_Qwiic_OLED_Arduino_Library.git |
| 45 | + https://github.com/sparkfun/SparkFun_LIS2DH12_Arduino_Library.git |
| 46 | + https://github.com/bblanchon/ArduinoJson.git |
| 47 | + https://github.com/knolleary/pubsubclient.git |
| 48 | + https://github.com/avinabmalla/ESP32_BleSerial.git |
| 49 | + |
| 50 | + - name: Compile Sketch |
| 51 | + run: arduino-cli compile --fqbn esp32:esp32:esp32 ./Firmware/RTK_Surveyor/RTK_Surveyor.ino |
| 52 | + --build-property build.partitions=partitions |
| 53 | + --build-property upload.maximum_size=3145728 |
| 54 | + --build-property "compiler.cpp.extra_flags=\"-DPOINTPERFECT_TOKEN=$POINTPERFECT_TOKEN\"" |
| 55 | + --export-binaries |
| 56 | + |
| 57 | + - name: Get current date |
| 58 | + id: date |
| 59 | + run: echo "::set-output name=date::$(date +'%b_%d_%Y')" |
| 60 | + |
| 61 | + - name: Rename binary |
| 62 | + run: | |
| 63 | + cd Firmware/RTK_Surveyor |
| 64 | + cd build |
| 65 | + cd esp32.esp32.esp32 |
| 66 | + mv RTK_Surveyor.ino.bin ${{ env.FILENAME_PREFIX }}.bin |
| 67 | +
|
| 68 | + - name: Upload binary to action |
| 69 | + uses: actions/upload-artifact@v3 |
| 70 | + with: |
| 71 | + name: ${{ env.FILENAME_PREFIX }} |
| 72 | + path: ./Firmware/RTK_Surveyor/build/esp32.esp32.esp32/${{ env.FILENAME_PREFIX }}.bin |
0 commit comments