Debian Codegraph @

.github/workflows/linux.yml

raw symbols SCIP
1 name: linux
2
3 on:
4 workflow_dispatch:
5 push:
6 branches: [ master ]
7 tags:
8 - "v*"
9 pull_request:
10
11 jobs:
12 test-linux:
13 runs-on: ubuntu-latest
14 strategy:
15 fail-fast: false
16 matrix:
17 qtversion: ['5.15.2', '6.8.1']
18 steps:
19 - name: Checkout
20 uses: actions/checkout@v4
21
22 - name: Set up build variables
23 env:
24 QT_VERSION: ${{ matrix.qtversion }}
25 run: bash ./.github/scripts/setup_build_variables.sh
26
27 - name: Set up linux build variables
28 run: bash ./.github/scripts/linux/setup_linux_build_variables.sh
29
30 - name: Install Qt
31 uses: jurplel/install-qt-action@v4
32 with:
33 version: ${{ matrix.qtversion }}
34 host: 'linux'
35 install-deps: 'true'
36
37 - name: Install dependencies
38 run: sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev xvfb
39
40 - name: Install Qt6 dependencies
41 # https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform
42 run: sudo apt-get install libxcb-cursor-dev
43
44 - name: Set up GoogleTest
45 run: bash ./.github/scripts/setup_googleTest.sh
46
47 - name: Set up kColorPicker
48 env:
49 BUILD_TYPE: Debug
50 run: bash ./.github/scripts/setup_kColorPicker.sh
51
52 - name: Set up kImageAnnotator
53 env:
54 BUILD_TYPE: Debug
55 run: bash ./.github/scripts/setup_kImageAnnotator.sh
56
57 - name: Build
58 env:
59 BUILD_TESTS: ON
60 BUILD_TYPE: Debug
61 run: bash ./.github/scripts/build_ksnip.sh
62
63 - name: Test
64 working-directory: ${{github.workspace}}/build/tests
65 run: xvfb-run --auto-servernum --server-num=1 --server-args="-screen 0 1024x768x24" ctest --extra-verbose
66
67
68 package-appImage:
69 if: ${{ github.event_name == 'push' }}
70 runs-on: ubuntu-22.04
71 needs: test-linux
72 steps:
73 - name: Checkout
74 uses: actions/checkout@v4
75
76 - name: Set up build variables
77 run: bash ./.github/scripts/setup_build_variables.sh
78
79 - name: Set up windows build variables
80 run: bash ./.github/scripts/linux/setup_linux_build_variables.sh
81
82 - name: Install Qt
83 uses: jurplel/install-qt-action@v4
84 with:
85 version: '5.15.2'
86 host: 'linux'
87 install-deps: 'true'
88
89 - name: Install dependencies
90 run: sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev libssl-dev
91
92 - name: Install Qt6 dependencies
93 # https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform
94 run: sudo apt-get install libxcb-cursor-dev
95
96 - name: Set up kColorPicker
97 run: bash ./.github/scripts/setup_kColorPicker.sh
98
99 - name: Set up kImageAnnotator
100 run: bash ./.github/scripts/setup_kImageAnnotator.sh
101
102 - name: Download deploy tool
103 run: |
104 wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
105 chmod a+x linuxdeployqt-continuous-x86_64.AppImage
106
107 - name: Package AppImage
108 working-directory: ${{github.workspace}}
109 run: bash ./.github/scripts/linux/build_appImage.sh
110
111 - name: Upload Artifact
112 uses: actions/upload-artifact@v4
113 with:
114 name: ksnip.AppImage
115 path: ksnip*.AppImage*
116
117 - name: Delete existing release with same name
118 env:
119 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120 run: bash ./.github/scripts/delete_release.sh
121
122 - name: Upload Release
123 uses: svenstaro/upload-release-action@v2
124 with:
125 repo_token: ${{ secrets.GITHUB_TOKEN }}
126 file: ksnip-${{ env.VERSION }}-x86_64.AppImage
127 asset_name: ksnip-${{ env.VERSION }}-x86_64.AppImage
128 tag: ${{ env.RELEASE_TAG }}
129 overwrite: true
130 release_name: ${{ env.RELEASE_NAME }}
131 body: ${{ env.UPLOADTOOL_BODY }}
132 prerelease: ${{ env.IS_PRERELASE }}
133
134
135 package-rpm:
136 if: ${{ github.event_name == 'push' }}
137 runs-on: ubuntu-latest
138 needs: test-linux
139 steps:
140 - name: Checkout
141 uses: actions/checkout@v4
142
143 - name: Set up build variables
144 run: bash ./.github/scripts/setup_build_variables.sh
145
146 - name: Set up windows build variables
147 run: bash ./.github/scripts/linux/setup_linux_build_variables.sh
148
149 - name: Install Qt
150 uses: jurplel/install-qt-action@v4
151 with:
152 version: '5.15.2'
153 host: 'linux'
154 install-deps: 'true'
155
156 - name: Install dependencies
157 run: sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev libssl-dev rpm
158
159 - name: Install Qt6 dependencies
160 # https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform
161 run: sudo apt-get install libxcb-cursor-dev
162
163 - name: Set up kColorPicker
164 run: bash ./.github/scripts/setup_kColorPicker.sh
165
166 - name: Set up kImageAnnotator
167 run: bash ./.github/scripts/setup_kImageAnnotator.sh
168
169 - name: Set up spec file
170 run: bash ./.github/scripts/linux/rpm/setup_spec_file.sh
171
172 - name: Set up directory structure
173 run: bash ./.github/scripts/linux/rpm/setup_rpm_directory_structure.sh
174
175 - name: Package rpm
176 run: bash ./.github/scripts/linux/rpm/build_rpm.sh
177
178 - name: Upload Artifact
179 uses: actions/upload-artifact@v4
180 with:
181 name: ksnip.rpm
182 path: ksnip-*.rpm
183
184 - name: Delete existing release with same name
185 env:
186 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
187 run: bash ./.github/scripts/delete_release.sh
188
189 - name: Upload Release
190 uses: svenstaro/upload-release-action@v2
191 with:
192 repo_token: ${{ secrets.GITHUB_TOKEN }}
193 file: ksnip-${{ env.VERSION }}.rpm
194 asset_name: ksnip-${{ env.VERSION }}.rpm
195 tag: ${{ env.RELEASE_TAG }}
196 overwrite: true
197 release_name: ${{ env.RELEASE_NAME }}
198 body: ${{ env.UPLOADTOOL_BODY }}
199 prerelease: ${{ env.IS_PRERELASE }}
200
201
202 package-deb:
203 if: ${{ github.event_name == 'push' }}
204 runs-on: ubuntu-latest
205 needs: test-linux
206 steps:
207 - name: Checkout
208 uses: actions/checkout@v4
209
210 - name: Set up build variables
211 run: bash ./.github/scripts/setup_build_variables.sh
212
213 - name: Set up windows build variables
214 run: bash ./.github/scripts/linux/setup_linux_build_variables.sh
215
216 - name: Install Qt
217 uses: jurplel/install-qt-action@v4
218 with:
219 version: '5.15.2'
220 host: 'linux'
221 install-deps: 'true'
222
223 - name: Install dependencies
224 run: sudo apt-get install cmake extra-cmake-modules libxcb-xfixes0-dev libssl-dev devscripts debhelper
225
226 - name: Install Qt6 dependencies
227 # https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform
228 run: sudo apt-get install libxcb-cursor-dev
229
230 - name: Set up kColorPicker
231 run: bash ./.github/scripts/setup_kColorPicker.sh
232
233 - name: Set up kImageAnnotator
234 run: bash ./.github/scripts/setup_kImageAnnotator.sh
235
236 - name: Set up directory structure
237 run: bash ./.github/scripts/linux/deb/setup_deb_directory_structure.sh
238
239 - name: Set up changelog
240 run: bash ./.github/scripts/linux/deb/setup_changelog_file.sh
241
242 - name: Package deb
243 run: bash ./.github/scripts/linux/deb/build_deb.sh
244
245 - name: Upload Artifact
246 uses: actions/upload-artifact@v4
247 with:
248 name: ksnip.deb
249 path: ksnip-*.deb
250
251 - name: Delete existing release with same name
252 env:
253 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
254 run: bash ./.github/scripts/delete_release.sh
255
256 - name: Upload Release
257 uses: svenstaro/upload-release-action@v2
258 with:
259 repo_token: ${{ secrets.GITHUB_TOKEN }}
260 file: ksnip-${{ env.VERSION }}.deb
261 asset_name: ksnip-${{ env.VERSION }}.deb
262 tag: ${{ env.RELEASE_TAG }}
263 overwrite: true
264 release_name: ${{ env.RELEASE_NAME }}
265 body: ${{ env.UPLOADTOOL_BODY }}
266 prerelease: ${{ env.IS_PRERELASE }}