firmware: add satellite step 03 uptime #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ЦУП Альтаир — проверка прошивок | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "firmware/**" | |
| - ".github/workflows/firmware-build.yml" | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "firmware/**" | |
| - ".github/workflows/firmware-build.yml" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Наземный ЦУП — ESP32-WROOM-32 | |
| id: ground-esp32 | |
| project: firmware/ground_station/esp32 | |
| - name: Наземный ЦУП — Arduino Uno | |
| id: ground-uno | |
| project: firmware/ground_station/arduino_uno | |
| - name: Наземный ЦУП — Arduino Nano | |
| id: ground-nano | |
| project: firmware/ground_station/arduino_nano | |
| - name: Спутник — STM32 Blue Pill | |
| id: satellite-stm32 | |
| project: firmware/satellite/stm32 | |
| - name: Спутник — шаг 01, неизменяемый пакет Arduino Nano | |
| id: satellite-step-01-static | |
| project: firmware/satellite/01_static_telemetry_tx | |
| - name: Спутник — шаг 02, счётчик пакетов Arduino Nano | |
| id: satellite-step-02-counter | |
| project: firmware/satellite/02_packet_counter_tx | |
| - name: Спутник — шаг 03, UPTIME Arduino Nano | |
| id: satellite-step-03-uptime | |
| project: firmware/satellite/03_uptime_tx | |
| - name: Спутник — Arduino Nano | |
| id: satellite-nano | |
| project: firmware/satellite/arduino_nano | |
| - name: Спутник — Arduino Nano, статичный передатчик с температурой | |
| id: satellite-nano-static-tx | |
| project: firmware/satellite/arduino_nano_static_tx | |
| steps: | |
| - name: Получить исходный код | |
| uses: actions/checkout@v4 | |
| - name: Настроить Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Установить PlatformIO | |
| run: python -m pip install --upgrade platformio | |
| - name: Скомпилировать прошивку | |
| run: pio run -d "${{ matrix.project }}" | |
| - name: Подготовить бинарные файлы ESP32 | |
| if: matrix.id == 'ground-esp32' | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p firmware-artifact | |
| BUILD_DIR="firmware/ground_station/esp32/.pio/build/esp32dev" | |
| BOOT_APP0="$(find "$HOME/.platformio/packages" -name boot_app0.bin -print -quit)" | |
| test -n "$BOOT_APP0" | |
| cp "$BUILD_DIR/firmware.bin" firmware-artifact/altair-radio-gateway-firmware.bin | |
| cp "$BUILD_DIR/bootloader.bin" firmware-artifact/altair-radio-gateway-bootloader.bin | |
| cp "$BUILD_DIR/partitions.bin" firmware-artifact/altair-radio-gateway-partitions.bin | |
| cp "$BOOT_APP0" firmware-artifact/altair-radio-gateway-boot_app0.bin | |
| cat > firmware-artifact/flash-layout.txt <<'EOF' | |
| ЦУП Альтаир / ESP32-WROOM-32 / esp32dev | |
| 0x1000 altair-radio-gateway-bootloader.bin | |
| 0x8000 altair-radio-gateway-partitions.bin | |
| 0xE000 altair-radio-gateway-boot_app0.bin | |
| 0x10000 altair-radio-gateway-firmware.bin | |
| EOF | |
| md5sum firmware-artifact/*.bin > firmware-artifact/md5sums.txt | |
| - name: Сохранить бинарные файлы ESP32 | |
| if: matrix.id == 'ground-esp32' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Altair-ESP32-Radio-Gateway | |
| path: firmware-artifact/* | |
| if-no-files-found: error | |
| retention-days: 30 |