Skip to content

Commit

Permalink
Mostly CI related additions (#22)
Browse files Browse the repository at this point in the history
* Force discrete GPU for both AMD and Nvidia
* Profiling is a thing again, GPU profiling to come
* Fix for CI
* Updated workflow
* Profiling changes
* Fixed transform buttons not resetting the rotation/scale
* Style update
* Added hot reloading of scripting app assembly
* Added new scene menu option
* Added several internal calls for mono and a new testing project
* Working on project system
* Working on asset manager
* Asset and UI rework
* Remove binaries from git
* Workflow update
  • Loading branch information
nepp95 authored Nov 9, 2024
1 parent 79f92af commit c9a8944
Show file tree
Hide file tree
Showing 116 changed files with 2,735 additions and 751 deletions.
92 changes: 20 additions & 72 deletions .github/workflows/ci-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ on:
branches: [ develop ]

jobs:
debug:
runs-on: [ self-hosted, windows ]
name: "Build and Test (Debug)"

config-matrix:
runs-on: [ windows-latest ]
name: "Build and Test"
strategy:
matrix:
config: [ Debug, Release, Dist ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -26,86 +28,32 @@ jobs:

- name: Setup MSBuild
uses: microsoft/[email protected]

- name: Run Premake
run: .\Vendor\Premake\Bin\Premake5.exe vs2022

- name: "Build"
run: msbuild /m /p:Configuration=Debug EppoEngine.sln

- name: "Test"
run: .\Bin\Debug-windows-x86_64\EppoTesting\EppoTesting.exe --gtest_output="xml:${{env.RUNNER_TEMP}}\testoutput.xml"

- name: "Save test output"
uses: actions/upload-artifact@v3
- name: Cache VulkanSDK
id: cache-vulkansdk
uses: actions/cache@v4
with:
name: TestOutput-Debug
path: ${{env.RUNNER_TEMP}}/testoutput.xml

release:
runs-on: [ self-hosted, windows ]
name: "Build and Test (Release)"
path: "C:/VulkanSDK"
key: vulkansdk

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Premake
uses: abel0b/[email protected]
with:
version: "5.0.0-beta2"
path: Vendor/Premake/Bin

- name: Setup MSBuild
uses: microsoft/[email protected]

- name: Run Premake
run: .\Vendor\Premake\Bin\Premake5.exe vs2022

- name: "Build"
run: msbuild /m /p:Configuration=Release EppoEngine.sln

- name: "Test"
run: .\Bin\Release-windows-x86_64\EppoTesting\EppoTesting.exe --gtest_output="xml:${{env.RUNNER_TEMP}}\testoutput.xml"

- name: "Save test output"
uses: actions/upload-artifact@v3
with:
name: TestOutput-Release
path: ${{env.RUNNER_TEMP}}/testoutput.xml

dist:
runs-on: [ self-hosted, windows ]
name: "Build and Test (Dist)"

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Premake
uses: abel0b/[email protected]
with:
version: "5.0.0-beta2"
path: Vendor/Premake/Bin

- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Download and Install VulkanSDK
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
shell: pwsh
run: |
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.275.0/windows/VulkanSDK-1.3.275.0-Installer.exe -OutFile VulkanSDK.exe
.\VulkanSDK.exe --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.debug
- name: Run Premake
run: .\Vendor\Premake\Bin\Premake5.exe vs2022

- name: "Build"
run: msbuild /m /p:Configuration=Dist EppoEngine.sln
run: msbuild /m /p:Configuration=${{ matrix.config }} EppoEngine.sln

- name: "Test"
run: .\Bin\Dist-windows-x86_64\EppoTesting\EppoTesting.exe --gtest_output="xml:${{env.RUNNER_TEMP}}\testoutput.xml"
run: .\Bin\${{ matrix.config }}-windows-x86_64\EppoTesting\EppoTesting.exe --gtest_output="xml:${{env.RUNNER_TEMP}}\testoutput.xml"

- name: "Save test output"
uses: actions/upload-artifact@v3
with:
name: TestOutput-Dist
name: TestOutput-${{ matrix.config }}
path: ${{env.RUNNER_TEMP}}/testoutput.xml
30 changes: 8 additions & 22 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,17 @@ permissions:
checks: write

jobs:
debug:
runs-on: [ self-hosted, windows ]
config-matrix:
runs-on: [ windows-latest ]
name: "Create test report"

strategy:
matrix:
config: [ Debug, Release, Dist ]
steps:
- name: "Create test report (Debug)"
uses: dorny/test-reporter@v1
with:
artifact: TestOutput-Debug
name: Test Report Debug
path: '*.xml'
reporter: jest-junit

- name: "Create test report (Release)"
uses: dorny/test-reporter@v1
with:
artifact: TestOutput-Release
name: Test Report Release
path: '*.xml'
reporter: jest-junit

- name: "Create test report (Dist)"
- name: "Create test report"
uses: dorny/test-reporter@v1
with:
artifact: TestOutput-Dist
name: Test Report Dist
artifact: TestOutput-${{ matrix.config }}
name: Test Report ${{ matrix.config }}
path: '*.xml'
reporter: jest-junit
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
*.csproj*
*.sln

Makefile

# Binaries
/Bin
/Bin-Int
/Vendor/Premake
/EppoEditor/Resources/Scripts
/EppoEditor/Scripts/Intermediates
/EppoEditor/Projects/Assets/Scripts/Binaries
/EppoEditor/Projects/Assets/Scripts/Intermediates
/EppoEditor/Projects/*/Assets/Scripts/Binaries

# Cache
/EppoEditor/Resources/Shaders/Cache
__pycache__

# Build system
Makefile
6 changes: 5 additions & 1 deletion Dependencies.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
VulkanSdk = os.getenv("VULKAN_SDK")

if os.getenv("CI") then
VulkanSdk = "C:/VulkanSDK/1.3.275.0"
end

-- Include directories
IncludeDir = {}
IncludeDir["assimp"] = "%{wks.location}/EppoEngine/Vendor/assimp/include"
IncludeDir["bullet"] = "%{wks.location}/EppoEngine/Vendor/bullet/include"
IncludeDir["entt"] = "%{wks.location}/EppoEngine/Vendor/entt/single_include"
IncludeDir["filewatch"] = "%{wks.location}/EppoEngine/Vendor/filewatch"
IncludeDir["glad"] = "%{wks.location}/EppoEngine/Vendor/glad/include"
IncludeDir["glfw"] = "%{wks.location}/EppoEngine/Vendor/glfw/include"
IncludeDir["glm"] = "%{wks.location}/EppoEngine/Vendor/glm"
Expand Down Expand Up @@ -55,7 +60,6 @@ if (os.target() == "windows") then
StaticLibrary["spirv_cross_release"] = "%{StaticLibraryDir.vulkan}/spirv-cross-core.lib"
StaticLibrary["spirv_cross_glsl_debug"] = "%{StaticLibraryDir.vulkan}/spirv-cross-glsld.lib"
StaticLibrary["spirv_cross_glsl_release"] = "%{StaticLibraryDir.vulkan}/spirv-cross-glsl.lib"
StaticLibrary["spirv_tools_debug"] = "%{StaticLibraryDir.vulkan}/SPIRV-Toolsd.lib"
StaticLibrary["winmm"] = "Winmm.lib"
StaticLibrary["winsock"] = "Ws2_32.lib"
StaticLibrary["winversion"] = "Version.lib"
Expand Down
39 changes: 0 additions & 39 deletions EppoEditor/Projects/Assets/Scripts/Source/Player.cs

This file was deleted.

3 changes: 0 additions & 3 deletions EppoEditor/Projects/Assets/Scripts/Win-GenProjects.bat

This file was deleted.

5 changes: 0 additions & 5 deletions EppoEditor/Projects/Sandbox.epproj

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Scene: Test
Entities:
- Entity: 216671377127321184
- Entity: 14037038404468071748
TagComponent:
Tag: Camera
TransformComponent:
Expand Down Expand Up @@ -36,8 +36,15 @@ Entities:
Scale: [1, 1, 1]
MeshComponent:
MeshHandle: 5345703082771143640
ScriptComponent:
ClassName: Sandbox.Player
Fields:
- Name: Speed
Type: Float
Data: 12
RigidBodyComponent:
BodyType: 1
Mass: 1
- Entity: 5455157477212647122
TagComponent:
Tag: Small Cube 2
Expand All @@ -49,6 +56,7 @@ Entities:
MeshHandle: 5345703082771143640
RigidBodyComponent:
BodyType: 1
Mass: 1
- Entity: 5455157477212647123
TagComponent:
Tag: Plateau
Expand All @@ -60,3 +68,4 @@ Entities:
MeshHandle: 5345703082771143640
RigidBodyComponent:
BodyType: 0
Mass: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
50 changes: 50 additions & 0 deletions EppoEditor/Projects/Sandbox/Assets/Scripts/Source/MapController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using Eppo;
using System;
using System.Collections.Generic;

namespace Sandbox
{
public class MapController : Entity
{
private List<Entity> m_Tiles = new List<Entity>();

void OnCreate()
{
List<int> rowSize = new List<int>(){ 4, 5, 6, 7, 6, 5, 4 };

float hexSize = 1.05f;
float width = (float)(Math.Sqrt(3) * hexSize);
float height = 1.5f * hexSize;

float totalHeight = (rowSize.Count - 1) * height;

for (int r = 0; r < rowSize.Count; ++r)
{
int numCols = rowSize[r];
float xOffset = -(numCols - 1) * width / 2.0f;
float z = r * height - totalHeight / 2.0f;

for (int q = 0; q < numCols; ++q)
{
float x = xOffset + q * width;
float y = 0.0f;

Entity entity = CreateNewEntity("Tile");

MeshComponent mesh = entity.AddComponent<MeshComponent>();
mesh.SetMesh("Resources/Meshes/hexagon.fbx");

TransformComponent transform = entity.GetComponent<TransformComponent>();
transform.Translation = new Vector3(x, z, y);

m_Tiles.Add(entity);
}
}
}

void OnUpdate(float timestep)
{

}
}
}
18 changes: 18 additions & 0 deletions EppoEditor/Projects/Sandbox/Assets/Scripts/Source/Player.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Eppo;

namespace Sandbox
{
public class Player : Entity
{
void OnCreate()
{
//m_MeshComponent = GetComponent<MeshComponent>();
//m_RigidBodyComponent = GetComponent<RigidBodyComponent>();
}

void OnUpdate(float timestep)
{

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
call ..\..\..\..\..\Vendor\Premake\Bin\premake5.exe vs2022
PAUSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EPPO_DIR = "../../../../"
EPPO_DIR = "../../../../../"

workspace "Sandbox"
architecture "x86_64"
Expand Down
3 changes: 3 additions & 0 deletions EppoEditor/Projects/Sandbox/Sandbox.epproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Project:
Name: Sandbox
StartScene: Scenes/Test.epscene
6 changes: 6 additions & 0 deletions EppoEditor/Projects/Test/Assets/AssetRegistry.epporeg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- AssetHandle: 2444408785892150241
Type: Mesh
Filepath: Meshes\untitled.fbx
- AssetHandle: 2502917179482176098
Type: Scene
Filepath: Scenes\Test.epscene
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit c9a8944

Please sign in to comment.