diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..8ad74f78d9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.github/workflows/godot-ci.yml b/.github/workflows/godot-ci.yml new file mode 100644 index 0000000000..f1676fd8d3 --- /dev/null +++ b/.github/workflows/godot-ci.yml @@ -0,0 +1,37 @@ +name: export +on: push +env: + GODOT_VERSION: 4.1.1 + WINDOWS_PRESET_NAME: Windows +jobs: + export_game: + runs-on: ubuntu-latest + permissions: write-all + name: Export Game + steps: + - name: checkout + uses: actions/checkout@v3.3.0 + + # - name: export game + # id: export + # uses: firebelley/godot-export@v5.2.0 + # with: + # godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/${{ env.GODOT_VERSION }}/mono/Godot_v${{ env.GODOT_VERSION }}-stable_mono_linux_x86_64.zip + # godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/${{ env.GODOT_VERSION }}/mono/Godot_v${{ env.GODOT_VERSION }}-stable_mono_export_templates.tpz + # relative_project_path: ./lemons + # archive_output: false + + # # - name: Copy Steam Redistributables + # # run: | + # # cp -v ./lemons/steam_api64.dll ${{ steps.export.outputs.build_directory }}/${{ env.WINDOWS_PRESET_NAME }}/ + + # - name: Prepare Files for Artifact + # run: | + # mkdir -p ${{ github.workspace }}/build/${{ env.WINDOWS_PRESET_NAME }} + # cp -r ${{ steps.export.outputs.build_directory }}/${{ env.WINDOWS_PRESET_NAME }}/* ${{ github.workspace }}/build/${{ env.WINDOWS_PRESET_NAME }} + + # - name: Upload Windows artifact + # uses: actions/upload-artifact@v2 + # with: + # name: windows-artifact + # path: ${{ github.workspace }}/build/${{ env.WINDOWS_PRESET_NAME }} diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 0000000000..cbdd8b2c76 --- /dev/null +++ b/.github/workflows/test-report.yml @@ -0,0 +1,16 @@ +name: 'Test Report' +on: + workflow_run: + workflows: ['Unit Testing'] + types: + - completed +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v1 + with: + artifact: test-results + name: XUnit tests + path: '*.xml' + reporter: dotnet-trx \ No newline at end of file diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml new file mode 100644 index 0000000000..c2c8025bd5 --- /dev/null +++ b/.github/workflows/unit-testing.yml @@ -0,0 +1,26 @@ +name: Unit Testing +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + tests: + name: Dotnet tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6' + - name: Run tests + run: | + cd Godotstation + dotnet test --logger "trx;LogFileName=TestResults.xml" + - uses: actions/upload-artifact@v2 + if: success() || failure() + with: + name: test-results + path: ${{ github.workspace }}/Godotstation/NonGodotTests/TestResults/TestResults.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..756b39c562 --- /dev/null +++ b/.gitignore @@ -0,0 +1,119 @@ +# Godot 4+ specific ignores +.godot/ + +# Godot-specific ignores +.import/ + +# Imported translations (automatically generated from CSV files) +*.translation + +# Mono-specific ignores +.mono/ +.idea/ +.vscode/ +data_*/ +mono_crash.*.json + +# dotnet-specific ignores +*.swp +*.*~ +project.lock.json +.DS_Store +*.pyc +nupkg/ + +# Visual Studio Code +.vscode/ + +# Rider +.idea/ + +# Visual Studio +.vs/ + +# Fleet +.fleet/ + +# Code Rush +.cr/ + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates +*.sln.DotSettings.user + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ +[Oo]ut/ +msbuild.log +msbuild.err +msbuild.wrn + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# Enable nuget.exe in the .nuget folder (though normally executables are not tracked) +!.nuget/NuGet.exe + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# NuGet Packages Directory +packages/ + +# Test results produced by build +TestResults.xml + +# Nuget outputs +nuget/*.nupkg +release.cmd +release.sh +localpackages/ +paket-files +*.orig +docsrc/content/license.md +docsrc/content/release-notes.md +.fake +docsrc/tools/FSharp.Formatting.svclog \ No newline at end of file diff --git a/Godotstation/Content/Placeholder.cs b/Godotstation/Content/Placeholder.cs new file mode 100644 index 0000000000..565891860a --- /dev/null +++ b/Godotstation/Content/Placeholder.cs @@ -0,0 +1,5 @@ +namespace GodotStation.Content; + +public class Placeholder +{ +} \ No newline at end of file diff --git a/Godotstation/Engine/Placeholder.cs b/Godotstation/Engine/Placeholder.cs new file mode 100644 index 0000000000..d3582e4e07 --- /dev/null +++ b/Godotstation/Engine/Placeholder.cs @@ -0,0 +1,5 @@ +namespace GodotStation.Engine; + +public class Placeholder +{ +} \ No newline at end of file diff --git a/Godotstation/GodotStation.csproj b/Godotstation/GodotStation.csproj new file mode 100644 index 0000000000..18eefebe24 --- /dev/null +++ b/Godotstation/GodotStation.csproj @@ -0,0 +1,12 @@ + + + net6.0 + true + enable + false + + + + + + \ No newline at end of file diff --git a/Godotstation/GodotStation.sln b/Godotstation/GodotStation.sln new file mode 100644 index 0000000000..4d7e6c452c --- /dev/null +++ b/Godotstation/GodotStation.sln @@ -0,0 +1,27 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GodotStation", "GodotStation.csproj", "{D4075258-E5DF-48F7-8523-BDB27FCDC1B4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NonGodotTests", "NonGodotTests\NonGodotTests.csproj", "{9260A73F-4968-4640-84E1-16BE584FC776}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + ExportDebug|Any CPU = ExportDebug|Any CPU + ExportRelease|Any CPU = ExportRelease|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D4075258-E5DF-48F7-8523-BDB27FCDC1B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4075258-E5DF-48F7-8523-BDB27FCDC1B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4075258-E5DF-48F7-8523-BDB27FCDC1B4}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {D4075258-E5DF-48F7-8523-BDB27FCDC1B4}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {D4075258-E5DF-48F7-8523-BDB27FCDC1B4}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {D4075258-E5DF-48F7-8523-BDB27FCDC1B4}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + {9260A73F-4968-4640-84E1-16BE584FC776}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9260A73F-4968-4640-84E1-16BE584FC776}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9260A73F-4968-4640-84E1-16BE584FC776}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU + {9260A73F-4968-4640-84E1-16BE584FC776}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU + {9260A73F-4968-4640-84E1-16BE584FC776}.ExportRelease|Any CPU.ActiveCfg = Debug|Any CPU + {9260A73F-4968-4640-84E1-16BE584FC776}.ExportRelease|Any CPU.Build.0 = Debug|Any CPU + EndGlobalSection +EndGlobal diff --git a/Godotstation/NonGodotTests/NonGodotTests.csproj b/Godotstation/NonGodotTests/NonGodotTests.csproj new file mode 100644 index 0000000000..8b33d24283 --- /dev/null +++ b/Godotstation/NonGodotTests/NonGodotTests.csproj @@ -0,0 +1,29 @@ + + + + net6.0 + enable + enable + + false + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/Godotstation/NonGodotTests/TestPlaceholder.cs b/Godotstation/NonGodotTests/TestPlaceholder.cs new file mode 100644 index 0000000000..46708560c2 --- /dev/null +++ b/Godotstation/NonGodotTests/TestPlaceholder.cs @@ -0,0 +1,13 @@ +using GodotStation.Engine; + +namespace NonGodotTests; + +public class TestPlaceholder +{ + [Fact] + public void TestPlaceHolderIsNotNull() + { + Placeholder placeholder = new(); + placeholder.ShouldNotBeNull(); + } +} \ No newline at end of file diff --git a/Godotstation/NonGodotTests/Usings.cs b/Godotstation/NonGodotTests/Usings.cs new file mode 100644 index 0000000000..bd8299f6f2 --- /dev/null +++ b/Godotstation/NonGodotTests/Usings.cs @@ -0,0 +1,2 @@ +global using Xunit; +global using Shouldly; \ No newline at end of file diff --git a/Godotstation/icon.png b/Godotstation/icon.png new file mode 100644 index 0000000000..b4cfb51d43 Binary files /dev/null and b/Godotstation/icon.png differ diff --git a/Godotstation/icon.png.import b/Godotstation/icon.png.import new file mode 100644 index 0000000000..b43e62a1cf --- /dev/null +++ b/Godotstation/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dnwno3m4c42eo" +path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Godotstation/project.godot b/Godotstation/project.godot new file mode 100644 index 0000000000..5a4db96a5c --- /dev/null +++ b/Godotstation/project.godot @@ -0,0 +1,19 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="GodotStation" +config/features=PackedStringArray("4.1", "C#") +config/icon="res://icon.png" + +[dotnet] + +project/assembly_name="GodotStation"