2828 # --- ESP8266 (Requires Custom URL) ---
2929 - { name: 'D1 Mini', board: 'esp8266:esp8266:d1_mini', platform: 'esp8266:esp8266', url: 'https://arduino.esp8266.com/stable/package_esp8266com_index.json', category: 'standard' }
3030
31- # --- STM32 (Isolated/Direct Install - URL Updated) ---
32- # Using the commonly successful GitHub BoardManagerFiles URL format.
33- - { name: 'Nucleo F401RE', board: 'STM32:stm32:Nucleo_F401RE', platform: 'STM32:stm32', url: 'https://github.com/stm32duino/BoardManagerFiles/raw/master/package_stm_index.json', category: 'stm32' }
34-
3531 name : Compile ${{ matrix.board_config.name }}
3632
3733 steps :
@@ -42,32 +38,20 @@ jobs:
4238 - name : 🛠️ Setup Arduino CLI
4339 uses : arduino/setup-arduino-cli@v2
4440
45- # 2. Add custom platform URLs for ESP and update index
41+ # 2. Add custom platform URLs for ESP cores
4642 - name : 🌐 Configure & Update Index
4743 run : |
48- # Add URLs for non-standard cores ( ESP and STM32)
44+ # Only adding reliable ESP URLs
4945 arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
5046 arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
51- arduino-cli config add board_manager.additional_urls https://github.com/stm32duino/BoardManagerFiles/raw/master/package_stm_index.json # <-- STM32 URL ADDED TO GLOBAL CONFIG
52- # Run update once
5347 arduino-cli core update-index
5448
55- # 3. FIX: Install STM32 Platform (Direct Index Access)
56- - name : 📥 Install STM32 Platform
57- if : ${{ matrix.board_config.category == 'stm32' }}
58- run : |
59- # The URL was added to the config in step 2. Now we install the platform.
60- # We use the --additional-urls flag here as a redundancy measure just in case.
61- arduino-cli core install ${{ matrix.board_config.platform }} --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/master/package_stm_index.json
62-
63- # 4. Install All Other Platforms (ESP, Arduino)
64- - name : 📥 Install Other Platforms
65- if : ${{ matrix.board_config.category != 'stm32' }}
49+ # 3. Install All Platforms
50+ - name : 📥 Install All Platforms
6651 run : |
67- # Platforms can be installed now that the global index has been updated
6852 arduino-cli core install ${{ matrix.board_config.platform }}
6953
70- # 5 . Create the test sketch containing your provided code
54+ # 4 . Create the test sketch containing your provided code
7155 - name : 📝 Create test sketch
7256 run : |
7357 mkdir -p test_sketch
8973 }
9074 EOF
9175
92- # 6 . Compile the sketch against the FQBN
76+ # 5 . Compile the sketch against the FQBN
9377 - name : ⚙️ Compile Sketch for ${{ matrix.board_config.name }}
9478 run : arduino-cli compile --fqbn ${{ matrix.board_config.board }} --library . test_sketch
0 commit comments