-
Notifications
You must be signed in to change notification settings - Fork 1
159 lines (156 loc) · 5.68 KB
/
build.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
name: ddb_gui_qt5
on: [ push, pull_request ]
jobs:
build_linux_static:
name: Static linux
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Install dependencies for Linux
run: |
apt-get -qq update
apt-get install -y -qq libxcb-xinerama0-dev git g++ wget zip perl cmake
apt-get install -y -qq '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev \
libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
apt-get install -y -qq zlib1g-dev libharfbuzz-dev libfreetype-dev libegl-dev libfontconfig1-dev libudev-dev libmtdev-dev libinput-dev libdbus-1-dev
- name: Checkout for Linux
uses: actions/checkout@v1
- name: Fix library links
run: chmod +x scripts/liblinks.sh; scripts/liblinks.sh
- name: Build for Linux
run: chmod +x scripts/build_static.sh; scripts/build_static.sh
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: linux
path: ddb_gui_qt5_linux-static.zip
build_linux_shared:
name: Shared linux
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Install dependencies for Linux
run: |
apt-get -qq update
apt-get install -y -qq sudo cmake zip
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.5.2'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
modules: 'qtcharts'
- name: Checkout for Linux
uses: actions/checkout@v1
- name: Build for Linux
run: cmake .; cmake --build . ; mkdir -p plugins; cp ddb_gui_qt5.so plugins/; zip -r ddb_gui_qt5_linux-shared.zip plugins/ddb_gui_qt5.so
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: linux
path: ddb_gui_qt5_linux-shared.zip
build_windows_static:
name: Static Windows
runs-on: windows-latest
steps:
- name: Checkout for Windows
uses: actions/checkout@v2
with:
submodules: true
- name: Install msys2
uses: msys2/setup-msys2@v2
with:
msystem: CLANG64
update: true
install: >-
mingw-w64-clang-x86_64-toolchain make tar unzip xz zip mingw-w64-clang-x86_64-qt6-static mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-zlib mingw-w64-clang-x86_64-pcre2 mingw-w64-clang-x86_64-libpng mingw-w64-clang-x86_64-freetype mingw-w64-clang-x86_64-libwebp mingw-w64-clang-x86_64-libmng
- name: Build for Windows
shell: msys2 {0}
run: CMAKE_PREFIX_PATH=/clang64/qt6-static/ cmake . -DCMAKE_DISABLE_FIND_PACKAGE_harfbuzz=TRUE ; cmake --build . ; mkdir -p plugins; mv ddb_gui_qt5.dll plugins/ ; zip -r ddb_gui_qt5_windows-static.zip plugins/*.dll
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: windows
path: ddb_gui_qt5_windows-static.zip
build_windows_shared:
name: Shared Windows
runs-on: windows-latest
steps:
- name: Checkout for Windows
uses: actions/checkout@v2
with:
submodules: true
- name: Install msys2
uses: msys2/setup-msys2@v2
with:
msystem: CLANG64
update: true
install: >-
mingw-w64-clang-x86_64-toolchain make tar unzip xz zip mingw-w64-clang-x86_64-qt6-svg mingw-w64-clang-x86_64-qt6-declarative mingw-w64-clang-x86_64-qt6-base mingw-w64-clang-x86_64-qt6-charts mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja
- name: Build for Windows
shell: msys2 {0}
run: cmake . ; cmake --build . ; mkdir -p plugins;mv ddb_gui_qt5*.dll plugins/ ; zip -r ddb_gui_qt5_windows-shared.zip plugins/*.dll
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: windows
path: ddb_gui_qt5_windows-shared.zip
build_macos_static:
name: Static macOS
runs-on: macos-latest
steps:
- name: Checkout for macOS
uses: actions/checkout@v2
with:
submodules: true
- name: Install dependencies
run: |
brew install zip cmake
wget -q https://github.com/kuba160/qt5_static_build/releases/download/6.6.2/qt_6.6.2_static_macos.zip
unzip -qq qt_6.6.2_static_macos.zip
- name: Build for macOS
run: |
export PATH="/usr/local/opt/zip/bin:$PATH"
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
export PATH="/usr/local/opt/cmake/bin:$PATH"
CMAKE_PREFIX_PATH=$PWD/qt5_static/ cmake . -DCMAKE_OSX_ARCHITECTURES=x86_64
cmake --build .
mkdir -p plugins
cp ddb_gui_qt5.dylib plugins/
zip -r ddb_gui_qt5_macos-static.zip plugins/*.dylib
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: macos
path: ddb_gui_qt5_macos-static.zip
build_macos_shared:
name: Shared macOS
runs-on: macos-latest
steps:
- name: Checkout for macOS
uses: actions/checkout@v2
with:
submodules: true
- name: Install dependencies
run: brew install qt@6 gcc zip make
- name: Build for macOS
run: |
export PATH="/usr/local/opt/qt@5/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/qt@5/lib"
export CPPFLAGS="-I/usr/local/opt/qt@5/include"
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig"
export PATH="/usr/local/opt/zip/bin:$PATH"
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
echo $PATH
cmake .
cmake --build .
mkdir -p plugins
cp ddb_gui_qt5.dylib plugins/
zip -r ddb_gui_qt5_macos-shared.zip plugins/*.dylib
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: macos
path: ddb_gui_qt5_macos-shared.zip