From e268445d6ccd2f50e12567896bc923ccb125b6aa Mon Sep 17 00:00:00 2001 From: AdventureT Date: Thu, 9 Nov 2023 19:59:51 +0100 Subject: [PATCH] Added CI --- .github/workflows/main.yml | 50 ++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + OpenJPOG/Source/main.cpp | 4 +++ OpenJPOG/premake5.lua | 6 ++--- Toshi/premake5.lua | 38 +++-------------------------- 5 files changed, 61 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/main.yml create mode 100644 OpenJPOG/Source/main.cpp diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5e596c4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,50 @@ +name: Toshi + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + # Path to the solution file relative to the root of the project. + SOLUTION_FILE_PATH: . + + # Configuration type to build. + BUILD_CONFIGURATION: Release + +permissions: + contents: read + +jobs: + build: + env: + PREMAKE_VERSION: 5.0.0-beta2 + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup premake + uses: abel0b/setup-premake@v2.3 + with: + version: ${{ env.PREMAKE_VERSION }} + + - name: Premake + run: premake5 vs2022 --arch=x86 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Build Toshi + working-directory: ${{env.GITHUB_WORKSPACE}} + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} + + - name: Publish Artifact + uses: actions/upload-artifact@v2 + with: + name: Toshi Binaries + path: bin \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3912fe1..1cf1b8a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ *.dll.* *.lib *.lib.* +*.exe.* # User-specific files *.rsuser diff --git a/OpenJPOG/Source/main.cpp b/OpenJPOG/Source/main.cpp new file mode 100644 index 0000000..54d00f5 --- /dev/null +++ b/OpenJPOG/Source/main.cpp @@ -0,0 +1,4 @@ +int main(int argc, char** argv) +{ + return 1; +} \ No newline at end of file diff --git a/OpenJPOG/premake5.lua b/OpenJPOG/premake5.lua index 7144909..842feea 100644 --- a/OpenJPOG/premake5.lua +++ b/OpenJPOG/premake5.lua @@ -35,9 +35,9 @@ project ("OpenJPOG") postbuildcommands { - "{COPYDIR} Data \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}/Data\"", - "{COPYDIR} \"" .. ClientContentCommon .. "\" \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}/\"", - "{COPYDIR} \"" .. ClientContentArch .. "\" \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}/\"", + --"{COPYDIR} Data \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}/Data\"", + --"{COPYDIR} \"" .. ClientContentCommon .. "\" \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}/\"", + --"{COPYDIR} \"" .. ClientContentArch .. "\" \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}/\"", } filter "system:windows" diff --git a/Toshi/premake5.lua b/Toshi/premake5.lua index 22dbb1d..29be287 100644 --- a/Toshi/premake5.lua +++ b/Toshi/premake5.lua @@ -6,29 +6,13 @@ project ("TKernelInterface") links { - "fmod_vc.lib", - "fmodstudio_vc.lib", - "fsbank_vc.lib", - "d3d11.lib", - "d3dcompiler.lib", - "dxguid.lib", - "dxgi.lib", - "winmm.lib", - "dinput8.lib", - "dbghelp.lib" + "winmm.lib" } includedirs { "Include", "Include/TKernel", - "%{IncludeDir.fmod}", - "%{IncludeDir.stb}" - } - - libdirs - { - "%{LibDir.fmod}" } defines @@ -78,24 +62,13 @@ project ("TApplication") links { - "fmod_vc.lib", - "fmodstudio_vc.lib", - "fsbank_vc.lib", - "d3d11.lib", - "d3dcompiler.lib", - "dxguid.lib", - "dxgi.lib", - "winmm.lib", - "dinput8.lib", - "dbghelp.lib" + "winmm.lib" } includedirs { "Include", - "Include/TApplication", - "%{IncludeDir.fmod}", - "%{IncludeDir.stb}" + "Include/TApplication" } files @@ -105,11 +78,6 @@ project ("TApplication") "Source/TApplication/**.cpp" } - libdirs - { - "%{LibDir.fmod}" - } - defines { "TOSHI_USER_ENGINE",