-
Notifications
You must be signed in to change notification settings - Fork 27
119 lines (101 loc) · 3.7 KB
/
build_starc_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
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
name: Build Starc for Linux
env:
APP_VERSION: 0.7.6
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
create:
tags:
- v*
workflow_dispatch: {}
jobs:
build_linux:
name: Build Linux version
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout sources for push or create tag event
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@master
with:
token: ${{ secrets.ACTION_RUNNER }}
submodules: recursive
fetch-depth: 0
- name: Checkout sources for pull request event
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@master
- name: Checkout submodules for pull request event
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
git submodule update --init --recursive src/3rd_party/qbreakpad/ src/3rd_party/pdfhummus/ src/3rd_party/pdftextextraction/
- name: Add info about dev build to the env
shell: bash
run: |
echo "DEV_BUILD=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count)" >> $GITHUB_ENV
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
target: desktop
- name: Install dependencies
shell: bash
run: |
sudo apt update
sudo apt install libgstreamer-plugins-base1.0-0 cmake make pkg-config libx11-dev xcb libx11-xcb-dev libxkbcommon-x11-0 libxkbcommon-dev libgtk-3-dev sassc
- name: Install Adwaita-qt
run: |
git clone https://github.com/FedoraQt/adwaita-qt.git adwaita-qt
cd adwaita-qt
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DUSE_QT6=OFF
make -j2
sudo make install
- name: Install QGnomePlatform
run: |
git clone https://github.com/FedoraQt/QGnomePlatform qgnomeplatform
cd qgnomeplatform
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DUSE_QT6=OFF
make -j2
sudo make install
- name: Run QMake
shell: bash
run: |
cd src
qmake starc.pro DEFINES+="DEV_BUILD=$DEV_BUILD"
- name: Build
shell: bash
run: |
cd src
make -j$(nproc)
- name: Make AppImage
shell: bash
run: |
cd build/linux
./make-starc-app-image.sh ${{env.APP_VERSION}}
- name: Collect artifacts
uses: actions/upload-artifact@v3
with:
name: linux packages
path: build/linux/starc-setup.AppImage
- name: Publish artifacts to the dev stream and notify clients
if: startsWith(github.ref, 'refs/tags/') != true
shell: bash
run: |
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "name_for_file=starc-setup.AppImage" -F "file_bin=@build/linux/starc-setup.AppImage" https://starc.app/api/app/updates/publish
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=linux" -F "version=${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}" https://starc.app/api/app/updates/notify
- name: Publish artifacts to the GitHub releases
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/linux/starc-setup.AppImage
- name: Notify clients that stable release published
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=linux" -F "version=${{env.APP_VERSION}}" https://starc.app/api/app/updates/notify