Compare commits

9 Commits

Author SHA1 Message Date
2427601120 Update README.md
Some checks failed
Gol CI / build (push) Has been cancelled
2026-04-03 12:23:37 +00:00
c747dab1fc Merge pull request 'Improving CI usage' (#7) from improvin-ci into main
All checks were successful
Gol CI / build (push) Successful in 2m36s
Reviewed-on: #7
2026-04-03 12:16:54 +00:00
4c33da0ecd Merge branch 'main' into improvin-ci
All checks were successful
Gol CI / build (pull_request) Successful in 2m30s
2026-04-03 12:16:31 +00:00
f0284e7975 ci: Run on MR
All checks were successful
Gol CI / build (pull_request) Successful in 2m30s
This also adds the new dependencies
2026-04-03 14:12:23 +02:00
8f62ee83a6 Merge pull request 'Windows compatibility and CI integration' (#6) from lju/windows-compat into main
Some checks failed
Gol CI / build (push) Failing after 1m22s
Reviewed-on: #6
2026-04-03 11:57:27 +00:00
d16319084b ci: Add default build test 2026-04-03 13:56:32 +02:00
46c9bee008 gitignore: Adding windows build directory 2026-04-03 13:56:32 +02:00
1594e663eb project: create the windows toolchain
Some of the code is still linux only
2026-04-03 13:56:32 +02:00
c35097b3d3 Merge pull request 'grid: add a guide grid' (#5) from lju/adding-grid into main
Reviewed-on: #5
2026-01-15 08:14:32 +00:00
5 changed files with 69 additions and 1 deletions

24
.gitea/workflows/test.yml Normal file
View File

@@ -0,0 +1,24 @@
name: Gol CI
# Run on the merge of a pull request to the main branch
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev
- name: Build and test
run: |
mkdir build
cd build
cmake ..
make

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@ _deps
CMakeSettings.json CMakeSettings.json
.vs .vs
.cache .cache
build-win-x86_64

View File

@@ -91,3 +91,25 @@ add_executable(${NAME} ${SRC_CXX_FILES})
# Link raylib and raylib-cpp # Link raylib and raylib-cpp
target_link_libraries(${NAME} PUBLIC raylib nlohmann_json::nlohmann_json) target_link_libraries(${NAME} PUBLIC raylib nlohmann_json::nlohmann_json)
# Windows cross-compilation rule
if (NOT DEFINED CMAKE_CROSSCOMPILE_WINDOWS_HELPER_ADDED)
set(CMAKE_CROSSCOMPILE_WINDOWS_HELPER_ADDED TRUE)
set(WIN_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/toolchain-mingw-w64-x86_64.cmake" CACHE PATH "Toolchain for Win x86_64")
add_custom_target(cmake-win
COMMAND ${CMAKE_COMMAND} -E echo "Configuring Windows x86_64 build in: ${CMAKE_SOURCE_DIR}/build-win-x86_64"
COMMAND ${CMAKE_COMMAND}
-S ${CMAKE_SOURCE_DIR}
-B ${CMAKE_SOURCE_DIR}/build-win-x86_64
-G "Ninja"
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_TOOLCHAIN_FILE=${WIN_TOOLCHAIN_FILE}
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_SOURCE_DIR}/build-win-x86_64 -- -v
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Configure & build for Windows x86_64 (MinGW-w64)"
VERBATIM
)
endif()

View File

@@ -15,4 +15,4 @@ cmake ..
make make
``` ```
> As for now I will not make this program Windows compatible. > The windows version might exist one day

View File

@@ -0,0 +1,21 @@
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_CROSSCOMPILING TRUE)
set(MINGW_TRIPLET "x86_64-w64-mingw32")
set(CMAKE_C_COMPILER ${MINGW_TRIPLET}-gcc)
set(CMAKE_CXX_COMPILER ${MINGW_TRIPLET}-g++)
set(CMAKE_RC_COMPILER ${MINGW_TRIPLET}-windres)
set(CMAKE_AR ${MINGW_TRIPLET}-ar)
set(CMAKE_RANLIB ${MINGW_TRIPLET}-ranlib)
set(CMAKE_OBJCOPY ${MINGW_TRIPLET}-objcopy)
set(CMAKE_FIND_ROOT_PATH /usr/${MINGW_TRIPLET})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_C_FLAGS_INIT "-static -static-libgcc -static-libstdc++")
set(CMAKE_CXX_FLAGS_INIT "-static -static-libgcc -static-libstdc++")