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:
|
||||
push:
|
||||
@ -6,41 +6,59 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build_release:
|
||||
runs-on: windows-latest
|
||||
build_windows:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out repository (recursively with submodules)
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true # Ensures submodules are cloned
|
||||
fetch-depth: 0 # Optional, fetches entire repo history
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
|
||||
- name: Install dependencies (MSYS2/MinGW)
|
||||
shell: msys2 {0}
|
||||
- name: Install cross-compile toolchain & libs
|
||||
run: |
|
||||
pacman -S --noconfirm \
|
||||
make \
|
||||
mingw-w64-x86_64-gcc \
|
||||
mingw-w64-x86_64-cmake \
|
||||
mingw-w64-x86_64-glew \
|
||||
mingw-w64-x86_64-glfw \
|
||||
mingw-w64-x86_64-yaml-cpp \
|
||||
mingw-w64-x86_64-lua
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
mingw-w64 \
|
||||
pkg-config-mingw-w64-x86-64 \
|
||||
cmake
|
||||
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
# 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: |
|
||||
make clean
|
||||
make
|
||||
# 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(Windows)(DEBUG)(TIMERS)
|
||||
name: TesseractEngine-WinCross
|
||||
path: release
|
||||
|
Loading…
Reference in New Issue
Block a user