-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: build | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
windows: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout exgine | ||
uses: actions/checkout@v4 | ||
with: | ||
path: exgine | ||
submodules: 'recursive' | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y build-essential cmake | ||
sudo apt install libwayland-dev libxkbcommon-dev xorg-dev | ||
sudo apt install -y mingw-w64 mingw-w64-tools ninja-build libpthread-stubs0-dev | ||
- name: Configure | ||
run: cmake -Bbuild -Hexgine -DCMAKE_TOOLCHAIN_FILE=windows.cmake -DCMAKE_INSTALL_PREFIX=$PWD/install | ||
- name: Build | ||
run: cmake --build build --config Release -j2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: exgine_windows-x64 | ||
path: | | ||
build/starter.exe | ||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout exgine | ||
uses: actions/checkout@v4 | ||
with: | ||
path: exgine | ||
submodules: 'recursive' | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y build-essential cmake | ||
sudo apt install libwayland-dev libxkbcommon-dev xorg-dev | ||
- name: Configure | ||
run: cmake -Bbuild -Hexgine -DCMAKE_INSTALL_PREFIX=$PWD/install | ||
- name: Build | ||
run: cmake --build build --config Release -j2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: exgine_linux-x64 | ||
path: | | ||
build/starter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Specify the target system | ||
SET(CMAKE_SYSTEM_NAME Windows) | ||
SET(CMAKE_SYSTEM_VERSION 1) | ||
SET(CMAKE_SYSTEM_PROCESSOR x86_64) | ||
|
||
# Specify the cross-compiling toolchain | ||
SET(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc) | ||
SET(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++) | ||
|
||
# Specify the Windows target sysroot (optional, but recommended) | ||
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) | ||
|
||
# Adjust search paths so that CMake finds the right libraries and headers for cross-compiling | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
|
||
# Specify the Windows output binary type | ||
SET(CMAKE_CXX_STANDARD 20) |