Skip to content

Commit

Permalink
Merge pull request #86 from YGNI-RType/dev
Browse files Browse the repository at this point in the history
 Release v0.6.0
  • Loading branch information
Popochounet authored Nov 17, 2024
2 parents 2ab2898 + 937404a commit 56d0103
Show file tree
Hide file tree
Showing 329 changed files with 409 additions and 615,529 deletions.
57 changes: 42 additions & 15 deletions .github/workflows/compilation-gengine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Compilation

on:
push:
branches: ["dev", "feat/ci"]
branches: ["dev", "devops"]
tags:
- "*"
pull_request:
branches: ["main", "dev"]

Expand All @@ -11,8 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}

strategy:
#TODO Consider changing this to true when your workflow is stable.
fail-fast: false
fail-fast: true

matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
Expand All @@ -25,9 +26,6 @@ jobs:
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
Expand All @@ -36,6 +34,8 @@ jobs:
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
- os: macos-latest
Expand All @@ -50,35 +50,62 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: sudo apt update && sudo apt install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config

- name: Install vcpkg and dependencies for Windows
if: matrix.os == 'windows-latest'
run: |
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install glfw3:x64-windows
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Cache build directory
id: cache-build
uses: actions/cache@v4
with:
path: build
key: ${{ runner.os }}-build-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-build-
- name: Configure CMake
if: steps.cache-build.outputs.cache-hit != 'true'
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_TOOLCHAIN_FILE=../cmake/define-compilers.cmake
-S ${{ github.workspace }}
# Since metadata is not cached, we need to reconfigure cmake but without triggering a vcpkg pull
- name: Configure CMake CACHED
if: steps.cache-build.outputs.cache-hit == 'true'
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DVCPKG_SHOULD_NOT_UPDATE=TRUE
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --parallel 8

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}

