Skip to content

Commit 8c1b3e0

Browse files
committed
Create workflow for RC binary creation
1 parent 1dcaba8 commit 8c1b3e0

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/compile-rc.yml

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

0 commit comments

Comments
 (0)