I dont have a Windows Runner :(

This commit is contained in:
OusmBlueNinja 2025-01-03 20:57:26 -06:00
parent 229c4abc0f
commit f90e601396

View File

@ -1,64 +0,0 @@
name: Build (Windows Cross-Compile on Ubuntu)
on:
push:
branches:
- main
jobs:
build_windows:
runs-on: ubuntu-latest
steps:
- name: Check out repository (recursively with submodules)
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Install cross-compile toolchain & libs
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
mingw-w64 \
pkg-config-mingw-w64-x86-64 \
cmake
# Attempt to install cross-compiled dependencies.
# NOTE: Some of these may not be available on your Ubuntu version.
# If "Unable to locate package ..." occurs, remove or handle them.
sudo apt-get install -y \
mingw-w64-x86-64-glew \
mingw-w64-x86-64-glfw \
mingw-w64-x86-64-yaml-cpp \
mingw-w64-x86-64-lua5.3
- name: Build for Windows with MinGW
run: |
# Clean old artifacts (if your Makefile supports it)
make clean || true
# Cross-compile using the MinGW-w64 toolchain
# Override CC/CXX so Make uses x86_64-w64-mingw32-gcc/g++
make \
CC=x86_64-w64-mingw32-gcc \
CXX=x86_64-w64-mingw32-g++ \
LD=x86_64-w64-mingw32-ld
# If your Makefile automatically detects the MinGW environment,
# you may not need these overrides.
- name: Prepare release folder
run: |
mkdir -p release
# Example: if your Makefile produces "TesseractEngine.exe" in root or build/
# Copy it into the release folder for artifact uploading
cp TesseractEngine.exe release/ || true
cp build/TesseractEngine.exe release/ || true
- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: TesseractEngine-WinCross
path: release