Skip to content

Commit 5afadf1

Browse files
committed
add github actions
1 parent 2a8f5a4 commit 5afadf1

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
steps:
38+
- name: Checkout Code
39+
uses: actions/checkout@v4
40+
41+
- name: Build ESP32-S3 binaries with Docker
42+
run: |
43+
docker run --rm -v ${{ github.workspace }}:/workspace/T-HMI-C64 docker.io/retroelec42/arduino-cli-thmic64 \
44+
compile --warnings all --fqbn esp32:esp32:esp32s3:CDCOnBoot=cdc,DFUOnBoot=dfu,FlashSize=16M,JTAGAdapter=builtin,PartitionScheme=huge_app,PSRAM=opi,DebugLevel=info \
45+
--build-property "build.extra_flags=-DBOARD_T_HMI -DUSE_WEB_KEYBOARD" \
46+
--build-path build T-HMI-C64.ino
47+
48+
- name: Upload ESP32 Binaries
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: esp32-firmware
52+
path: "build/T-HMI-C64.ino.merged.bin"
53+

0 commit comments

Comments
 (0)