File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,6 +203,51 @@ jobs:
203203 asset_name : ${{ env.LNAV_ZIPNAME }}
204204 asset_content_type : application/octet-stream
205205
206+ build-windows-on-linux :
207+ name : Build Windows Binary (Static)
208+ runs-on : ubuntu-latest
209+
210+ steps :
211+ - name : Checkout code
212+ uses : actions/checkout@v4
213+
214+ - name : Install dependencies
215+ run : |
216+ sudo apt update
217+ sudo apt install -y \
218+ mingw-w64 \
219+ cmake \
220+ make \
221+ pkg-config \
222+ zip \
223+ autoconf \
224+ automake \
225+ libtool \
226+ gettext
227+
228+ - name : Configure & Build
229+ run : |
230+ mkdir build
231+ cd build
232+ cmake .. \
233+ -DCMAKE_SYSTEM_NAME=Windows \
234+ -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
235+ -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
236+ -DCMAKE_FIND_ROOT_PATH=/usr/x86_64-w64-mingw32 \
237+ -DCMAKE_EXE_LINKER_FLAGS="-static" \
238+ -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++"
239+ make -j$(nproc)
240+
241+ - name : Package
242+ run : |
243+ zip -j lnav-windows2.zip build/lnav.exe
244+
245+ - name : Upload artifact
246+ uses : actions/upload-artifact@v4
247+ with :
248+ name : lnav-windows2
249+ path : lnav-windows2.zip
250+
206251 build-windows :
207252 runs-on : windows-latest
208253 strategy :
You can’t perform that action at this time.
0 commit comments