# the cache is mainly for cmake, and the timestamps don't match anyway. maybe next time we'll use another cache handler
- name: Clean the cmake build directory Windows
if: matrix.os == 'windows-latest' && steps.cache-build.outputs.cache-hit != 'true'
run: |
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --target clean
Get-ChildItem -Path build/vcpkg/* -Exclude 'downloads', 'installed', 'scripts', 'triplets' | Remove-Item -Recurse -Force
Remove-Item -Recurse -Force build/Release/*.dll
- name: Clean the cmake build directory UNIX like
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' && steps.cache-build.outputs.cache-hit != 'true'
run: |
cmake --build ${{ steps.strings.outputs.build-output-dir }} --target clean
find build/.vcpkg -mindepth 1 -maxdepth 1 ! -name 'downloads' ! -name 'installed' ! -name 'scripts' ! -name 'triplets' -exec rm -rf {} +
cleanup:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "examples/R-Type"]
path = examples/R-Type
url = [email protected]:YGNI-RType/R-Type.git
[submodule "examples/HideAndSeek"]
path = examples/HideAndSeek
url = [email protected]:YGNI-RType/HideAndSeek.git
16 changes: 0 additions & 16 deletions cmake/automate-vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@ else()
set(VCPKG_FALLBACK_ROOT ${CMAKE_CURRENT_BINARY_DIR}/.vcpkg CACHE STRING "vcpkg configuration directory to use if vcpkg was not installed on the system before")
endif()

# On Windows, Vcpkg defaults to x86, even on x64 systems. If we're
# doing a 64-bit build, we need to fix that.
if (WIN32)
# Since the compiler checks haven't run yet, we need to figure
# out the value of CMAKE_SIZEOF_VOID_P ourselfs

include(CheckTypeSize)
enable_language(C)
check_type_size("void*" SIZEOF_VOID_P BUILTIN_TYPES_ONLY)

if (SIZEOF_VOID_P EQUAL 8)
message(STATUS "Using Vcpkg triplet 'x64-windows'")
set(VCPKG_TRIPLET x64-windows)
endif()
endif()

if(NOT DEFINED VCPKG_ROOT)
if(NOT DEFINED ENV{VCPKG_ROOT})
set(VCPKG_ROOT ${VCPKG_FALLBACK_ROOT})
Expand Down
39 changes: 33 additions & 6 deletions cmake/define-compilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Windows : https://superuser.com/questions/305901/possible-values-of-processor-architecture
# Linux : https://stackoverflow.com/questions/45125516/possible-values-for-uname-m/45125525#45125525

# The triplets here are set by default to the release version, if it doesn't exist, too bad vcpkg will build the debug and the release version
# tested and supported version of the engine however doesn't have this issue

# Detect the architecture if not already defined
if(NOT DEFINED ARCHITECTURE)
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
Expand Down Expand Up @@ -44,23 +47,39 @@ endif()
if(LINUX)
if(ARCHITECTURE STREQUAL "x64")
# include(${CMAKE_SOURCE_DIR}/cmake/compilers/GNU/x64.cmake)
set(VCPKG_TRIPLET "x64-linux")
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(VCPKG_TRIPLET "x64-linux-release")
else()
set(VCPKG_TRIPLET "x64-linux")
endif()
elseif(ARCHITECTURE STREQUAL "x86")
include(${CMAKE_SOURCE_DIR}/cmake/compilers/GNU/x86.cmake)
set(VCPKG_TRIPLET "x86-linux")
elseif(ARCHITECTURE STREQUAL "arm64")
include(${CMAKE_SOURCE_DIR}/cmake/compilers/GNU/armv8.cmake)
set(VCPKG_TRIPLET "arm64-linux")
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(VCPKG_TRIPLET "arm64-linux-release")
else()
set(VCPKG_TRIPLET "arm64-linux")
endif()
elseif(ARCHITECTURE STREQUAL "arm32")
include(${CMAKE_SOURCE_DIR}/cmake/compilers/GNU/armv7.cmake)
set(VCPKG_TRIPLET "arm-linux")
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(VCPKG_TRIPLET "arm-linux-release")
else()
set(VCPKG_TRIPLET "arm-linux")
endif()
else()
message(FATAL_ERROR "Unsupported architecture: ${ARCHITECTURE} for OS: ${CMAKE_SYSTEM_NAME}")
endif()
elseif(WIN32)
if(ARCHITECTURE STREQUAL "x64")
# include(${CMAKE_SOURCE_DIR}/cmake/compilers/Windows/x64.cmake)
set(VCPKG_TRIPLET "x64-windows")
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(VCPKG_TRIPLET "x64-windows-release")
else()
set(VCPKG_TRIPLET "x64-windows")
endif()
elseif(ARCHITECTURE STREQUAL "x86")
include(${CMAKE_SOURCE_DIR}/cmake/compilers/Windows/x86.cmake)
set(VCPKG_TRIPLET "x86-windows")
Expand All @@ -76,10 +95,18 @@ elseif(WIN32)
elseif(APPLE)
if(ARCHITECTURE STREQUAL "x64")
include(${CMAKE_CURRENT_LIST_DIR}/compilers/Apple/x64.cmake)
set(VCPKG_TRIPLET "x64-osx")
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(VCPKG_TRIPLET "x64-osx-release")
else()
set(VCPKG_TRIPLET "x64-osx")
endif()
elseif(ARCHITECTURE STREQUAL "arm64")
include(${CMAKE_CURRENT_LIST_DIR}/compilers/Apple/armv8.cmake)
set(VCPKG_TRIPLET "arm64-osx")
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(VCPKG_TRIPLET "arm64-osx-release")
else()
set(VCPKG_TRIPLET "arm64-osx")
endif()
else()
message(FATAL_ERROR "Unsupported architecture: ${ARCHITECTURE} for OS: ${CMAKE_SYSTEM_NAME}")
endif()
Expand Down
1 change: 1 addition & 0 deletions examples/HideAndSeek
Submodule HideAndSeek added at 71b93a
3 changes: 0 additions & 3 deletions examples/POC_3D/.gitignore

This file was deleted.

65 changes: 0 additions & 65 deletions examples/POC_3D/CMakeLists.txt

This file was deleted.

66 changes: 0 additions & 66 deletions examples/POC_3D/README.md

This file was deleted.

1 change: 0 additions & 1 deletion examples/POC_3D/assets/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions examples/POC_3D/assets/animations/player.json

This file was deleted.

6 changes: 0 additions & 6 deletions examples/POC_3D/assets/animations/r-typesheet1.json

This file was deleted.

3 changes: 0 additions & 3 deletions examples/POC_3D/assets/animations/r-typesheet3.json

This file was deleted.

3 changes: 0 additions & 3 deletions examples/POC_3D/assets/animations/r-typesheet42.json

This file was deleted.

Loading

0 comments on commit 56d0103

Please sign in to comment.