-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (57 loc) · 1.81 KB
/
linux.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
name: linux
on:
push:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_zh_CN.md'
- 'DEVELOPNOTE.md'
- '.readthedocs.yaml'
tags:
- V**
pull_request:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_zh_CN.md'
- 'DEVELOPNOTE.md'
- '.readthedocs.yaml'
workflow_dispatch:
jobs:
ubuntu-2004:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.5.3'
aqtversion: ==3.1.7
- name: Install prerequisites
run: |
sudo apt update
sudo apt install -y make gcc patchelf chrpath qt5-default libxcb-cursor0 build-essential libgtk-3-dev
- name: Build all
run: |
git fetch --tags --force
sed -i 's/--long --dirty/--long/g' ./tools/generate_info.sh
sed -i 's/QT_DIR=\/opt\/Qt6.2.0\/6.2.0\/gcc_64/QT_DIR=$(cd "$(dirname "$0")";pwd)\/..\/Qt\/6.5.3\/gcc_64/g' build_deb.sh
sed -i 's/\/home\/qqm\/Desktop\/ttfviewer\/depend\/freetype/\/usr\/local\/ttfviewer/g' partform_unix.pri
cd depend
sudo ./build.sh
cd -
./build_deb.sh
- name: Upload build asserts
uses: actions/[email protected]
with:
name: TTFviewer_Ubuntu2004
path: |
./dpkg/*.deb
- name: Run tests
run: |
if ls ./dpkg | grep ".deb" ; then echo "Pass"; else echo "Failed" && exit 1; fi;
timeout --foreground -s SIGKILL 20s ./dpkg/TTFviewer_Linux_*/opt/TTFviewer/TTFviewer --version > >(tee run.log) || {
if cat run.log | grep "TTFviewer" ; then echo "Pass" && exit 0; else echo "Failed" && exit 1; fi;
}