Skip to content

Commit 1ca4ad5

Browse files
committed
github: Add GitHub actions
Add github actions to build: - Simulators on macOS, Linux and Windows - WASM build - DM42 and DM32 firmwares Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
1 parent 0048fc3 commit 1ca4ad5

File tree

3 files changed

+565
-0
lines changed

3 files changed

+565
-0
lines changed

.github/workflows/BADGES.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# GitHub Actions Build Badges
2+
3+
Add these badges to your main README.md to show build status:
4+
5+
## Build Status Badge
6+
7+
```markdown
8+
[![Build Status](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml/badge.svg)](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml)
9+
```
10+
11+
Replace `YOUR_USERNAME` with your actual GitHub username or organization name.
12+
13+
## Individual Job Badges
14+
15+
You can also create badges for specific jobs:
16+
17+
### Simulator Build
18+
```markdown
19+
[![Simulator](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml/badge.svg?job=build-simulator)](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml)
20+
```
21+
22+
### Color Simulator Build
23+
```markdown
24+
[![Color Simulator](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml/badge.svg?job=build-color-simulator)](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml)
25+
```
26+
27+
### WASM Build
28+
```markdown
29+
[![WASM](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml/badge.svg?job=build-wasm)](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml)
30+
```
31+
32+
### DM42 Firmware Build
33+
```markdown
34+
[![DM42 Firmware](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml/badge.svg?job=build-dm42-firmware)](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml)
35+
```
36+
37+
### DM32 Firmware Build
38+
```markdown
39+
[![DM32 Firmware](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml/badge.svg?job=build-dm32-firmware)](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml)
40+
```
41+
42+
## Example Section for README.md
43+
44+
```markdown
45+
## Build Status
46+
47+
[![Build Status](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml/badge.svg)](https://github.com/YOUR_USERNAME/db48x/actions/workflows/build.yml)
48+
49+
Automated builds are performed for:
50+
- Simulators for macOS, Linux, and Windows (db48x)
51+
- Color DM32 Simulators for macOS, Linux, and Windows (db50x)
52+
- WebAssembly (WASM)
53+
- DM42 Firmware
54+
- DM32 Firmware
55+
56+
Download the latest build artifacts from the [Actions tab](https://github.com/YOUR_USERNAME/db48x/actions).
57+
```
58+

.github/workflows/README.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
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

Comments
 (0)