127b27ec6Sopenharmony_civersion: 1.0.{build}
227b27ec6Sopenharmony_cienvironment:
327b27ec6Sopenharmony_ci  matrix:
427b27ec6Sopenharmony_ci  - COMPILER: "gcc"
527b27ec6Sopenharmony_ci    PLATFORM: "mingw64"
627b27ec6Sopenharmony_ci  - COMPILER: "gcc"
727b27ec6Sopenharmony_ci    PLATFORM: "mingw32"
827b27ec6Sopenharmony_ci  - COMPILER: "visual"
927b27ec6Sopenharmony_ci    CONFIGURATION: "Debug"
1027b27ec6Sopenharmony_ci    PLATFORM: "x64"
1127b27ec6Sopenharmony_ci  - COMPILER: "visual"
1227b27ec6Sopenharmony_ci    CONFIGURATION: "Debug"
1327b27ec6Sopenharmony_ci    PLATFORM: "Win32"
1427b27ec6Sopenharmony_ci  - COMPILER: "visual"
1527b27ec6Sopenharmony_ci    CONFIGURATION: "Release"
1627b27ec6Sopenharmony_ci    PLATFORM: "x64"
1727b27ec6Sopenharmony_ci  - COMPILER: "visual"
1827b27ec6Sopenharmony_ci    CONFIGURATION: "Release"
1927b27ec6Sopenharmony_ci    PLATFORM: "Win32"
2027b27ec6Sopenharmony_ci  - COMPILER: "gcc"
2127b27ec6Sopenharmony_ci    PLATFORM: "clang"
2227b27ec6Sopenharmony_ci
2327b27ec6Sopenharmony_ciinstall:
2427b27ec6Sopenharmony_ci  - ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
2527b27ec6Sopenharmony_ci  - MKDIR bin
2627b27ec6Sopenharmony_ci  - if [%COMPILER%]==[gcc] SET PATH_ORIGINAL=%PATH%
2727b27ec6Sopenharmony_ci  - if [%COMPILER%]==[gcc] (
2827b27ec6Sopenharmony_ci      SET "PATH_MINGW32=c:\MinGW\bin;c:\MinGW\usr\bin" &&
2927b27ec6Sopenharmony_ci      SET "PATH_MINGW64=c:\msys64\mingw64\bin;c:\msys64\usr\bin" &&
3027b27ec6Sopenharmony_ci      COPY C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe &&
3127b27ec6Sopenharmony_ci      COPY C:\MinGW\bin\gcc.exe C:\MinGW\bin\cc.exe
3227b27ec6Sopenharmony_ci    ) else (
3327b27ec6Sopenharmony_ci      IF [%PLATFORM%]==[x64] (SET ADDITIONALPARAM=/p:LibraryPath="C:\Program Files\Microsoft SDKs\Windows\v7.1\lib\x64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\lib\amd64;")
3427b27ec6Sopenharmony_ci    )
3527b27ec6Sopenharmony_ci
3627b27ec6Sopenharmony_cibuild_script:
3727b27ec6Sopenharmony_ci  - if [%PLATFORM%]==[mingw32] SET PATH=%PATH_MINGW32%;%PATH_ORIGINAL%
3827b27ec6Sopenharmony_ci  - if [%PLATFORM%]==[mingw64] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL%
3927b27ec6Sopenharmony_ci  - if [%PLATFORM%]==[clang] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL%
4027b27ec6Sopenharmony_ci  - ECHO *** &&
4127b27ec6Sopenharmony_ci      ECHO Building %COMPILER% %PLATFORM% %CONFIGURATION% &&
4227b27ec6Sopenharmony_ci      ECHO ***
4327b27ec6Sopenharmony_ci  - if [%PLATFORM%]==[clang] (clang -v)
4427b27ec6Sopenharmony_ci  - if [%COMPILER%]==[gcc] (gcc -v)
4527b27ec6Sopenharmony_ci  - if [%COMPILER%]==[gcc] (
4627b27ec6Sopenharmony_ci      echo ----- &&
4727b27ec6Sopenharmony_ci      make -v &&
4827b27ec6Sopenharmony_ci      echo ----- &&
4927b27ec6Sopenharmony_ci      if not [%PLATFORM%]==[clang] (
5027b27ec6Sopenharmony_ci        make -C programs lz4 &&
5127b27ec6Sopenharmony_ci        make -C tests fullbench &&
5227b27ec6Sopenharmony_ci        make -C tests fuzzer &&
5327b27ec6Sopenharmony_ci        make -C lib lib V=1
5427b27ec6Sopenharmony_ci      ) ELSE (
5527b27ec6Sopenharmony_ci        make -C programs lz4 CC=clang MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion" &&
5627b27ec6Sopenharmony_ci        make -C tests fullbench CC=clang MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion" &&
5727b27ec6Sopenharmony_ci        make -C tests fuzzer CC=clang MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion" &&
5827b27ec6Sopenharmony_ci        make -C lib lib CC=clang MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion"
5927b27ec6Sopenharmony_ci      )
6027b27ec6Sopenharmony_ci    )
6127b27ec6Sopenharmony_ci  - if [%COMPILER%]==[gcc] if not [%PLATFORM%]==[clang] (
6227b27ec6Sopenharmony_ci      MKDIR bin\dll bin\static bin\example bin\include &&
6327b27ec6Sopenharmony_ci      COPY tests\fullbench.c bin\example\ &&
6427b27ec6Sopenharmony_ci      COPY lib\xxhash.c bin\example\ &&
6527b27ec6Sopenharmony_ci      COPY lib\xxhash.h bin\example\ &&
6627b27ec6Sopenharmony_ci      COPY lib\lz4.h bin\include\ &&
6727b27ec6Sopenharmony_ci      COPY lib\lz4hc.h bin\include\ &&
6827b27ec6Sopenharmony_ci      COPY lib\lz4frame.h bin\include\ &&
6927b27ec6Sopenharmony_ci      COPY lib\liblz4.a bin\static\liblz4_static.lib &&
7027b27ec6Sopenharmony_ci      COPY lib\dll\* bin\dll\ &&
7127b27ec6Sopenharmony_ci      COPY lib\dll\example\Makefile bin\example\ &&
7227b27ec6Sopenharmony_ci      COPY lib\dll\example\fullbench-dll.* bin\example\ &&
7327b27ec6Sopenharmony_ci      COPY lib\dll\example\README.md bin\ &&
7427b27ec6Sopenharmony_ci      COPY programs\lz4.exe bin\lz4.exe
7527b27ec6Sopenharmony_ci    )
7627b27ec6Sopenharmony_ci  - if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw64] (
7727b27ec6Sopenharmony_ci      7z.exe a -bb1 bin\lz4_x64.zip NEWS .\bin\lz4.exe .\bin\README.md .\bin\example .\bin\dll .\bin\static .\bin\include &&
7827b27ec6Sopenharmony_ci      appveyor PushArtifact bin\lz4_x64.zip
7927b27ec6Sopenharmony_ci    )
8027b27ec6Sopenharmony_ci  - if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw32] (
8127b27ec6Sopenharmony_ci      7z.exe a -bb1 bin\lz4_x86.zip NEWS .\bin\lz4.exe .\bin\README.md .\bin\example .\bin\dll .\bin\static .\bin\include &&
8227b27ec6Sopenharmony_ci      appveyor PushArtifact bin\lz4_x86.zip
8327b27ec6Sopenharmony_ci    )
8427b27ec6Sopenharmony_ci  - if [%COMPILER%]==[gcc] (COPY tests\*.exe programs\)
8527b27ec6Sopenharmony_ci  - if [%COMPILER%]==[visual] (
8627b27ec6Sopenharmony_ci      ECHO *** &&
8727b27ec6Sopenharmony_ci      ECHO *** Building Visual Studio 2010 %PLATFORM%\%CONFIGURATION% &&
8827b27ec6Sopenharmony_ci      ECHO *** &&
8927b27ec6Sopenharmony_ci      msbuild "build\VS2010\lz4.sln" %ADDITIONALPARAM% /m /verbosity:minimal /property:PlatformToolset=v100 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /p:EnableWholeProgramOptimization=true /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
9027b27ec6Sopenharmony_ci      ECHO *** &&
9127b27ec6Sopenharmony_ci      ECHO *** Building Visual Studio 2012 %PLATFORM%\%CONFIGURATION% &&
9227b27ec6Sopenharmony_ci      ECHO *** &&
9327b27ec6Sopenharmony_ci      msbuild "build\VS2010\lz4.sln" /m /verbosity:minimal /property:PlatformToolset=v110 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
9427b27ec6Sopenharmony_ci      ECHO *** &&
9527b27ec6Sopenharmony_ci      ECHO *** Building Visual Studio 2013 %PLATFORM%\%CONFIGURATION% &&
9627b27ec6Sopenharmony_ci      ECHO *** &&
9727b27ec6Sopenharmony_ci      msbuild "build\VS2010\lz4.sln" /m /verbosity:minimal /property:PlatformToolset=v120 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
9827b27ec6Sopenharmony_ci      ECHO *** &&
9927b27ec6Sopenharmony_ci      ECHO *** Building Visual Studio 2015 %PLATFORM%\%CONFIGURATION% &&
10027b27ec6Sopenharmony_ci      ECHO *** &&
10127b27ec6Sopenharmony_ci      msbuild "build\VS2010\lz4.sln" /m /verbosity:minimal /property:PlatformToolset=v140 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
10227b27ec6Sopenharmony_ci      COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe programs\
10327b27ec6Sopenharmony_ci    )
10427b27ec6Sopenharmony_ci
10527b27ec6Sopenharmony_citest_script:
10627b27ec6Sopenharmony_ci  - ECHO *** &&
10727b27ec6Sopenharmony_ci      ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION% &&
10827b27ec6Sopenharmony_ci      ECHO ***
10927b27ec6Sopenharmony_ci  - if not [%COMPILER%]==[unknown] (
11027b27ec6Sopenharmony_ci      CD programs &&
11127b27ec6Sopenharmony_ci      lz4 -h &&
11227b27ec6Sopenharmony_ci      lz4 -i1b lz4.exe &&
11327b27ec6Sopenharmony_ci      lz4 -i1b5 lz4.exe &&
11427b27ec6Sopenharmony_ci      lz4 -i1b10 lz4.exe &&
11527b27ec6Sopenharmony_ci      lz4 -i1b15 lz4.exe &&
11627b27ec6Sopenharmony_ci      echo ------- lz4 tested ------- &&
11727b27ec6Sopenharmony_ci      fullbench.exe -i1 fullbench.exe &&
11827b27ec6Sopenharmony_ci      echo trying to launch fuzzer.exe &&
11927b27ec6Sopenharmony_ci      fuzzer.exe -v -T30s
12027b27ec6Sopenharmony_ci    )
12127b27ec6Sopenharmony_ci
12227b27ec6Sopenharmony_ciartifacts:
12327b27ec6Sopenharmony_ci  - path: bin\lz4_x64.zip
12427b27ec6Sopenharmony_ci  - path: bin\lz4_x86.zip
12527b27ec6Sopenharmony_ci
12627b27ec6Sopenharmony_cideploy:
12727b27ec6Sopenharmony_ci- provider: GitHub
12827b27ec6Sopenharmony_ci  artifact: bin\lz4_x64.zip
12927b27ec6Sopenharmony_ci  auth_token:
13027b27ec6Sopenharmony_ci    secure: w6UJaGie0qbZvffr/fqyhO/Vj8rMiQWnv9a8qm3gxfngdHDTMT42wYupqJpIExId
13127b27ec6Sopenharmony_ci  force_update: true
13227b27ec6Sopenharmony_ci  prerelease: true
13327b27ec6Sopenharmony_ci  on:
13427b27ec6Sopenharmony_ci    COMPILER: gcc
13527b27ec6Sopenharmony_ci    PLATFORM: "mingw64"
13627b27ec6Sopenharmony_ci    appveyor_repo_tag: true
13727b27ec6Sopenharmony_ci
13827b27ec6Sopenharmony_ci- provider: GitHub
13927b27ec6Sopenharmony_ci  artifact: bin\lz4_x86.zip
14027b27ec6Sopenharmony_ci  auth_token:
14127b27ec6Sopenharmony_ci    secure: w6UJaGie0qbZvffr/fqyhO/Vj8rMiQWnv9a8qm3gxfngdHDTMT42wYupqJpIExId
14227b27ec6Sopenharmony_ci  force_update: true
14327b27ec6Sopenharmony_ci  prerelease: true
14427b27ec6Sopenharmony_ci  on:
14527b27ec6Sopenharmony_ci    COMPILER: gcc
14627b27ec6Sopenharmony_ci    PLATFORM: "mingw32"
14727b27ec6Sopenharmony_ci    appveyor_repo_tag: true
148