@@ -117,6 +117,64 @@ jobs:
117117 shell : bash
118118
119119
120+ firmware_compilation_win :
121+ runs-on : windows-latest
122+ strategy :
123+ matrix :
124+ numbers : [float, integral, 64bit]
125+ lua_ver : [5.1, 5.3] # Set your versions
126+
127+ steps :
128+ - uses : actions/checkout@v4
129+ with :
130+ submodules : true
131+
132+ - name : Set up MSYS2
133+ uses : msys2/setup-msys2@v2
134+ with :
135+ update : true
136+ install : >-
137+ base-devel
138+ mingw-w64-x86_64-toolchain
139+ mingw-w64-x86_64-python
140+ mingw-w64-x86_64-pip
141+
142+ - name : Install pyserial
143+ shell : msys2 {0}
144+ run : |
145+ pip install pyserial
146+
147+ # srecord is not always available in MSYS2. If needed, try:
148+ # - name: Install srecord (optional)
149+ # shell: msys2 {0}
150+ # run: |
151+ # pacman -S --noconfirm mingw-w64-x86_64-srecord || echo "srecord not available"
152+
153+ - name : Build firmware
154+ if : matrix.numbers == 'float'
155+ shell : msys2 {0}
156+ run : make
157+
158+ - name : Build integral firmware
159+ if : ${{ matrix.numbers == 'integral' }}
160+ shell : msys2 {0}
161+ run : |
162+ make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL"
163+ mv luac.cross.int luac.cross
164+
165+ - name : Build 64bit firmware
166+ if : ${{ matrix.numbers == '64bit' }}
167+ shell : msys2 {0}
168+ run : |
169+ make EXTRA_CCFLAGS="-DLUA_NUMBER_64BITS"
170+
171+ - name : Upload luac.cross
172+ if : ${{ success() }}
173+ uses : actions/upload-artifact@v4
174+ with :
175+ name : luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}
176+ path : luac.cross
177+
120178 compile_lua_win :
121179
122180 strategy :
0 commit comments