|
| 1 | +# GitHub Actions CI/CD |
| 2 | + |
| 3 | +This directory contains GitHub Actions workflows for automated building and testing of DB48X/DB50X. |
| 4 | + |
| 5 | +## Workflows |
| 6 | + |
| 7 | +### build.yml |
| 8 | + |
| 9 | +Main build workflow that runs on every push and pull request to main/master/develop branches. |
| 10 | + |
| 11 | +#### Jobs |
| 12 | + |
| 13 | +**Simulator Builds (db48x):** |
| 14 | + |
| 15 | +1. **build-simulator-macos** - Builds the macOS simulator |
| 16 | + - Platform: macOS |
| 17 | + - Requirements: Qt 6.8.1 |
| 18 | + - Target: `make sim` |
| 19 | + - Artifacts: `db48x.app`, help files |
| 20 | + |
| 21 | +2. **build-simulator-linux** - Builds the Linux simulator |
| 22 | + - Platform: Ubuntu Linux |
| 23 | + - Requirements: Qt 6.5.3 LTS, libxcb-cursor0, libgl1-mesa-dev, libxkbcommon-x11-0, libfreetype6-dev, pkg-config |
| 24 | + - Target: `make sim` |
| 25 | + - Artifacts: `db48x` binary, help files |
| 26 | + |
| 27 | +3. **build-simulator-windows** - Builds the Windows simulator |
| 28 | + - Platform: Windows |
| 29 | + - Requirements: Qt 6.7.3, MSVC 2019/2022 |
| 30 | + - Target: `make sim` |
| 31 | + - Artifacts: `db48x.exe`, DLLs, help files |
| 32 | + |
| 33 | +**Color DM32 Simulator Builds (db50x):** |
| 34 | + |
| 35 | +4. **build-color-simulator-macos** - Builds the color DM32 simulator for macOS |
| 36 | + - Platform: macOS |
| 37 | + - Requirements: Qt 6.8.1 |
| 38 | + - Target: `make color-dm32-sim` |
| 39 | + - Artifacts: `db50x.app`, help files |
| 40 | + |
| 41 | +5. **build-color-simulator-linux** - Builds the color DM32 simulator for Linux |
| 42 | + - Platform: Ubuntu Linux |
| 43 | + - Requirements: Qt 6.5.3 LTS, libxcb-cursor0, libgl1-mesa-dev, libxkbcommon-x11-0, libfreetype6-dev, pkg-config |
| 44 | + - Target: `make color-dm32-sim` |
| 45 | + - Artifacts: `db50x` binary, help files |
| 46 | + |
| 47 | +6. **build-color-simulator-windows** - Builds the color DM32 simulator for Windows |
| 48 | + - Platform: Windows |
| 49 | + - Requirements: Qt 6.7.3, MSVC 2019/2022 |
| 50 | + - Target: `make color-dm32-sim` |
| 51 | + - Artifacts: `db50x.exe`, DLLs, help files |
| 52 | + |
| 53 | +**Other Builds:** |
| 54 | + |
| 55 | +7. **build-wasm** - Builds WebAssembly version |
| 56 | + - Platform: Ubuntu Linux |
| 57 | + - Requirements: Emscripten SDK (emsdk), libfreetype6-dev, pkg-config |
| 58 | + - Target: `make wasm` |
| 59 | + - Artifacts: `db48x.js`, `db48x.wasm`, HTML files, help files |
| 60 | + |
| 61 | +8. **build-dm42-firmware** - Builds DM42 firmware |
| 62 | + - Platform: Ubuntu Linux |
| 63 | + - Requirements: ARM GCC toolchain (gcc-arm-none-eabi), libfreetype6-dev, pkg-config |
| 64 | + - Target: `make all` (runs twice for CRC verification) |
| 65 | + - Artifacts: `db48x.pgm`, `db48x_qspi.bin`, help files |
| 66 | + |
| 67 | +9. **build-dm32-firmware** - Builds DM32 firmware |
| 68 | + - Platform: Ubuntu Linux |
| 69 | + - Requirements: ARM GCC toolchain (gcc-arm-none-eabi), libfreetype6-dev, pkg-config |
| 70 | + - Target: `make dm32-all` (runs twice for CRC verification) |
| 71 | + - Artifacts: `db50x.pg5`, `db50x_qspi.bin`, help files |
| 72 | + |
| 73 | +10. **build-release-package** - Creates release packages |
| 74 | + - Runs only on pushes to main/master |
| 75 | + - Depends on all other build jobs |
| 76 | + - Creates `.tar.gz` archives of firmware builds |
| 77 | + |
| 78 | +## Artifacts |
| 79 | + |
| 80 | +Build artifacts are automatically uploaded and can be downloaded from the Actions tab in GitHub: |
| 81 | + |
| 82 | +- **macOS simulators**: `.app` bundles ready to run |
| 83 | +- **Linux simulators**: Native binaries |
| 84 | +- **Windows simulators**: `.exe` executables with required DLLs |
| 85 | +- **WASM builds**: `.js`, `.wasm`, and HTML files for web deployment |
| 86 | +- **Firmware builds**: `.pgm`/`.pg5` and `_qspi.bin` files |
| 87 | +- **Help files**: `.md` and `.idx` included with all builds |
| 88 | + |
| 89 | +## Manual Triggering |
| 90 | + |
| 91 | +All workflows can be manually triggered using the "workflow_dispatch" event from the Actions tab in GitHub. |
| 92 | + |
| 93 | +## Local Testing |
| 94 | + |
| 95 | +To test builds locally before pushing: |
| 96 | + |
| 97 | +```bash |
| 98 | +# Simulator (requires Qt 6.8.1) |
| 99 | +make sim |
| 100 | + |
| 101 | +# Color DM32 simulator (requires Qt 6.8.1) |
| 102 | +make color-dm32-sim |
| 103 | + |
| 104 | +# WASM build (requires Emscripten SDK) |
| 105 | +make wasm |
| 106 | + |
| 107 | +# DM42 firmware (requires ARM toolchain) |
| 108 | +make all |
| 109 | + |
| 110 | +# DM32 firmware (requires ARM toolchain) |
| 111 | +make dm32-all |
| 112 | +``` |
| 113 | + |
| 114 | +## Requirements |
| 115 | + |
| 116 | +### For macOS simulator builds: |
| 117 | +- Qt 6.8.1 with qtmultimedia module |
| 118 | +- Xcode command line tools |
| 119 | + |
| 120 | +### For Linux simulator builds: |
| 121 | +- Qt 6.5.3 LTS with qtmultimedia module |
| 122 | +- libxcb-cursor0 |
| 123 | +- libgl1-mesa-dev |
| 124 | +- libxkbcommon-x11-0 |
| 125 | +- libfreetype6-dev |
| 126 | +- pkg-config |
| 127 | + |
| 128 | +### For Windows simulator builds: |
| 129 | +- Qt 6.7.3 with qtmultimedia module |
| 130 | +- Visual Studio 2019 or 2022 (MSVC) |
| 131 | + |
| 132 | +### For WASM builds: |
| 133 | +- Emscripten SDK (emsdk) |
| 134 | +- libfreetype6-dev (FreeType font library) |
| 135 | +- pkg-config |
| 136 | + |
| 137 | +### For firmware builds: |
| 138 | +- gcc-arm-none-eabi |
| 139 | +- binutils-arm-none-eabi |
| 140 | +- libfreetype6-dev |
| 141 | +- pkg-config |
| 142 | + |
| 143 | +## Customization |
| 144 | + |
| 145 | +To modify build triggers, edit the `on:` section in `build.yml`. Current triggers: |
| 146 | +- Push to main, master, or develop branches |
| 147 | +- Pull requests targeting main, master, or develop |
| 148 | +- Manual workflow dispatch |
| 149 | + |
0 commit comments