forked from lz4/lz4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
86 lines (78 loc) · 2.92 KB
/
appveyor.yml
File metadata and controls
86 lines (78 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: 1.0.{build}
# Test matrix: MinGW compilers only (Visual Studio testing moved to GitHub Actions)
environment:
matrix:
- COMPILER: gcc
PLATFORM: mingw32
- COMPILER: gcc
PLATFORM: mingw64
- COMPILER: clang
PLATFORM: mingw64
install:
- echo Installing %COMPILER% %PLATFORM%
- mkdir bin
# Setup MinGW environment
- set "PATH_MINGW32=c:\MinGW\bin;c:\MinGW\usr\bin"
- set "PATH_MINGW64=c:\msys64\mingw64\bin;c:\msys64\usr\bin"
- copy C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe >nul 2>&1
- copy C:\MinGW\bin\gcc.exe C:\MinGW\bin\cc.exe >nul 2>&1
build_script:
- echo "*** Building %COMPILER% %PLATFORM% ***"
# Configure PATH for MinGW builds
- if [%PLATFORM%]==[mingw32] set PATH=%PATH_MINGW32%;%PATH%
- if [%PLATFORM%]==[mingw64] set PATH=%PATH_MINGW64%;%PATH%
# GCC Build
- if [%COMPILER%]==[gcc] (
echo "GCC build started" &&
gcc -v &&
make -v &&
make -j -C programs lz4 V=1 &&
make -j -C tests fullbench V=1 &&
make -j -C tests fuzzer V=1 &&
make -j -C lib lib V=1 &&
echo "Packaging GCC build..." &&
mkdir bin\dll bin\static bin\example bin\include &&
copy tests\fullbench.c bin\example\ &&
copy lib\xxhash.* bin\example\ &&
copy lib\lz4*.h bin\include\ &&
copy lib\liblz4.a bin\static\liblz4_static.lib &&
copy lib\liblz4.dll* bin\dll\ >nul 2>&1 &&
copy lib\dll\example\* bin\example\ >nul 2>&1 &&
copy programs\lz4.exe bin\lz4.exe &&
copy tests\*.exe programs\
)
# Clang Build
- if [%COMPILER%]==[clang] (
echo "Clang build started" &&
clang -v &&
make -v &&
set "CFLAGS=--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion" &&
make -j -C programs lz4 CC=clang V=1 &&
make -j -C tests fullbench CC=clang V=1 &&
make -j -C tests fuzzer CC=clang V=1 &&
make -j -C lib lib CC=clang V=1 &&
copy tests\*.exe programs\
)
# Create release archives (GCC only)
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw64] 7z.exe a -bb1 bin\lz4_x64.zip NEWS .\bin\lz4.exe README.md .\bin\example .\bin\dll .\bin\static .\bin\include
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw64] appveyor PushArtifact bin\lz4_x64.zip
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw32] 7z.exe a -bb1 bin\lz4_x86.zip NEWS .\bin\lz4.exe README.md .\bin\example .\bin\dll .\bin\static .\bin\include
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw32] appveyor PushArtifact bin\lz4_x86.zip
test_script:
- echo "*** Testing %COMPILER% %PLATFORM% ***"
- cd programs
- lz4 -h
- lz4 -i1b lz4.exe
- lz4 -i1b5 lz4.exe
- lz4 -i1b10 lz4.exe
- lz4 -i1b15 lz4.exe
- echo "------- lz4 tested -------"
- fullbench.exe -i0 fullbench.exe
- echo "Launching fuzzer test..."
- fuzzer.exe -v -T20s
- cd ..
artifacts:
- path: bin\lz4_x64.zip
name: LZ4 Windows x64 Build
- path: bin\lz4_x86.zip
name: LZ4 Windows x86 Build