-
-
Notifications
You must be signed in to change notification settings - Fork 78
101 lines (88 loc) · 4.3 KB
/
appimage.yml
File metadata and controls
101 lines (88 loc) · 4.3 KB
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
# Author: Kang Lin <kl222@126.com>
name: appimage
on:
workflow_call:
outputs:
name:
description: "The artifact name"
value: ${{ jobs.build_appimage.outputs.name }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
build_appimage:
strategy:
matrix:
BUILD_TYPE: [Release]
qt_version: [6.9.3]
os: [ubuntu-24.04, ubuntu-24.04-arm]
# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)
# See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job)
# See: https://github.com/actions/runner-images/
runs-on: ${{matrix.os}}
env:
BUILD_TYPE: ${{matrix.BUILD_TYPE}}
BUILD_DIR: ${{github.workspace}}/build
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOLS_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.os}}_${{matrix.BUILD_TYPE}}
RabbitRemoteControl_VERSION: v1.0.0-dev
artifact_name: build_appimage
qt_modules: 'qtscxml qtmultimedia qtimageformats qtserialport qt5compat qtpositioning qtwebchannel qtwebengine'
# Map the job outputs to step outputs
outputs:
name: ${{ env.artifact_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Make directories
run: |
cmake -E make_directory ${{env.BUILD_DIR}}
cmake -E make_directory ${{env.SOURCE_DIR}}
cmake -E make_directory ${{env.TOOLS_DIR}}
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Cache installed
uses: actions/cache@v4
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
${{env.TOOLS_DIR}}/linuxdeploy-*
${{env.TOOLS_DIR}}/qt_*
key: install_appimage
- name: build appimage
#continue-on-error: true
run: |
sudo ./Script/build_linux.sh --appimage --install ${{env.INSTALL_DIR}}
mv RabbitRemoteControl_`uname -m`.AppImage RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage
md5sum RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage > RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage.md5sum
- name: update configure file
if: ${{ matrix.BUILD_TYPE == 'Release'}}
#continue-on-error: true
run: |
sudo Xvfb :91.0 -ac -screen 0 1200x900x24 &
sleep 1
export DISPLAY=:91.0
echo "Update update_linux.json ......"
export QT_XCB_GL_INTEGRATION=none
#export QT_DEBUG_PLUGINS=1
ARCH=`uname -m`
MD5SUM=`cat RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_$ARCH.AppImage.md5sum|awk '{print $1}'`
echo "MD5SUM RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_$ARCH.AppImage: ${MD5SUM}"
echo "Generate update configure file ......"
./RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_$ARCH.AppImage \
-f "${{github.workspace}}/update_appimage_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json" \
--foc 1 \
--file-name RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_$ARCH.AppImage \
-u "https://github.com/KangLin/RabbitRemoteControl/releases/download/${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage;https://master.dl.sourceforge.net/project/rabbitremotecontrol/${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage?viasf=1" \
--md5 "${MD5SUM}"
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}_${{matrix.os}}
path: |
${{github.workspace}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_*.AppImage
${{github.workspace}}/update_appimage_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json