Skip to content

Commit 05c0698

Browse files
committed
Update workflows
1 parent c5d77a6 commit 05c0698

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

.github/workflows/compile-rtk-firmware.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ env:
88
FIRMWARE_VERSION_MAJOR: 4
99
FIRMWARE_VERSION_MINOR: 2
1010
POINTPERFECT_TOKEN: ${{ secrets.POINTPERFECT_TOKEN }}
11+
#We limit the ESP32 core to v2.0.2
12+
CORE_VERSION: 2.0.2
1113

1214
jobs:
1315
build:
@@ -17,7 +19,7 @@ jobs:
1719

1820
steps:
1921
- name: Checkout
20-
uses: actions/checkout@master
22+
uses: actions/checkout@main
2123

2224
- name: Get current date
2325
id: date
@@ -59,9 +61,14 @@ jobs:
5961
- name: Update index
6062
run: arduino-cli core update-index
6163

62-
#We limit the ESP32 core to v2.0.2
6364
- name: Install platform
64-
run: arduino-cli core install esp32:[email protected]
65+
run: arduino-cli core install esp32:esp32@${{ env.CORE_VERSION }}
66+
67+
- name: Get IDF version
68+
run: |
69+
cd /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs
70+
IDF_VERSION=$(ls | grep idf-release)
71+
echo "ESP_IDF=${IDF_VERSION}" >> "$GITHUB_ENV"
6572
6673
- name: Get Known Libraries
6774
run: arduino-cli lib install
@@ -92,14 +99,14 @@ jobs:
9299
#- name: Patch ESP32 Core
93100
# run: |
94101
# cd Firmware/RTK_Surveyor/Patch/
95-
# cp WiFiGeneric.cpp /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiGeneric.cpp
102+
# cp WiFiGeneric.cpp /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/libraries/WiFi/src/WiFiGeneric.cpp
96103

97104
#Patch Server.h to avoid https://github.com/arduino-libraries/Ethernet/issues/88#issuecomment-455498941
98105
#Note: this patch can be removed if/when we upgrade to ESP32 core >= v2.0.6
99106
- name: Patch ESP32 Server.h for Ethernet
100107
run: |
101108
cd Firmware/RTK_Surveyor/Patch/
102-
cp Server.h /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/cores/esp32/Server.h
109+
cp Server.h /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/cores/esp32/Server.h
103110
104111
- name: Setup Python
105112
uses: actions/setup-python@v4
@@ -131,7 +138,7 @@ jobs:
131138

132139
- name: Copy custom app3M_fat9M_16MB.csv
133140
run:
134-
cp Firmware/app3M_fat9M_16MB.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/tools/partitions/app3M_fat9M_16MB.csv
141+
cp Firmware/app3M_fat9M_16MB.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/tools/partitions/app3M_fat9M_16MB.csv
135142

136143
- name: Compile Sketch
137144
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }} ./Firmware/RTK_Surveyor/RTK_Surveyor.ino

.github/workflows/non-release-build.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ env:
88
FIRMWARE_VERSION_MAJOR: 99
99
FIRMWARE_VERSION_MINOR: 99
1010
POINTPERFECT_TOKEN: ${{ secrets.POINTPERFECT_TOKEN }}
11+
#We limit the ESP32 core to v2.0.2
12+
CORE_VERSION: 2.0.2
1113

1214
jobs:
1315
build:
@@ -17,7 +19,7 @@ jobs:
1719

1820
steps:
1921
- name: Checkout
20-
uses: actions/checkout@master
22+
uses: actions/checkout@main
2123

2224
- name: Get current date
2325
id: date
@@ -50,9 +52,17 @@ jobs:
5052
- name: Update index
5153
run: arduino-cli core update-index
5254

53-
#We limit the ESP32 core to v2.0.2
55+
- name: Update library index
56+
run: arduino-cli lib update-index
57+
5458
- name: Install platform
55-
run: arduino-cli core install esp32:[email protected]
59+
run: arduino-cli core install esp32:esp32@${{ env.CORE_VERSION }}
60+
61+
- name: Get IDF version
62+
run: |
63+
cd /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs
64+
IDF_VERSION=$(ls | grep idf-release)
65+
echo "ESP_IDF=${IDF_VERSION}" >> "$GITHUB_ENV"
5666
5767
- name: Get Known Libraries
5868
run: arduino-cli lib install
@@ -83,14 +93,14 @@ jobs:
8393
#- name: Patch ESP32 Core
8494
# run: |
8595
# cd Firmware/RTK_Surveyor/Patch/
86-
# cp WiFiGeneric.cpp /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiGeneric.cpp
96+
# cp WiFiGeneric.cpp /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/libraries/WiFi/src/WiFiGeneric.cpp
8797

8898
#Patch Server.h to avoid https://github.com/arduino-libraries/Ethernet/issues/88#issuecomment-455498941
8999
#Note: this patch can be removed if/when we upgrade to ESP32 core >= v2.0.6
90100
- name: Patch ESP32 Server.h for Ethernet
91101
run: |
92102
cd Firmware/RTK_Surveyor/Patch/
93-
cp Server.h /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/cores/esp32/Server.h
103+
cp Server.h /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/cores/esp32/Server.h
94104
95105
- name: Setup Python
96106
uses: actions/setup-python@v4
@@ -122,7 +132,7 @@ jobs:
122132

123133
- name: Copy custom app3M_fat9M_16MB.csv
124134
run:
125-
cp Firmware/app3M_fat9M_16MB.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/tools/partitions/app3M_fat9M_16MB.csv
135+
cp Firmware/app3M_fat9M_16MB.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/tools/partitions/app3M_fat9M_16MB.csv
126136

127137
- name: Compile Sketch
128138
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }} ./Firmware/RTK_Surveyor/RTK_Surveyor.ino
@@ -143,7 +153,7 @@ jobs:
143153
mv RTK_Surveyor.ino.elf ${{ env.ARTIFACT }}
144154
145155
- name: Upload artifact directory to action - avoid double-zip
146-
uses: actions/upload-artifact@v3
156+
uses: actions/upload-artifact@v4
147157
with:
148158
name: ${{ env.ARTIFACT }}
149159
path: Firmware/RTK_Surveyor/build/esp32.esp32.esp32/${{ env.ARTIFACT }}

0 commit comments

Comments
 (0)