Add tests to ci

master
Jeremy Hu 2019-07-24 06:05:10 +09:30
parent 0b2653362a
commit d1db4029d8
3 changed files with 49 additions and 8 deletions

View File

@ -69,6 +69,26 @@ script:
- export BRANCH="$TRAVIS_BRANCH"
- if [[ "$BRANCH" == "$TAG" ]]; then export BRANCH=master; fi
# (Mac) Test
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-addax.ds3 -o addax.obj || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-addax.ds3 -o addax.glb || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-addax.ds3 -o addax.fbx || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-bicycle.ds3 -o bicycle.obj || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-bicycle.ds3 -o bicycle.glb || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-bicycle.ds3 -o bicycle.fbx || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-bob.ds3 -o bob.obj || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-bob.ds3 -o bob.glb || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-bob.ds3 -o bob.fbx || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-dog-head.ds3 -o dog-head.obj || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-dog-head.ds3 -o dog-head.glb || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-dog-head.ds3 -o dog-head.fbx || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-meerkat.ds3 -o meerkat.obj || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-meerkat.ds3 -o meerkat.glb || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-meerkat.ds3 -o meerkat.fbx || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-mosquito.ds3 -o mosquito.obj || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-mosquito.ds3 -o mosquito.glb || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then dust3d.app/Contents/MacOS/dust3d :/resources/model-mosquito.ds3 -o mosquito.fbx || travis_terminate 1; fi
# (Mac) Prepare dmg
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mv dust3d.app dust3d-$TAG.app || travis_terminate 1; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then macdeployqt dust3d-$TAG.app -dmg || travis_terminate 1; fi

View File

@ -65,6 +65,27 @@ after_test:
- mkdir imageformats
- copy %QTDIR%\plugins\imageformats\qjpeg.dll %APPVEYOR_BUILD_FOLDER%\imageformats\qjpeg.dll
- 7z a dust3d-%TAG%-%PLATFORM%.zip -r %APPVEYOR_BUILD_FOLDER%\imageformats\
- mkdir test
- 7z e dust3d-%TAG%-%PLATFORM%.zip -o%APPVEYOR_BUILD_FOLDER%\test *.* -r
- cd /d %APPVEYOR_BUILD_FOLDER%\test
- dust3d.exe :/resources/model-addax.ds3 -o addax.obj
- dust3d.exe :/resources/model-addax.ds3 -o addax.fbx
- dust3d.exe :/resources/model-addax.ds3 -o addax.glb
- dust3d.exe :/resources/model-bicycle.ds3 -o bicycle.obj
- dust3d.exe :/resources/model-bicycle.ds3 -o bicycle.fbx
- dust3d.exe :/resources/model-bicycle.ds3 -o bicycle.glb
- dust3d.exe :/resources/model-bob.ds3 -o bob.obj
- dust3d.exe :/resources/model-bob.ds3 -o bob.fbx
- dust3d.exe :/resources/model-bob.ds3 -o bob.glb
- dust3d.exe :/resources/model-dog-head.ds3 -o dog-head.obj
- dust3d.exe :/resources/model-dog-head.ds3 -o dog-head.fbx
- dust3d.exe :/resources/model-dog-head.ds3 -o dog-head.glb
- dust3d.exe :/resources/model-meerkat.ds3 -o meerkat.obj
- dust3d.exe :/resources/model-meerkat.ds3 -o meerkat.fbx
- dust3d.exe :/resources/model-meerkat.ds3 -o meerkat.glb
- dust3d.exe :/resources/model-mosquito.ds3 -o mosquito.obj
- dust3d.exe :/resources/model-mosquito.ds3 -o mosquito.fbx
- dust3d.exe :/resources/model-mosquito.ds3 -o mosquito.glb
artifacts:
- path: '*.zip'

View File

@ -82,14 +82,14 @@ const int TYPE_DIRECTIONAL = 1;
const int TYPE_SPOT = 2;
struct Light {
int type;
vec3 position;
vec3 color;
float intensity;
vec3 direction;
float constantAttenuation;
float linearAttenuation;
float quadraticAttenuation;
float cutOffAngle;
highp vec3 position;
highp vec3 color;
highp float intensity;
highp vec3 direction;
highp float constantAttenuation;
highp float linearAttenuation;
highp float quadraticAttenuation;
highp float cutOffAngle;
};
int lightCount;
Light lights[MAX_LIGHTS];