Skip to content

Commit 02fe198

Browse files
committed
add github actions
1 parent 2a8f5a4 commit 02fe198

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/workflows/build.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: build
2+
on: [push]
3+
4+
jobs:
5+
build-windows:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout Code
9+
uses: actions/checkout@v4
10+
11+
- name: Build EXE with Docker
12+
run: |
13+
docker run --rm -v ${{ github.workspace }}:/build docker.io/retroelec42/sdl2-cross sh -c "
14+
make -f windows/Makefile && \
15+
cp /usr/lib/gcc/x86_64-w64-mingw32/12-posix/libstdc++-6.dll /build/windows/ && \
16+
cp /usr/lib/gcc/x86_64-w64-mingw32/12-posix/libgcc_s_seh-1.dll /build/windows/ && \
17+
cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll /build/windows/ && \
18+
cp /opt/sdl2-windows/SDL2/x86_64-w64-mingw32/bin/SDL2.dll /build/windows/
19+
"
20+
21+
- name: Upload Executable and DLLs
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: windows-executable
25+
path: |
26+
windows/c64win.exe
27+
windows/*.dll
28+
29+
- name: Create Release
30+
if: startsWith(github.ref, 'refs/tags/')
31+
uses: softprops/action-gh-release@v2
32+
with:
33+
files: windows/c64win.exe
34+
35+
build-esp32:
36+
runs-on: ubuntu-latest
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
include:
41+
- board: T_HMI
42+
keyboard: BLE_KEYBOARD
43+
- board: T_HMI
44+
keyboard: WEB_KEYBOARD
45+
- board: T_DISPLAY_S3
46+
keyboard: BLE_KEYBOARD
47+
- board: T_DISPLAY_S3
48+
keyboard: WEB_KEYBOARD
49+
- board: WAVESHARE
50+
keyboard: BLE_KEYBOARD
51+
- board: WAVESHARE
52+
keyboard: WEB_KEYBOARD
53+
- board: CYD
54+
keyboard: NO_KEYBOARD
55+
56+
steps:
57+
- name: Checkout Code
58+
uses: actions/checkout@v4
59+
60+
- name: Build ESP32 Binaries with Docker
61+
run: |
62+
docker run --rm -v ${{ github.workspace }}:/workspace/T-HMI-C64 docker.io/retroelec42/arduino-cli-thmic64 \
63+
compile --warnings all \
64+
--fqbn esp32:esp32:esp32s3:CDCOnBoot=cdc,DFUOnBoot=dfu,FlashSize=16M,JTAGAdapter=builtin,PartitionScheme=huge_app,PSRAM=opi,DebugLevel=info \
65+
--build-property "build.extra_flags=-DBOARD_${{ matrix.board }} -DUSE_${{ matrix.keyboard }} -DESP32" \
66+
--build-path build/${{ matrix.board }}_${{ matrix.keyboard }} T-HMI-C64.ino
67+
68+
- name: Upload ESP32 Binaries
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: esp32-firmware-${{ matrix.board }}-${{ matrix.keyboard }}
72+
path: |
73+
build/${{ matrix.board }}_${{ matrix.keyboard }}/T-HMI-C64.ino.bin
74+
build/${{ matrix.board }}_${{ matrix.keyboard }}/T-HMI-C64.ino.bootloader.bin
75+
build/${{ matrix.board }}_${{ matrix.keyboard }}/T-HMI-C64.ino.partitions.binaries
76+

0 commit comments

Comments
 (0)