Explorar o código

Run tests in CI.

* Download glslangvalidator from Khronos GitHub releases.
* Use Fxc which is already available on AppVeyor machines.
* Metal is not compiled in the tests.
Eric Mellino %!s(int64=7) %!d(string=hai) anos
pai
achega
dbeb71d27d
Modificáronse 4 ficheiros con 11 adicións e 2 borrados
  1. 8 0
      appveyor.yml
  2. 1 0
      ci-test.cmd
  3. 1 1
      src/ShaderGen/Glsl/GlslBackendBase.cs
  4. 1 1
      src/ShaderGen/Hlsl/HlslBackend.cs

+ 8 - 0
appveyor.yml

@@ -1,6 +1,14 @@
 build_script:
   ci-build.cmd
 
+before_test:
+  - appveyor DownloadFile https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip -FileName glslangvalidator.zip
+  - unzip glslangvalidator.zip
+  - set PATH=%APPVEYOR_BUILD_FOLDER%\bin;%PATH%
+
+test_script:
+  - ci-test.cmd
+
 artifacts:
   - path: bin\Packages\Release\*.nupkg
     name: nugetPackages

+ 1 - 0
ci-test.cmd

@@ -0,0 +1 @@
+dotnet test src\ShaderGen.Tests\ShaderGen.Tests.csproj

+ 1 - 1
src/ShaderGen/Glsl/GlslBackendBase.cs

@@ -17,7 +17,7 @@ namespace ShaderGen.Glsl
 
         protected void WriteStructure(StringBuilder sb, StructureDefinition sd)
         {
-            sb.AppendLine($"struct {CSharpToShaderType(sd.Name)}");
+            sb.AppendLine($"BAD CODE struct {CSharpToShaderType(sd.Name)}");
             sb.AppendLine("{");
             StringBuilder fb = new StringBuilder();
             foreach (FieldDefinition field in sd.Fields)

+ 1 - 1
src/ShaderGen/Hlsl/HlslBackend.cs

@@ -21,7 +21,7 @@ namespace ShaderGen.Hlsl
 
         protected void WriteStructure(StringBuilder sb, StructureDefinition sd)
         {
-            sb.AppendLine($"struct {CSharpToShaderType(sd.Name)}");
+            sb.AppendLine($"BAD CODE struct {CSharpToShaderType(sd.Name)}");
             sb.AppendLine("{");
             HlslSemanticTracker tracker = new HlslSemanticTracker();
             StringBuilder fb = new StringBuilder();