-
-
Notifications
You must be signed in to change notification settings - Fork 259
178 lines (160 loc) · 6.18 KB
/
mingw.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
name: mingw
on: [push]
jobs:
build:
name: build
strategy:
matrix:
os: [windows-latest]
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: [Release, Debug]
defaults:
run:
shell: cmd
runs-on: ${{ matrix.os }}
env:
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
SOURCE_DIR: ${{github.workspace}}\3th_2021_12_04\source
TOOSL_DIR: ${{github.workspace}}\3th_2021_12_04\tools
INSTALL_DIR: ${{github.workspace}}\3th_2021_12_04\install
RabbitIm_VERSION: v0.1.0
steps:
- uses: actions/checkout@v2
#with:
#fetch-depth: 0
- name: make_directory
run: |
cmake -E make_directory ${{env.SOURCE_DIR}}
cmake -E make_directory ${{env.TOOSL_DIR}}
cmake -E make_directory ${{env.INSTALL_DIR}}
# - name: Cache mingw
# uses: actions/cache@v2
# id: cache-pacman
# with:
# path: |
# C:\msys64\usr\bin
# key: cache-installed-mingw
- name: pacman
# if: steps.cache-pacman.outputs.cache-hit != 'true'
env:
PATH: C:\msys64\usr\bin
run: |
C:\msys64\usr\bin\pacman -S --noconfirm mingw-w64-x86_64-cmake ^
mingw-w64-x86_64-make ^
mingw-w64-x86_64-nsis ^
mingw-w64-x86_64-gcc ^
mingw-w64-x86_64-qt5 ^
mingw-w64-x86_64-qtwebkit ^
mingw-w64-x86_64-zlib ^
mingw-w64-x86_64-openjpeg ^
mingw-w64-x86_64-libjpeg-turbo ^
mingw-w64-x86_64-libpng ^
mingw-w64-x86_64-openh264 ^
mingw-w64-x86_64-libvpx ^
mingw-w64-x86_64-opus ^
mingw-w64-x86_64-speex ^
mingw-w64-x86_64-speexdsp ^
mingw-w64-x86_64-qxmpp ^
mingw-w64-x86_64-ffmpeg ^
mingw-w64-x86_64-opencv ^
mingw-w64-x86_64-yasm ^
git base-devel
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: git clone https://github.com/KangLin/RabbitCommon.git
- name: Cache installed
uses: actions/cache@v2
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
key: cache-installed-mingw-install
- name: build log4qt
working-directory: ${{env.SOURCE_DIR}}
env:
MSYSTEM: MINGW64
PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\Log4Qt (
git clone -b v1.5.1 "https://github.com/MEONMedical/Log4Qt.git"
cd Log4Qt
cmake -E make_directory build
cd build
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}}
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
)
# - name: build qxmpp
# working-directory: ${{env.SOURCE_DIR}}
# env:
# MSYSTEM: MINGW64
# PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin
# run: |
# git clone -b v1.2.1 "https://github.com/qxmpp-project/qxmpp.git"
# cd qxmpp
# cmake -E make_directory build
# cd build
# cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} -DWITH_VPX=ON -DWITH_OPUS=ON
# cmake --build . --config ${{matrix.BUILD_TYPE}}
# cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
- name: build qzxing
working-directory: ${{env.SOURCE_DIR}}
env:
MSYSTEM: MINGW64
PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\QZXing (
git clone "https://github.com/KangLin/qzxing.git"
cd qzxing
cmake -E make_directory build
cd build
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} ^
-DBUILD_EXAMPLES=OFF -DQZXING_QML=OFF -DQZXING_ENABLE_ENCODER=ON
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
)
- name: build RabbitIm
working-directory: ${{github.workspace}}
env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
#Qt5_Dir: C:\msys64\mingw64
MSYSTEM: MINGW64
PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin
run: |
cmake -E make_directory build
cd build
cmake .. -G"MinGW Makefiles" ^
-DCMARK_SHARED=OFF ^
-DCMARK_TESTS=OFF ^
-DCMARK_STATIC=ON ^
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} ^
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install ^
-DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}/lib/cmake ^
-DLog4Qt_DIR=/lib/cmake/Log4Qt ^
-DQZXing_DIR=${{env.INSTALL_DIR}}\lib\cmake\QZXing
cmake --build . --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install-runtime
- name: Package
working-directory: ${{github.workspace}}/build
shell: cmd
run: |
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install-runtime
copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin
copy /Y C:\msys64\mingw64\bin\*.dll install\bin
makensis ${{github.workspace}}/build/Install.nsi
${{github.workspace}}/build/install/bin/RabbitImApp.exe ^
-f "${{github.workspace}}/build/update_windows.xml" ^
--pf RabbitIM_setup_${{env.RabbitIm_VERSION}}.exe ^
-m "${{env.RabbitIm_VERSION}}"
if: ${{ matrix.BUILD_TYPE == 'Release' }}
- name: update
uses: actions/upload-artifact@v2
with:
name: rabbitreim_mingw
path: |
${{github.workspace}}/build/RabbitIM_setup_*.exe
${{github.workspace}}/build/update_*.xml
if: ${{ matrix.BUILD_TYPE == 'Release' }}