diff --git a/appveyor.yml b/appveyor.yml index 9947ff0a..2b292c06 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -85,3 +85,41 @@ test_script: & codecov --no-color -X gcov -F integrationtests -e PYTHON_INSTALL if ($testsExitCode -ne 0) {exit $testsExitCode} + +on_success: + # Creates executable with PyInstaller + - pip install pyinstaller + - pyinstaller clcache.py + - for /F %%i in ('python -c "import clcache; print(clcache.VERSION)"') do set CLCACHE_VERSION=%%i + - "echo Version: %CLCACHE_VERSION" + - move dist\clcache clcache-%CLCACHE_VERSION% + + # Build the Chocolatey package + - sed -i "s/{VERSION}/%CLCACHE_VERSION%/g" clcache.nuspec + - choco pack + + # Test the compiled extension + - cd clcache-%CLCACHE_VERSION% + - clcache.exe --help + - clcache.exe -s + - cd .. + + # Test the chocolatey package + - ps: ls clcache.${env:CLCACHE_VERSION}.nupkg + - choco install "clcache.%CLCACHE_VERSION%.nupkg" --version=%CLCACHE_VERSION% + - C:\ProgramData\chocolatey\bin\clcache.exe --help + - C:\ProgramData\chocolatey\bin\clcache.exe -s + + # Publish artifacts + - cd clcache-%CLCACHE_VERSION% + - 7z a -y clcache-%CLCACHE_VERSION%.zip + - move clcache-%CLCACHE_VERSION%.zip .. + - cd .. + - echo PYTHON_INSTALL=%PYTHON_INSTALL% + # Disable for Python 3.5, because of PyInstaller problems on older Windows + - if not [%PYTHON_INSTALL%]==["C:\Python35"] set PUBLISH=1 + - sha256sum clcache.%CLCACHE_VERSION%.nupkg clcache-%CLCACHE_VERSION%.zip + - sha256sum clcache.%CLCACHE_VERSION%.nupkg clcache-%CLCACHE_VERSION%.zip > SHA256SUM + - if "%PUBLISH%"=="1" appveyor PushArtifact clcache.%CLCACHE_VERSION%.nupkg + - if "%PUBLISH%"=="1" appveyor PushArtifact clcache-%CLCACHE_VERSION%.zip + - if "%PUBLISH%"=="1" appveyor PushArtifact SHA256SUM diff --git a/clcache.nuspec b/clcache.nuspec new file mode 100644 index 00000000..72c402a4 --- /dev/null +++ b/clcache.nuspec @@ -0,0 +1,32 @@ + + + + + clcache + clcache + {VERSION} + Frerich Raabe + frerich,tadeu + Compiler cache for Microsoft Visual Studio + +A little Python script which attempts to avoid unnecessary recompilation by reusing previously cached object files if possible. It is meant to be called instead of the original 'cl.exe' executable. The script analyses the command line to decide whether source code is to be compiled. If so, a cache will be queried for a previously stored object file. + +This package contains an executable generated by `pyinstaller`, and is meant to facilitate the usage of `clcache.py` in a portable way. It is specially useful when needing to use `clcache.py` in environments with Python 2, since newer versions of `clcache.py` supports only Python 3.3+. + + https://github.com/frerich/clcache + https://github.com/frerich/clcache + https://github.com/frerich/clcache + clcache clcache.py ccache compiler + +Copyright (c) + 2010, 2011, 2012, 2013, 2016 froglogic GmbH + 2016 Simon Warta (Kullo GmbH) + 2016 Tim Blechmann + + https://github.com/frerich/clcache/blob/master/LICENSE + false + + + + + \ No newline at end of file