-
Notifications
You must be signed in to change notification settings - Fork 6
/
.appveyor.yml
94 lines (74 loc) · 3.81 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
90
91
92
93
94
configuration:
- "Release (DLL)"
environment:
BINTRAY_USER:
secure: 9iEGe4JL2hgRpnU8mx5QcQ==
BINTRAY_APIKEY:
secure: 0yKkRlEu2OuIJL/qSCNUjXWDN1LY9yBCufFy1X2h8RPv8JEwGOfhoN3rjziYhMFT
before_build:
### INSTALLING DEPENDENCIES ###
- cmd: cd scripts\windows\
- cmd: install_msvc_dependencies.bat
- cmd: cd ..\..\
test_script:
### RUN UNIT TESTS ###
- cmd: cd scripts\windows\
- cmd: run_unit_tests.bat
- cmd: cd ..\..\
before_deploy:
### BUILDING EXTRA CONFIGURATIONS TO DEPLOY ###
- cmd: MSBuild "project\msvc\GLUL\GLUL.vcxproj" /p:Configuration="Debug"
- cmd: MSBuild "project\msvc\GLUL\GLUL.vcxproj" /p:Configuration="Release"
- cmd: MSBuild "project\msvc\GLUL\GLUL.vcxproj" /p:Configuration="Debug (DLL)"
- cmd: MSBuild "project\msvc\GLUL\GLUL.vcxproj" /p:Configuration="Release (DLL)"
deploy_script:
### DEPLOYING ###
- cmd: echo "#####################"
- cmd: echo "### DEPLOYING ###"
- cmd: echo "#####################"
# Directories & variables
- cmd: set DEPLOY_NAME=GLUL-msvc-win32-%APPVEYOR_REPO_BRANCH%.latest
- cmd: if [%APPVEYOR_REPO_TAG%]==[true] set DEPLOY_NAME=GLUL-%APPVEYOR_REPO_TAG_NAME%-msvc-win32 # If this build is for tagged commit, deploy only tag package
- cmd: set DEPLOY_NAME_FILE=%DEPLOY_NAME%.7z
- cmd: set DEPLOY_DIR_1=deploy
- cmd: set DEPLOY_DIR_2=%DEPLOY_DIR_1%\windows
- cmd: set DEPLOY_DIR_FULL=%DEPLOY_DIR_2%\%DEPLOY_NAME%
# Create directory and clone clean repository
- cmd: git clone --depth 1 --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME% "%DEPLOY_DIR_FULL%"
# Copy necessary folders and files
- cmd: XCOPY /E /Y bin "%DEPLOY_DIR_FULL%\bin"
- cmd: XCOPY /E /Y examples "%DEPLOY_DIR_FULL%\examples"
- cmd: XCOPY /E /Y tests "%DEPLOY_DIR_FULL%\tests"
# Remove unnecessary folders and files
- cmd: RMDIR /S /Q "%DEPLOY_DIR_FULL%\.git" # REMOVE GIT REPO
- cmd: DEL /Q "%DEPLOY_DIR_FULL%\.gitignore" # REMOVE .gitignore
- cmd: DEL /Q "%DEPLOY_DIR_FULL%\*.yml" # REMOVE all .yml files (Travis, AppVeyor etc.)
- cmd: DEL /Q "%DEPLOY_DIR_FULL%\*.json" # REMOVE all .json files (Bintray etc.)
- cmd: DEL /Q /S "%DEPLOY_DIR_FULL%\bin\*.exp" # REMOVE all .exp files from bin
- cmd: DEL /Q /S "%DEPLOY_DIR_FULL%\*.ilk" # REMOVE all .exp files from examples and tests
- cmd: DEL /Q /S "%DEPLOY_DIR_FULL%\*.pdb" # REMOVE all .exp files from examples and tests
- cmd: DEL /Q /S "%DEPLOY_DIR_FULL%\examples\*.dll" # REMOVE all .dll files from examples (copies of library's dll)
- cmd: DEL /Q /S "%DEPLOY_DIR_FULL%\tests\*.dll" # REMOVE all .dll files from tests (copy of library's dll)
# Add build info
- cmd: echo "Build id - %APPVEYOR_BUILD_ID% (#%APPVEYOR_BUILD_NUMBER%)" > "%DEPLOY_DIR_FULL%\BuildInfo.txt"
- cmd: echo "Branch - %APPVEYOR_REPO_BRANCH%" >> "%DEPLOY_DIR_FULL%\BuildInfo.txt"
- cmd: echo "Date of build - " >> "%DEPLOY_DIR_FULL%\BuildInfo.txt"
- cmd: DATE /T >> "%DEPLOY_DIR_FULL%\BuildInfo.txt"
- cmd: TIME /T >> "%DEPLOY_DIR_FULL%\BuildInfo.txt"
# Go to deploy directory
- cmd: cd "%DEPLOY_DIR_2%"
# Create package to upload
- cmd: 7z a -t7z -r -m0=LZMA2 -mx=9 "%DEPLOY_NAME_FILE%" ./*
- cmd: echo "Package %DEPLOY_NAME% created..."
- cmd: dir
# Deploy variables
- cmd: set BINTRAY_REPO=generic
- cmd: set BINTRAY_PACKAGE=GLUL
- cmd: set BINTRAY_VERSION=0.3
- cmd: set BINTRAY_PATH=%BINTRAY_USER%/%BINTRAY_REPO%/%BINTRAY_PACKAGE%/%BINTRAY_VERSION%
- cmd: set BINTRAY_PATH_FULL=%BINTRAY_PATH%/windows/%DEPLOY_NAME_FILE%
# Deploy package
- cmd: curl -fS -u "%BINTRAY_USER%:%BINTRAY_APIKEY%" -T "%DEPLOY_NAME_FILE%" -X PUT "https://api.bintray.com/content/%BINTRAY_PATH_FULL%?override=1&publish=1"
- cmd: echo "Deployed package!"
# Return to build directory and finish deploying
- cmd: cd "%APPVEYOR_BUILD_FOLDER%"