From 8f5489243920f568d30c5dd629131fde3b02b651 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 01:27:21 +1100 Subject: [PATCH 01/27] Cleaned up appveyor setup, added VS 2017 to the build matrix and attempted to add running of tests. --- appveyor.yml | 49 ++++++++++++++++++----------- scripts/appveyor/compiler_setup.bat | 36 --------------------- 2 files changed, 30 insertions(+), 55 deletions(-) delete mode 100644 scripts/appveyor/compiler_setup.bat diff --git a/appveyor.yml b/appveyor.yml index b8828710b..5eabc8ada 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,39 +4,50 @@ # clone directory clone_folder: c:\projects\assimp +shallow_clone: true + # branches to build branches: # whitelist only: - master +image: + - Visual Studio 2013 + - Visual Studio 2015 + - Visual Studio 2017 + platform: - - x86 - - x64 + - x86 + - x64 -configuration: - - 14 2015 - - 12 2013 - #- MinGW - #- 10 2010 # only works for x86 +configuration: Release -init: -- if "%platform%" EQU "x64" ( for %%a in (2008 2010 MinGW) do ( if "%Configuration%"=="%%a" (echo "Skipping unsupported configuration" && exit /b 1 ) ) ) +build: + parallel: true + project: Assimp.sln install: -# Make compiler command line tools available -- call c:\projects\assimp\scripts\appveyor\compiler_setup.bat - -build_script: -- cd c:\projects\assimp -- if "%platform%" equ "x64" (cmake CMakeLists.txt -DASSIMP_WERROR=ON -G "Visual Studio %Configuration% Win64") -- if "%platform%" equ "x86" (cmake CMakeLists.txt -DASSIMP_WERROR=ON -G "Visual Studio %Configuration%") -- if "%platform%" equ "x64" (msbuild /m /p:Configuration=Release /p:Platform="x64" Assimp.sln) -- if "%platform%" equ "x86" (msbuild /m /p:Configuration=Release /p:Platform="Win32" Assimp.sln) + - @echo off + - set CMAKE_DEFINES -DASSIMP_WERROR=ON + - if "%platform%"=="x86" set CMAKE_GENERATOR_NAME=%APPVEYOR_BUILD_WORKER_IMAGE% + - if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%APPVEYOR_BUILD_WORKER_IMAGE% Win64 + - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" +cache: + - code\assimp.dir\%CONFIGURATION% + after_build: - - 7z a assimp.7z c:\projects\assimp\bin\release\* c:\projects\assimp\lib\release\* + - 7z a assimp.7z %APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\* %APPVEYOR_BUILD_FOLDER%\lib\%CONFIGURATION%\* + +before_test: + - xcopy /s "%APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\" "%APPVEYOR_BUILD_FOLDER%\test\%CONFIGURATION%\" +test: + assemblies: + only: + - test\%CONFIGURATION%\unit.exe + artifacts: - path: assimp.7z name: assimp_lib diff --git a/scripts/appveyor/compiler_setup.bat b/scripts/appveyor/compiler_setup.bat deleted file mode 100644 index 7d4851493..000000000 --- a/scripts/appveyor/compiler_setup.bat +++ /dev/null @@ -1,36 +0,0 @@ -rem @echo off - -:: Now we declare a scope -Setlocal EnableDelayedExpansion EnableExtensions - -if not defined Configuration set Configuration=14 2015 - -if "%Configuration%"=="MinGW" ( goto :mingw ) - -set arch=x86 - -if "%platform%" EQU "x64" ( set arch=x86_amd64 ) - -if "%Configuration%"=="14 2015" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" -) - -if "%Configuration%"=="12 2013" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" -) - -if "%Configuration%"=="11 2012" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" -) - -if "%Configuration%"=="10 2010" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" -) - -:: Visual Studio detected -endlocal & call %SET_VS_ENV% %arch% -goto :eof - -:: MinGW detected -:mingw -endlocal & set PATH=c:\mingw\bin;%PATH% From 63764ae42a9d0e0229bf02bc0f2b9a720f3f2494 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 01:33:48 +1100 Subject: [PATCH 02/27] Apparently @ escaping batch commands doesn't work in this context. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 5eabc8ada..b31137959 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,7 @@ build: project: Assimp.sln install: - - @echo off + - echo off - set CMAKE_DEFINES -DASSIMP_WERROR=ON - if "%platform%"=="x86" set CMAKE_GENERATOR_NAME=%APPVEYOR_BUILD_WORKER_IMAGE% - if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%APPVEYOR_BUILD_WORKER_IMAGE% Win64 From 4c06abf281ef1eacaec42ca39b5437c7c511f430 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 01:47:08 +1100 Subject: [PATCH 03/27] Replaced the worker image name, which doesn't work as generator name, with a manually created generator name. --- appveyor.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b31137959..653bcf937 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,10 +28,11 @@ build: project: Assimp.sln install: - - echo off - set CMAKE_DEFINES -DASSIMP_WERROR=ON - - if "%platform%"=="x86" set CMAKE_GENERATOR_NAME=%APPVEYOR_BUILD_WORKER_IMAGE% - - if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%APPVEYOR_BUILD_WORKER_IMAGE% Win64 + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" set CMAKE_GENERATOR_NAME=Visual Studio 12 2013 + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR_NAME=Visual Studio 15 2017 + - if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" cache: From ba43e3a152f9dc8e7506c383019fdf7347c4369a Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 01:55:10 +1100 Subject: [PATCH 04/27] x86 isn't a valid VS platform. Win32 it is, then. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 653bcf937..d43e8da45 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ image: - Visual Studio 2017 platform: - - x86 + - Win32 - x64 configuration: Release From d3de8dbf5ffcb430a1624cc9b607e2dcbffaea4a Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 02:03:00 +1100 Subject: [PATCH 05/27] Paths aren't what I expected for the test directory. Trying something else, with a testing call to dir to help track it down. --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d43e8da45..8e35c0e1a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,12 +42,13 @@ after_build: - 7z a assimp.7z %APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\* %APPVEYOR_BUILD_FOLDER%\lib\%CONFIGURATION%\* before_test: - - xcopy /s "%APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\" "%APPVEYOR_BUILD_FOLDER%\test\%CONFIGURATION%\" + - dir "%APPVEYOR_BUILD_FOLDER%\bin" + - xcopy /s "%APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%" "%APPVEYOR_BUILD_FOLDER%\bin\test\%CONFIGURATION%" test: assemblies: only: - - test\%CONFIGURATION%\unit.exe + - bin\test\%CONFIGURATION%\unit.exe artifacts: - path: assimp.7z From fe79322959e3f6cdb4ab19f3bcc136a5dced1881 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 02:22:37 +1100 Subject: [PATCH 06/27] Attempting to get the tests detected and run. --- appveyor.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8e35c0e1a..b461d9dda 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,15 +40,11 @@ cache: after_build: - 7z a assimp.7z %APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\* %APPVEYOR_BUILD_FOLDER%\lib\%CONFIGURATION%\* - -before_test: - - dir "%APPVEYOR_BUILD_FOLDER%\bin" - - xcopy /s "%APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%" "%APPVEYOR_BUILD_FOLDER%\bin\test\%CONFIGURATION%" test: assemblies: only: - - bin\test\%CONFIGURATION%\unit.exe + - bin\%CONFIGURATION%\unit.exe artifacts: - path: assimp.7z From 26851880e4a098370b9d65d9cad57154c38564a3 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 11:55:54 +1100 Subject: [PATCH 07/27] Attempting to address issues with cloning the repo. shallow_copy seems to fail at times. I'll let it continue to clone the whole history. --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b461d9dda..380a8c577 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,8 +4,6 @@ # clone directory clone_folder: c:\projects\assimp -shallow_clone: true - # branches to build branches: # whitelist From 3e80aabde5cc27b2d02249894423d5edac763dd4 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 12:32:14 +1100 Subject: [PATCH 08/27] Attempting to get tests to run. --- appveyor.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 380a8c577..5a7694a1a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -39,10 +39,8 @@ cache: after_build: - 7z a assimp.7z %APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\* %APPVEYOR_BUILD_FOLDER%\lib\%CONFIGURATION%\* -test: - assemblies: - only: - - bin\%CONFIGURATION%\unit.exe +test_script: + - cmd: bin\%CONFIGURATION%\unit.exe artifacts: - path: assimp.7z From 6a2dfb1efce678d11cf1f6524fabc1ec98ef3a83 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 12:44:54 +1100 Subject: [PATCH 09/27] Fixed up the path to the build artifacts to be cached. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 5a7694a1a..6d5a046bf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,7 +34,7 @@ install: - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" cache: - - code\assimp.dir\%CONFIGURATION% + - assimp.dir\%CONFIGURATION% after_build: - 7z a assimp.7z %APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\* %APPVEYOR_BUILD_FOLDER%\lib\%CONFIGURATION%\* From 52da099738e3049ecfd85d5051a2d64c61d3a260 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 13:00:27 +1100 Subject: [PATCH 10/27] Updated test output to log to xml and to upload those results appropriately, so they show up in AppVeyor correctly as tests at the end. --- appveyor.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6d5a046bf..26e72b3d0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,10 @@ after_build: - 7z a assimp.7z %APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\* %APPVEYOR_BUILD_FOLDER%\lib\%CONFIGURATION%\* test_script: - - cmd: bin\%CONFIGURATION%\unit.exe + - cmd: bin\%CONFIGURATION%\unit.exe -gtest_output=xml:testout.xml + +after_test: + - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) artifacts: - path: assimp.7z From 81d3010f73dd86f7831fe4aabde5aa66ac96c3fb Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 16:21:32 +1100 Subject: [PATCH 11/27] Added the mtime_cache script to hopefully improve use of incremental building with appveyor. Reduced the verbosity of the appveyor config. Added use of mtime_cache. Fixed the output of an xml version of the test output for hooking into appveyor. --- appveyor.yml | 29 ++++-- scripts/AppVeyor/cacheglobs.txt | 4 + scripts/AppVeyor/mtime_cache | 177 ++++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+), 7 deletions(-) create mode 100644 scripts/AppVeyor/cacheglobs.txt create mode 100644 scripts/AppVeyor/mtime_cache diff --git a/appveyor.yml b/appveyor.yml index 26e72b3d0..67bf6cdec 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,28 +19,43 @@ platform: - Win32 - x64 +environment: + - build_cache_dir: bin\.mtime_cache + - build_binary_dir: bin\%CONFIGURATION% + - appveyor_script_dir: scripts\AppVeyor + configuration: Release -build: - parallel: true - project: Assimp.sln - install: + - set PATH=C:\Ruby24-x64\bin;%PATH% - set CMAKE_DEFINES -DASSIMP_WERROR=ON - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" set CMAKE_GENERATOR_NAME=Visual Studio 12 2013 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR_NAME=Visual Studio 15 2017 - if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" - + cache: - assimp.dir\%CONFIGURATION% + - zlibstatic.dir\%CONFIGURATION% + - zlib.dir\%CONFIGURATION% + - assimp_cmd.dir\%CONFIGURATION% + - assimp_viewer.dir\%CONFIGURATION% + - unit.dir\%CONFIGURATION% + - $(build_cache_dir) + +before_build: + - ruby $(appveyor_script_dir)\mtime_cache -g $(appveyor_script_dir)\cacheglobs.txt -c $(build_cache_dir)\cache.json + +build: + parallel: true + project: Assimp.sln after_build: - - 7z a assimp.7z %APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\* %APPVEYOR_BUILD_FOLDER%\lib\%CONFIGURATION%\* + - 7z a assimp.7z $(build_binary_dir)\* lib\%CONFIGURATION%\* test_script: - - cmd: bin\%CONFIGURATION%\unit.exe -gtest_output=xml:testout.xml + - cmd: $(build_binary_dir)\unit.exe --gtest_output=xml:testout.xml after_test: - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) diff --git a/scripts/AppVeyor/cacheglobs.txt b/scripts/AppVeyor/cacheglobs.txt new file mode 100644 index 000000000..0f5f04a4a --- /dev/null +++ b/scripts/AppVeyor/cacheglobs.txt @@ -0,0 +1,4 @@ +code/*.{%{cpp}} +contrib/**/*.{%{cpp}} +include/**/*.{%{cpp}} +test/**/*.{%{cpp}} diff --git a/scripts/AppVeyor/mtime_cache b/scripts/AppVeyor/mtime_cache new file mode 100644 index 000000000..e296e3658 --- /dev/null +++ b/scripts/AppVeyor/mtime_cache @@ -0,0 +1,177 @@ +#!/usr/bin/env ruby + +# +# mtime_cache +# Copyright (c) 2016 Borislav Stanimirov +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +require 'digest/md5' +require 'json' +require 'fileutils' + +VERSION = "1.0.2" + +VERSION_TEXT = "mtime_cache v#{VERSION}" + +USAGE = <] [-g globfile] [-d] [-q|V] [-c cache] +ENDUSAGE + +HELP = < '.mtime_cache.json', :globs => [] } + +ARGV.each do |arg| + case arg + when '-g', '--globfile' then param_arg = :globfile + when '-h', '-?', '--help' then ARGS[:help] = true + when '-v', '--version' then ARGS[:ver] = true + when '-q', '--quiet' then ARGS[:quiet] = true + when '-V', '--verbose' then ARGS[:verbose] = true + when '-d', '--dryrun' then ARGS[:dry] = true + when '-c', '--cache' then param_arg = :cache + else + if param_arg + ARGS[param_arg] = arg + param_arg = nil + else + ARGS[:globs] << arg + end + end +end + +def log(text, level = 0) + return if ARGS[:quiet] + return if level > 0 && !ARGS[:verbose] + puts text +end + +if ARGS[:ver] || ARGS[:help] + log VERSION_TEXT + exit if ARGS[:ver] + log USAGE + log HELP + exit +end + +if ARGS[:globs].empty? && !ARGS[:globfile] + log 'Error: Missing globs' + log USAGE + exit 1 +end + +EXTENSION_PATTERNS = { + :cpp => "c,cc,cpp,cxx,h,hpp,hxx,inl,ipp,inc,ixx" +} + +cache_file = ARGS[:cache] + +cache = {} + +if File.file?(cache_file) + log "Found #{cache_file}" + cache = JSON.parse(File.read(cache_file)) + log "Read #{cache.length} entries" +else + log "#{cache_file} not found. A new one will be created" +end + +globs = ARGS[:globs].map { |g| g % EXTENSION_PATTERNS } + +globfile = ARGS[:globfile] +if globfile + File.open(globfile, 'r').each_line do |line| + line.strip! + next if line.empty? + globs << line % EXTENSION_PATTERNS + end +end + +if globs.empty? + log 'Error: No globs in globfile' + log USAGE + exit 1 +end + +files = {} +num_changed = 0 + +globs.each do |glob| + Dir[glob].each do |file| + next if !File.file?(file) + + mtime = File.mtime(file).to_i + hash = Digest::MD5.hexdigest(File.read(file)) + + cached = cache[file] + + if cached && cached['hash'] == hash && cached['mtime'] < mtime + mtime = cached['mtime'] + + log "mtime_cache: changing mtime of #{file} to #{mtime}", 1 + + File.utime(File.atime(file), Time.at(mtime), file) if !ARGS[:dry] + num_changed += 1 + else + log "mtime_cache: NOT changing mtime of #{file}", 1 + end + + files[file] = { 'mtime' => mtime, 'hash' => hash } + end +end + +log "Changed mtime of #{num_changed} of #{files.length} files" +log "Writing #{cache_file}" + +if !ARGS[:dry] + dirname = File.dirname(cache_file) + unless File.directory?(dirname) + FileUtils.mkdir_p(dirname) + end + File.open(cache_file, 'w').write(JSON.pretty_generate(files)) +end From 90c9884c5e41b5ba8c6bf001710f767e053d6c8b Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 16:24:05 +1100 Subject: [PATCH 12/27] The environment section uses different syntax for a list of vars. --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 67bf6cdec..92d851ed2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,9 +20,9 @@ platform: - x64 environment: - - build_cache_dir: bin\.mtime_cache - - build_binary_dir: bin\%CONFIGURATION% - - appveyor_script_dir: scripts\AppVeyor + build_cache_dir: bin\.mtime_cache + build_binary_dir: bin\%CONFIGURATION% + appveyor_script_dir: scripts\AppVeyor configuration: Release From 58ac747634a9f8b2997c141998272c5c5d5cf935 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 16:28:43 +1100 Subject: [PATCH 13/27] Fixed some bad usage of environment variables. --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 92d851ed2..6bddf4684 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -45,17 +45,17 @@ cache: - $(build_cache_dir) before_build: - - ruby $(appveyor_script_dir)\mtime_cache -g $(appveyor_script_dir)\cacheglobs.txt -c $(build_cache_dir)\cache.json + - ruby %appveyor_script_dir%\mtime_cache -g %appveyor_script_dir%\cacheglobs.txt -c %build_cache_dir%\cache.json build: parallel: true project: Assimp.sln after_build: - - 7z a assimp.7z $(build_binary_dir)\* lib\%CONFIGURATION%\* + - 7z a assimp.7z %build_binary_dir%\* lib\%CONFIGURATION%\* test_script: - - cmd: $(build_binary_dir)\unit.exe --gtest_output=xml:testout.xml + - cmd: %build_binary_dir%\unit.exe --gtest_output=xml:testout.xml after_test: - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) From 5149149b0760501b0aa0731283ae1ca7af0ec54b Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 16:31:46 +1100 Subject: [PATCH 14/27] The environment section doesn't do what I thought it would. Duplication is bad, but seems neccessary. --- appveyor.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6bddf4684..74bb5ce3e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,11 +18,6 @@ image: platform: - Win32 - x64 - -environment: - build_cache_dir: bin\.mtime_cache - build_binary_dir: bin\%CONFIGURATION% - appveyor_script_dir: scripts\AppVeyor configuration: Release @@ -42,20 +37,20 @@ cache: - assimp_cmd.dir\%CONFIGURATION% - assimp_viewer.dir\%CONFIGURATION% - unit.dir\%CONFIGURATION% - - $(build_cache_dir) + - bin\.mtime_cache before_build: - - ruby %appveyor_script_dir%\mtime_cache -g %appveyor_script_dir%\cacheglobs.txt -c %build_cache_dir%\cache.json + - ruby scripts\AppVeyor\mtime_cache -g scripts\AppVeyor\cacheglobs.txt -c bin\.mtime_cache\cache.json build: parallel: true project: Assimp.sln after_build: - - 7z a assimp.7z %build_binary_dir%\* lib\%CONFIGURATION%\* + - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\* test_script: - - cmd: %build_binary_dir%\unit.exe --gtest_output=xml:testout.xml + - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml after_test: - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) From 5e5b7f4f75122520c2605a7665ed2335e2c80f7e Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 17:06:23 +1100 Subject: [PATCH 15/27] Refined the appveyor config so that test output is reported even if tests fail. --- appveyor.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 74bb5ce3e..43f83a264 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,10 +51,8 @@ after_build: test_script: - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml - -after_test: - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) - + artifacts: - path: assimp.7z name: assimp_lib From 54d2f25aa597790f47f24e92fdddedcd696aa25a Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 17:46:45 +1100 Subject: [PATCH 16/27] Attempting to get test results reporting even if an error occurrs. --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 43f83a264..e3485dd35 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,7 +50,9 @@ after_build: - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\* test_script: - - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml + - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || ( +Powershell.exe -executionpolicy remotesigned -Command "(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml))" && exit 1 +) - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) artifacts: From 022a34e54c275330f3616b1c8bd88966771c8a9f Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 17:50:11 +1100 Subject: [PATCH 17/27] Fixing multiline batch command weirdness. --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e3485dd35..3e958b36c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,8 +51,7 @@ after_build: test_script: - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || ( -Powershell.exe -executionpolicy remotesigned -Command "(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml))" && exit 1 -) +Powershell.exe -executionpolicy remotesigned -Command "(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml))" && exit 1) - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) artifacts: From 27b6cc22dbf4120d89a1bfee74b5f1bae1479502 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 17:51:42 +1100 Subject: [PATCH 18/27] No fun/multiline allowed. --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3e958b36c..804dab9d1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,8 +50,7 @@ after_build: - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\* test_script: - - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || ( -Powershell.exe -executionpolicy remotesigned -Command "(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml))" && exit 1) + - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || (Powershell.exe -executionpolicy remotesigned -Command "(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml))" && exit 1) - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) artifacts: From 61836080c53c64275098756ded69bd680cb23f3c Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 18:01:58 +1100 Subject: [PATCH 19/27] Quote escaping across nested batch and powershell hurts my brain. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 804dab9d1..6fa9a9a13 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,7 +50,7 @@ after_build: - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\* test_script: - - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || (Powershell.exe -executionpolicy remotesigned -Command "(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml))" && exit 1) + - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || (Powershell.exe -executionpolicy remotesigned -Command "(new-object net.webclient).UploadFile(`\"https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)`\", (Resolve-Path .\testout.xml))" && exit 1) - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) artifacts: From e60e396721fea1a42f030dacc6cba864a4656dae Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 18:42:56 +1100 Subject: [PATCH 20/27] Attempting to address failures with chained batch and powershell commands. --- appveyor.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6fa9a9a13..dee27d967 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,6 +21,9 @@ platform: configuration: Release +matrix: + fast_finish: true + install: - set PATH=C:\Ruby24-x64\bin;%PATH% - set CMAKE_DEFINES -DASSIMP_WERROR=ON @@ -50,7 +53,7 @@ after_build: - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\* test_script: - - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || (Powershell.exe -executionpolicy remotesigned -Command "(new-object net.webclient).UploadFile(`\"https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)`\", (Resolve-Path .\testout.xml))" && exit 1) + - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || (Powershell.exe -executionpolicy remotesigned -Command "& '(new-object net.webclient).UploadFile(\"https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)\", (Resolve-Path .\testout.xml))'" && exit 1) - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) artifacts: From d8e3952b64d4de3f0353fdb72c62a18b4c6cce10 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 18:57:35 +1100 Subject: [PATCH 21/27] Merging the test_script with test reporting was a terrible idea in retrospect. on_finish should serve the purpose. --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index dee27d967..f008b3cf2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,9 +53,11 @@ after_build: - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\* test_script: - - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml || (Powershell.exe -executionpolicy remotesigned -Command "& '(new-object net.webclient).UploadFile(\"https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)\", (Resolve-Path .\testout.xml))'" && exit 1) - - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) + - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml +on_finish: + - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml)) + artifacts: - path: assimp.7z name: assimp_lib From 3b4ffbc1b694af759b76ce6dda0187cf7a1dda56 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 8 Oct 2017 19:16:03 +1100 Subject: [PATCH 22/27] Test failures are now getting properly reported. Turning off 'fast finish' to allow all tests to execute. --- appveyor.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f008b3cf2..c343c0d21 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,9 +21,6 @@ platform: configuration: Release -matrix: - fast_finish: true - install: - set PATH=C:\Ruby24-x64\bin;%PATH% - set CMAKE_DEFINES -DASSIMP_WERROR=ON From b8ad03baa1f96b83357cc5f14de854cd0f079a0b Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Tue, 10 Oct 2017 19:45:57 +1100 Subject: [PATCH 23/27] Because I have to change a file somewhere to properly test the cache on AppVeyor, I've made some whitespace a bit better. --- code/LogAux.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/LogAux.h b/code/LogAux.h index 08b1b3c17..a46b9c6ad 100644 --- a/code/LogAux.h +++ b/code/LogAux.h @@ -60,34 +60,34 @@ public: // ------------------------------------------------------------------------------------------------ static void ThrowException(const std::string& msg) { - throw DeadlyImportError(Prefix()+msg); + throw DeadlyImportError(Prefix() + msg); } // ------------------------------------------------------------------------------------------------ static void LogWarn(const Formatter::format& message) { if (!DefaultLogger::isNullLogger()) { - DefaultLogger::get()->warn(Prefix() +(std::string)message); + DefaultLogger::get()->warn(Prefix() + (std::string)message); } } // ------------------------------------------------------------------------------------------------ static void LogError(const Formatter::format& message) { if (!DefaultLogger::isNullLogger()) { - DefaultLogger::get()->error(Prefix() +(std::string)message); + DefaultLogger::get()->error(Prefix() + (std::string)message); } } // ------------------------------------------------------------------------------------------------ static void LogInfo(const Formatter::format& message) { if (!DefaultLogger::isNullLogger()) { - DefaultLogger::get()->info(Prefix() +(std::string)message); + DefaultLogger::get()->info(Prefix() + (std::string)message); } } // ------------------------------------------------------------------------------------------------ static void LogDebug(const Formatter::format& message) { if (!DefaultLogger::isNullLogger()) { - DefaultLogger::get()->debug(Prefix() +(std::string)message); + DefaultLogger::get()->debug(Prefix() + (std::string)message); } } From bb173749c191412723c41870ba5c812124988e87 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Tue, 10 Oct 2017 20:11:21 +1100 Subject: [PATCH 24/27] Attempting to fix the directories being cached. --- appveyor.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c343c0d21..03b0ce73f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,9 @@ branches: only: - master +matrix: + fast_finish: true + image: - Visual Studio 2013 - Visual Studio 2015 @@ -31,12 +34,12 @@ install: - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" cache: - - assimp.dir\%CONFIGURATION% - - zlibstatic.dir\%CONFIGURATION% - - zlib.dir\%CONFIGURATION% - - assimp_cmd.dir\%CONFIGURATION% - - assimp_viewer.dir\%CONFIGURATION% - - unit.dir\%CONFIGURATION% + - bin\assimp.dir\%CONFIGURATION% + - bin\zlibstatic.dir\%CONFIGURATION% + - bin\zlib.dir\%CONFIGURATION% + - bin\assimp_cmd.dir\%CONFIGURATION% + - bin\assimp_viewer.dir\%CONFIGURATION% + - bin\unit.dir\%CONFIGURATION% - bin\.mtime_cache before_build: @@ -48,6 +51,9 @@ build: after_build: - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\* + - cmd: dir + - cmd: dir bin\ + - cmd: exit 1 test_script: - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml From dce2be9e09cd8fd14a763f64a345515fdea4800a Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Tue, 10 Oct 2017 21:24:40 +1100 Subject: [PATCH 25/27] I think I've worked out where the obj's are located. We shall see if the cache picks them up. --- appveyor.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 03b0ce73f..1b87286f6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,12 +34,12 @@ install: - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" cache: - - bin\assimp.dir\%CONFIGURATION% - - bin\zlibstatic.dir\%CONFIGURATION% - - bin\zlib.dir\%CONFIGURATION% - - bin\assimp_cmd.dir\%CONFIGURATION% - - bin\assimp_viewer.dir\%CONFIGURATION% - - bin\unit.dir\%CONFIGURATION% + - code\assimp.dir\%CONFIGURATION% + - contrib\zlib\zlibstatic.dir\%CONFIGURATION% + - contrib\zlib\zlib.dir\%CONFIGURATION% + - tools\assimp_cmd\assimp_cmd.dir\%CONFIGURATION% + - tools\assimp_view\assimp_viewer.dir\%CONFIGURATION% + - test\unit.dir\%CONFIGURATION% - bin\.mtime_cache before_build: @@ -51,9 +51,6 @@ build: after_build: - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\* - - cmd: dir - - cmd: dir bin\ - - cmd: exit 1 test_script: - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml From 1497cc27b2769efe0e74a5c0e206a2a32fb43c58 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Tue, 10 Oct 2017 22:08:13 +1100 Subject: [PATCH 26/27] Cleaned up the whitespace again. Let's see how the cache does. --- code/LogAux.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/LogAux.h b/code/LogAux.h index a46b9c6ad..f2bc14d54 100644 --- a/code/LogAux.h +++ b/code/LogAux.h @@ -60,34 +60,34 @@ public: // ------------------------------------------------------------------------------------------------ static void ThrowException(const std::string& msg) { - throw DeadlyImportError(Prefix() + msg); + throw DeadlyImportError(Prefix()+msg); } // ------------------------------------------------------------------------------------------------ static void LogWarn(const Formatter::format& message) { if (!DefaultLogger::isNullLogger()) { - DefaultLogger::get()->warn(Prefix() + (std::string)message); + DefaultLogger::get()->warn(Prefix()+(std::string)message); } } // ------------------------------------------------------------------------------------------------ static void LogError(const Formatter::format& message) { if (!DefaultLogger::isNullLogger()) { - DefaultLogger::get()->error(Prefix() + (std::string)message); + DefaultLogger::get()->error(Prefix()+(std::string)message); } } // ------------------------------------------------------------------------------------------------ static void LogInfo(const Formatter::format& message) { if (!DefaultLogger::isNullLogger()) { - DefaultLogger::get()->info(Prefix() + (std::string)message); + DefaultLogger::get()->info(Prefix()+(std::string)message); } } // ------------------------------------------------------------------------------------------------ static void LogDebug(const Formatter::format& message) { if (!DefaultLogger::isNullLogger()) { - DefaultLogger::get()->debug(Prefix() + (std::string)message); + DefaultLogger::get()->debug(Prefix()+(std::string)message); } } From fa91a0f64c16f9f2afcf6b631302bf918527e2f7 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Tue, 10 Oct 2017 22:45:45 +1100 Subject: [PATCH 27/27] Another minor source change, this time even more minor than the last. Let's see what the cache can do with this. --- code/PretransformVertices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/PretransformVertices.cpp b/code/PretransformVertices.cpp index 5fc294618..0751c4556 100644 --- a/code/PretransformVertices.cpp +++ b/code/PretransformVertices.cpp @@ -104,7 +104,7 @@ unsigned int PretransformVertices::CountNodes( aiNode* pcNode ) // ------------------------------------------------------------------------------------------------ // Get a bitwise combination identifying the vertex format of a mesh -unsigned int PretransformVertices::GetMeshVFormat(aiMesh* pcMesh) +unsigned int PretransformVertices::GetMeshVFormat( aiMesh* pcMesh ) { // the vertex format is stored in aiMesh::mBones for later retrieval. // there isn't a good reason to compute it a few hundred times