I dont have a windows runner....
Some checks failed
Build (Windows Cross-Compile on Ubuntu) / build_windows (push) Failing after 2m11s
Some checks failed
Build (Windows Cross-Compile on Ubuntu) / build_windows (push) Failing after 2m11s
This commit is contained in:
parent
b9bd335198
commit
229c4abc0f
@ -1,4 +1,4 @@
|
|||||||
name: Build (Windows)
|
name: Build (Windows Cross-Compile on Ubuntu)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -6,41 +6,59 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_release:
|
build_windows:
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository (recursively with submodules)
|
- name: Check out repository (recursively with submodules)
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true # Ensures submodules are cloned
|
submodules: true
|
||||||
fetch-depth: 0 # Optional, fetches entire repo history
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up MSYS2
|
- name: Install cross-compile toolchain & libs
|
||||||
uses: msys2/setup-msys2@v2
|
|
||||||
with:
|
|
||||||
update: true
|
|
||||||
|
|
||||||
- name: Install dependencies (MSYS2/MinGW)
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
run: |
|
||||||
pacman -S --noconfirm \
|
sudo apt-get update
|
||||||
make \
|
sudo apt-get install -y \
|
||||||
mingw-w64-x86_64-gcc \
|
build-essential \
|
||||||
mingw-w64-x86_64-cmake \
|
mingw-w64 \
|
||||||
mingw-w64-x86_64-glew \
|
pkg-config-mingw-w64-x86-64 \
|
||||||
mingw-w64-x86_64-glfw \
|
cmake
|
||||||
mingw-w64-x86_64-yaml-cpp \
|
|
||||||
mingw-w64-x86_64-lua
|
|
||||||
|
|
||||||
- name: Build
|
# Attempt to install cross-compiled dependencies.
|
||||||
shell: msys2 {0}
|
# 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: |
|
run: |
|
||||||
make clean
|
# Clean old artifacts (if your Makefile supports it)
|
||||||
make
|
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
|
- name: Upload release artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: TesseractEngine(Windows)(DEBUG)(TIMERS)
|
name: TesseractEngine-WinCross
|
||||||
path: release
|
path: release
|
||||||
|
Loading…
Reference in New Issue
Block a user