forked from imazen/imageflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
90 lines (84 loc) · 3.09 KB
/
appveyor.yml
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
87
88
89
build: false
environment:
PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "32"
RUST_BACKTRACE: 1
OPENSSL_INCLUDE_DIR: C:\OpenSSL\include
OPENSSL_LIB_DIR: C:\OpenSSL\lib
OPENSSL_LIBS: ssleay32:libeay32
configuration: Release
platform:
- x64
- x86
#We install nasm in case libjpeg-turbo has to be built from source
install:
- if "%PLATFORM%"=="x86" SET RUST_TARGET=i686-pc-windows-msvc
- if "%PLATFORM%"=="x64" SET RUST_TARGET=x86_64-pc-windows-msvc
- if "%PLATFORM%"=="x86" SET BITS=32
- if "%PLATFORM%"=="x64" SET BITS=64
- curl -L -o openssl.exe "https://s3-us-west-2.amazonaws.com/imageflow-resources/tools/Win%BITS%OpenSSL-1_0_2j.exe"
- openssl.exe /SILENT /VERYSILENT /SP- /DIR="C:\OpenSSL"
- SET RUST_ARTIFACT=2016-09-01/rust-nightly-%RUST_TARGET%.exe
- curl -L -o nasminst.exe http://libgd.blob.core.windows.net/nasm/nasm-2.07-installer.exe
- start /wait nasminst.exe /S
- echo Fetching https://static.rust-lang.org/dist/%RUST_ARTIFACT%
- curl -L -o install_rust.exe https://static.rust-lang.org/dist/%RUST_ARTIFACT%
- install_rust.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
- set PATH=%PATH%;%PYTHON%/Scripts/;C:\Program Files (x86)\nasm;C:\Program Files (x86)\Rust\bin
- pip.exe install conan
- conan user # It creates the conan data directory
test_script:
- echo %PATH%
- conan --version
- cmake --version
- rustc -V
- cargo -V
- nasm -v
- mkdir build
- cd build
- if "%PLATFORM%"=="x86" set CONAN_ARCH=x86
- if "%PLATFORM%"=="x64" set CONAN_ARCH=x86_64
- SET PATH=%PATH%;C:\MinGW\bin
- conan install --scope build_tests=True -o shared=True --build missing -s build_type=Release -s arch=%CONAN_ARCH% -u ../
- conan build ../
- cd ..
- conan export imazen/testing
- cd imageflow_core
- conan install --build missing -s build_type=Release -s arch=%CONAN_ARCH%
- cargo test
- cargo build --target=%RUST_TARGET% --release
- cargo doc --no-deps
- cd ..
- cd imageflow_server
- cargo test
- cargo build --target=%RUST_TARGET% --release
- cargo doc --no-deps
- cd ..
- cd imageflow_tool
- cargo test
- cargo build --target=%RUST_TARGET% --release
- cargo doc --no-deps
- cd ..
- cd imageflow_cdylib
- cargo test
- cargo build --target=%RUST_TARGET% --release
- cargo doc --no-deps
- cd ..
- mkdir artifacts
- mkdir artifacts\staging
- mkdir artifacts\staging\doc
- dir target\%RUST_TARGET%\release\
- xcopy /Y target\%RUST_TARGET%\release\flow-proto1.exe artifacts\staging\
- xcopy /Y target\%RUST_TARGET%\release\imageflow_server.exe artifacts\staging\
- xcopy /Y target\%RUST_TARGET%\release\imageflowrs.dll artifacts\staging\
- xcopy /Y target\%RUST_TARGET%\release\imageflow_tool.exe artifacts\staging\
- xcopy /Y /E target\doc artifacts\staging\doc
- cd artifacts\staging
- set ARTIFACT_NAME="imageflow-%APPVEYOR_REPO_BRANCH%-appveyorjob-%APPVEYOR_BUILD_NUMBER%-%APPVEYOR_REPO_COMMIT%-%PLATFORM%.zip"
- 7z a -r "..\..\%ARTIFACT_NAME%.zip" *
- cd ..\..
- appveyor PushArtifact "%ARTIFACT_NAME%.zip"
artifacts:
- path: 'artifacts/*'
name: Rust binaries