forked from mrichards42/xword
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
126 lines (104 loc) · 4.18 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
version: '{build}'
test: off
image:
- Visual Studio 2015
- macOS
configuration:
- Debug
- Release
environment:
WX_VERSION: 3.1.5
LUAJIT_VERSION: 2.0.5
for:
-
# Windows
matrix:
only:
- image: Visual Studio 2015
environment:
CURL_VERSION: 7.69.0
PYTHON: "C:\\Python38"
install:
# For tagged builds, use the tag name as the version.
# Otherwise, read the version from the VERSION file.
- IF "%APPVEYOR_REPO_TAG%"=="true" (SET XWORD_VERSION=%APPVEYOR_REPO_TAG_NAME%) ELSE (SET /P XWORD_VERSION=< VERSION)
# Build and install markdown
- SET PATH=%PYTHON%;%PATH%
- IF %CONFIGURATION%==Release python -m pip install markdown
- call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
# Build curl
- bash build-curl.sh %CURL_VERSION%
# Build LuaJIT
- bash build-luajit.sh %LUAJIT_VERSION%
# Build wxWidgets, with our custom tweaks patch
- bash build-wxwidgets.sh %WX_VERSION% %CONFIGURATION%
# Cache the compiled libraries so they can be used with future builds
cache:
- '%USERPROFILE%\wxWidgets-%WX_VERSION%'
- '%USERPROFILE%\curl-%CURL_VERSION%'
- '%USERPROFILE%\LuaJIT-%LUAJIT_VERSION%'
# Run premake to create the Visual Studio project
before_build:
- premake5.exe --wx-prefix="%USERPROFILE%/wxWidgets-%WX_VERSION%" vs2013
# Build XWord
build_script:
- msbuild build/vs2013/XWord.sln /p:Configuration=%CONFIGURATION%
# For release builds, also build docs and run dist steps.
- IF %CONFIGURATION%==Release pushd doc & make_help.cmd & popd
- IF %CONFIGURATION%==Release pushd dist & python gen_nsis.py > scripts.nsi & "%ProgramFiles(x86)%\NSIS\makensis.exe" /V4 XWord.nsi & popd
- IF %CONFIGURATION%==Release sed -e "s/{VERSION}/%XWORD_VERSION%/" -e "s/{OS_FILE}/XWord-Windows.exe/" dist/packages_template.lua > dist/packages_windows.lua
# Zip the full build folder and make it available as an artifact.
after_build:
- 7z a bin\%CONFIGURATION%\XWord-Windows.zip "%APPVEYOR_BUILD_FOLDER%\bin\%CONFIGURATION%\*" -r -x!*.exp -x!*.lib -x!*.pdb -x!*.idb -x!*.ilk -x!*.fbp
artifacts:
- path: bin\%CONFIGURATION%\XWord-Windows.zip
name: XWord-Windows.zip
- path: dist\XWord-Windows.exe
name: XWord-Windows.exe
- path: dist\packages_windows.lua
name: packages_windows.lua
-
# Mac
matrix:
only:
- image: macOS
install:
# For tagged builds, use the tag name as the version.
# Otherwise, read the version from the VERSION file.
- if [ "$APPVEYOR_REPO_TAG" == "true" ]; then export XWORD_VERSION=$APPVEYOR_REPO_TAG_NAME; else export XWORD_VERSION=$(cat VERSION); fi
# Build LuaJIT
- bash build-luajit.sh $LUAJIT_VERSION
# Build and install wxWidgets, with our custom tweaks patch
- ./build-wxwidgets.sh $WX_VERSION $CONFIGURATION
# Cache the compiled libraries so they can be used with future builds
cache:
- $HOME/wxWidgets-$WX_VERSION
- $HOME/LuaJIT-$LUAJIT_VERSION
# Run premake to create the Xcode project
before_build:
- ./premake5 --wx-config-debug=$HOME/wxWidgets-$WX_VERSION/bin/wx-config --wx-config-release=$HOME/wxWidgets-$WX_VERSION/bin/wx-config xcode4
# Build XWord
build_script:
- sudo xcode-select -s /Applications/Xcode-13.4.1.app
- xcodebuild -project build/xcode4/XWord.xcodeproj -configuration "$CONFIGURATION" build
- if [ "$CONFIGURATION" == "Release" ]; then sed -e "s/{VERSION}/${XWORD_VERSION}/" -e "s/{OS_FILE}/XWord-macOS.zip/" dist/packages_template.lua > dist/packages_mac.lua; fi
# Zip the full build folder and make it available as an artifact.
after_build:
- pushd bin/$CONFIGURATION
- zip -r XWord-macOS.zip XWord.app/ -x *.fbp -x "*/scripts/_*" -x "*/scripts/*debug*"
- popd
artifacts:
- path: bin/$CONFIGURATION/XWord-macOS.zip
name: XWord-macOS.zip
- path: dist\packages_mac.lua
name: packages_mac.lua
# Deploy tagged release builds to GitHub Releases
deploy:
provider: GitHub
auth_token:
secure: V6uVmUJlUliMnIKNamxGYLkWylnjbH6Ue6EalXl33xDkEpdIq2YNpy/Oj0lspnf5
artifact: XWord-Windows.exe,packages_windows.lua,XWord-macOS.zip,packages_mac.lua
draft: true
on:
APPVEYOR_REPO_TAG: true
CONFIGURATION: Release