-
Notifications
You must be signed in to change notification settings - Fork 7
142 lines (127 loc) · 4.56 KB
/
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
name: windows
on:
push:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'README.md'
- 'README_zh_CN.md'
- 'README_zh_HK.md'
- 'README_ja_JP.md'
- 'DEVELOPNOTE.md'
- 'DEVELOPNOTE_zh_CN.md'
- 'CHANGELOG.md'
- 'CODE_OF_CONDUCT.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE/**'
- 'TODO.md'
- '.readthedocs.yaml'
tags:
- V**
pull_request:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'README.md'
- 'README_zh_CN.md'
- 'README_zh_HK.md'
- 'README_ja_JP.md'
- 'DEVELOPNOTE.md'
- 'DEVELOPNOTE_zh_CN.md'
- 'CHANGELOG.md'
- 'CODE_OF_CONDUCT.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE/**'
- 'TODO.md'
- '.readthedocs.yaml'
workflow_dispatch:
jobs:
windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
arch: win64_mingw
version: '6.8.1'
modules: 'qtwebsockets qtserialport qtmultimedia'
aqtversion: '==3.1.19'
tools: 'tools_mingw1310'
- name: Install cmake
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install cmake --no-progress
- name: Install innosetup
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install innosetup --no-progress
- name: Install setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
- name: build mingw-w64-libpython
shell: msys2 {0}
run: |
pacman --noconfirm -S make cmake autoconf automake bison diffutils libtool texinfo xmlto
pacman --noconfirm -S base-devel msys2-devel mingw-w64-{x86_64,i686}-toolchain
gcc --version
mkdir mingw-w64-libpython
cp -r ${Python3_ROOT_DIR}/include ./mingw-w64-libpython/
mkdir mingw-w64-libpython/lib
cp ${Python3_ROOT_DIR}/python311.dll ./mingw-w64-libpython/lib/python311.dll
cd mingw-w64-libpython/lib
gendef python311.dll
dlltool -D python311.dll -d python311.def -l libpython311.a
- name: build libssh2
shell: msys2 {0}
run: |
cd depend
./build_libssh2_mingw.sh
mkdir /d/libssh2
mkdir /d/libssh2/include
mkdir /d/libssh2/lib
mkdir /d/libssh2/bin
cp -r ./output/include/* /d/libssh2/include/
cp -r ./output/lib/* /d/libssh2/lib/
cp -r ./output/bin/* /d/libssh2/bin/
#- name: Build winpty
# shell: msys2 {0}
# run: |
# pacman --noconfirm -S make gcc
# cd depend
# export PATH=/c/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin:$PATH
# ./build_winpty_ms.sh
- name: Install winpty
run: |
cd D:/
curl -L https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msys2-2.7.0-x64.tar.gz -o winpty-0.4.3-msys2-2.7.0-x64.tar.gz
tar -xvf winpty-0.4.3-msys2-2.7.0-x64.tar.gz
mv winpty-0.4.3-msys2-2.7.0-x64 winpty
- name: Build all
run: |
git fetch --tags --force
./tools/sed/sed.exe -i 's/--long --dirty/--long/g' ./tools/generate_info.ps1
./tools/sed/sed.exe -i "s/QT_DIR=C:\/Qt\/Qt6.2.0\/6.2.0\/mingw81_32\/bin/QT_DIR=%QT_ROOT_DIR%\/bin/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/QT_TOOLS_DIR=C:\/Qt\/Qt6.2.0\/Tools\/mingw810_32\/bin/QT_TOOLS_DIR=%IQTA_TOOLS%\/mingw1310\/bin/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/mingw32-make -j8/mingw32-make -j1/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/WINPTY_DIR=D:\\quardCRT\\depend\\winpty/WINPTY_DIR=D:\\winpty/g" ./lib/ptyqt/ptyqt.pri
./tools/sed/sed.exe -i "s/LIBSSH2_DIR=\/libssh2/LIBSSH2_DIR=D:\\libssh2/g" ./lib/qtssh/qtssh.pri
./tools/sed/sed.exe -i "s/Python3_DIR=\/python3_root_dir/Python3_DIR=mingw-w64-libpython/g" ./quardCRT.pro
mkdir prebuilt_plugins
python3 ./.github/scripts/get_plugin.py ./.github/scripts/plugin_list.json ./prebuilt_plugins
./build_setup.bat
- name: Upload build asserts
uses: actions/upload-artifact@v4
with:
name: quardCRT_windows
path: |
./output/*.exe
- name: Run tests
run: |
./InnoSetup/build/quardCRT.exe --version