-
Notifications
You must be signed in to change notification settings - Fork 0
183 lines (163 loc) · 7.52 KB
/
workflow_windows.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Windows Build
on: [push, pull_request]
jobs:
Windows:
runs-on: windows-2019
env:
vcpkg_ref: 14e7bb4ae24616ec54ff6b2f6ef4e8659434ea44
BOOST_ROOT: ${{github.workspace}}/3rdparty/boost
BOOST_URL: https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download
QT_ROOT: ${{github.workspace}}/3rdparty/qt
QT_URL: https://github.com/shun-iwasawa/qt5/releases/download/v5.15.2_wintab/Qt5.15.2_wintab.zip
steps:
- uses: actions/checkout@v2
- name: Checkout mypaint/libmypaint
uses: actions/checkout@v2
with:
repository: 'mypaint/libmypaint'
ref: '70f7686db792fa4953dc60f28a322bf2cd388ed7'
path: 'libmypaint'
- name: Checkout xiaoyeli/superlu
uses: actions/checkout@v2
with:
repository: 'xiaoyeli/superlu'
ref: 'a3d5233770f0caad4bc4578b46d3b26af99e9c19'
path: 'superlu'
- name: Install vcpkg
run: |
rm -r -fo C:/vcpkg
cd C:/
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
git checkout "$env:vcpkg_ref"
./bootstrap-vcpkg.bat
- uses: actions/cache@v1
with:
path: C:/vcpkg/installed
key: ${{ runner.os }}-vcpkg-${{ env.vcpkg_ref }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-vcpkg-${{ env.vcpkg_ref }}-
- name: Install libraries
run: |
vcpkg install --clean-after-build --triplet x64-windows icu
vcpkg install --clean-after-build --triplet x64-windows-static json-c libjpeg-turbo libpng lz4 lzo openblas zlib
vcpkg install --clean-after-build --triplet x64-windows freeglut glew
vcpkg install --clean-after-build --triplet x64-windows --recurse opencv[world]
ls -Recurse C:/vcpkg/installed -Filter *.pdb | rm
- name: Cache Qt
id: cache-qt
uses: actions/cache@v2
with:
path: ${{env.QT_ROOT}}
key: ${{ runner.os }}-QtCache
- name: Install Qt
run: |
# fix up paths to be forward slashes consistently
QT_ROOT=$(echo $QT_ROOT | sed 's/\\/\//g')
mkdir -p $QT_ROOT
curl --progress-bar -L -o $QT_ROOT/Qt.zip $QT_URL
7z -o$QT_ROOT x $QT_ROOT/Qt.zip -y -bd
rm -f $QT_ROOT/Qt.zip
shell: bash
- name: Restore Boost cache
uses: actions/cache@v2
id: cache-boost
with:
path: ${{env.BOOST_ROOT}}
key: boost
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: |
# fix up paths to be forward slashes consistently
BOOST_ROOT=$(echo $BOOST_ROOT | sed 's/\\/\//g')
mkdir -p $BOOST_ROOT
curl --progress-bar --location --output $BOOST_ROOT/download.tar.bz2 $BOOST_URL
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar.bz2 -y -bd
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar -y -bd
cd $BOOST_ROOT && cp -r boost_*/* .
rm -rf boost_*/* download.tar.bz2 download.tar
shell: bash
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9.1'
- name: Build libtiff
run: |
cd thirdparty/tiff-4.0.3
cp libtiff/tif_config.vc.h libtiff/tif_config.h
cp libtiff/tiffconf.vc.h libtiff/tiffconf.h
cd prj/LibTIFF
$env:Path += ';C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/Bin'
msbuild LibTIFF.vcxproj /p:PlatformToolset=v142 /p:Platform=x64 /p:Configuration=Release -maxcpucount:3
- name: Build mypaint/libmypaint
run: |
cd libmypaint
cp ../.github/workflows/CMakeLists.txt .
echo '#define MYPAINT_CONFIG_USE_GLIB 0' > config.h
python generate.py mypaint-brush-settings-gen.h brushsettings-gen.h
mkdir build | Out-Null
cd build
cmake ../ -G 'Visual Studio 16 2019' -Ax64 -Djson-c_DIR='C:/vcpkg/installed/x64-windows-static/share/json-c/' -DJSON-C_INCLUDE_DIR='C:/vcpkg/installed/x64-windows-static/include/json-c/'
cmake --build . --config Release
cp C:/vcpkg/installed/x64-windows-static/lib/json-c.lib .
$env:Path += ';C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64'
lib /OUT:libmypaint.lib Release/libmypaint.lib json-c.lib
cp libmypaint.lib Release/libmypaint.lib
- name: Build xiaoyeli/superlu
run: |
cd superlu
mkdir build | Out-Null
cd build
cmake ../ -G 'Visual Studio 16 2019' -Ax64 -DXSDK_ENABLE_Fortran=OFF -Denable_tests=OFF
cmake --build . --config Release
- name: Workaround
run: |
cd thirdparty
cp C:/vcpkg/installed/x64-windows-static/lib/libpng16.lib libpng-1.6.21/lib/libpng16_2015_64.lib
cp C:/vcpkg/installed/x64-windows-static/lib/lz4.lib Lz4/Lz4_131/lz4_64.lib
cp C:/vcpkg/installed/x64-windows-static/lib/lzo2.lib lzo/2.03/LZO_lib/lzo2_64.lib
cp C:/vcpkg/installed/x64-windows-static/lib/openblas.lib openblas/libopenblas_64.lib
cp C:/vcpkg/installed/x64-windows-static/lib/zlib.lib zlib-1.2.8/lib/zlib-1.2.8_2015_64.lib
cp C:/vcpkg/installed/x64-windows/lib/freeglut.lib glut/3.7.6/lib/glut64.lib
cp C:/vcpkg/installed/x64-windows/lib/glew32.lib glew/glew-1.9.0/lib/glew64.lib
cp D:/a/opentoonz/opentoonz/libmypaint/build/Release/libmypaint.lib libmypaint/dist/64/libmypaint.lib
cp D:/a/opentoonz/opentoonz/superlu/build/SRC/Release/superlu.lib superlu/SuperLU_2015_64.lib
cp D:/a/opentoonz/opentoonz/thirdparty/tiff-4.0.3/prj/LibTIFF/x64/Release/LibTIFF.lib tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64.lib
cp C:/vcpkg/installed/x64-windows-static/lib/turbojpeg.lib libjpeg-turbo/lib/turbojpeg-static_2015_64.lib
cp C:/vcpkg/installed/x64-windows-static/lib/jpeg.lib libjpeg-turbo/lib/jpeg-static_2015_64.lib
- name: Copy headers
run: |
cd thirdparty
cp libpng-1.6.21/scripts/pnglibconf.h.prebuilt libpng-1.6.21/pnglibconf.h
- name: Build
run: |
cd toonz
mkdir build | Out-Null
cd build
$env:BOOST_ROOT = '${{ env.BOOST_ROOT }}'
$env:QT_PATH = '${{ env.QT_ROOT }}/Qt5.15.2_wintab/5.15.2_wintab/msvc2019_64'
cmake ../sources -G 'Visual Studio 16 2019' -Ax64 -DQT_PATH="$env:QT_PATH" -DOpenCV_DIR='C:/vcpkg/installed/x64-windows/share/opencv' -DBOOST_ROOT="$env:BOOST_ROOT" -DWITH_WINTAB=ON
cmake --build . --config Release
- name: Create Artifact
env:
VCINSTALLDIR: 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC'
run: |
mkdir artifact | Out-Null
cd artifact
cp -Recurse ../stuff portablestuff
cp ../toonz/build/Release/* .
${{ env.QT_ROOT }}/Qt5.15.2_wintab/5.15.2_wintab/msvc2019_64/bin/windeployqt.exe OpenToonz.exe
cp C:/vcpkg/installed/x64-windows/bin/freeglut.dll .
cp C:/vcpkg/installed/x64-windows/bin/glew32.dll .
cp C:/vcpkg/installed/x64-windows/bin/opencv_world.dll .
cp C:/vcpkg/installed/x64-windows/bin/zlib1.dll .
cp C:/vcpkg/installed/x64-windows/bin/webp.dll .
cp C:/vcpkg/installed/x64-windows/bin/libpng16.dll .
cp C:/vcpkg/installed/x64-windows/bin/jpeg62.dll .
cp C:/vcpkg/installed/x64-windows/bin/tiff.dll .
cp C:/vcpkg/installed/x64-windows/bin/liblzma.dll .
cp C:/vcpkg/installed/x64-windows/bin/libprotobuf.dll .
cp C:/vcpkg/installed/x64-windows/bin/webpdecoder.dll .
- uses: actions/upload-artifact@v1
with:
name: Opentoonz-${{ runner.os }}-${{ github.sha }}
path: artifact