-
-
Notifications
You must be signed in to change notification settings - Fork 68
138 lines (121 loc) · 6.59 KB
/
appimage.yml
File metadata and controls
138 lines (121 loc) · 6.59 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
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
# 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]
os: [ubuntu-24.04, ubuntu-24.04-arm]
include:
- os: ubuntu-24.04
- os: 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.qt_arch}}_${{matrix.BUILD_TYPE}}
artifact_name: build_appimage
qt_modules: 'qtscxml'
SerialPortAssistant_VERSION: v0.5.33
# 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@v3
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
${{env.TOOLS_DIR}}/linuxdeploy-*
key: install_appimage
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: |
git clone https://github.com/KangLin/RabbitCommon.git
- name: Install base dependency libraries
run: |
sudo ./Script/build_depend.sh --apt_update --base --default
- name: build appimage
env:
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
run: |
export QMAKE=/usr/bin/qmake6
${{github.workspace}}/Script/build_appimage.sh
# mkdir -p SetupSerialPortAssistantAppImage
# pushd SetupSerialPortAssistantAppImage
# cp ${{github.workspace}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_`uname -m`.AppImage .
# chmod a+rx SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_`uname -m`.AppImage
# cp ${{github.workspace}}/Script/install_appimage.sh install.sh
# chmod a+rx install.sh
# cp ${{env.BUILD_DIR}}/AppDir/usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop .
# cp ${{env.BUILD_DIR}}/AppDir/usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png .
# popd
# 7z a SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_`uname -m`.zip SetupSerialPortAssistantAppImage
- name: update configure file
if: ${{ matrix.BUILD_TYPE == 'Release'}}
continue-on-error: true
run: |
#sudo apt update -y -qq
#sudo apt-get install -y -qq xvfb xpra
sudo Xvfb :96 -ac -screen 0 1200x900x24 &
export DISPLAY=:96.0
echo "Update update_linux.json ......"
export QT_XCB_GL_INTEGRATION=none
#export QT_DEBUG_PLUGINS=1
ARCH=`uname -m`
md5sum SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage > SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage.md5sum
MD5SUM=`cat SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage.md5sum|awk '{print $1}'`
echo "MD5SUM SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage: ${MD5SUM}"
echo "Generate update configure file ......"
./SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage \
-f "${{github.workspace}}/update_appimage_${{matrix.os}}.json" \
--foc 1 \
--file-name ${{github.workspace}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage \
-u "https://github.com/KangLin/SerialPortAssistant/releases/download/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage;https://sourceforge.net/projects/SerialPortAssistant/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage?viasf=1" \
--md5 "${MD5SUM}" \
-m "v${{env.SerialPortAssistant_VERSION}}"
# md5sum SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_`uname -m`.zip > SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_`uname -m`.zip.md5sum
# MD5SUM=`cat SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_`uname -m`.zip.md5sum|awk '{print $1}'`
# echo "MD5SUM SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_`uname -m`.zip: ${MD5SUM}"
# echo "Generate update configure file ......"
# ./SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage \
# -f "${{github.workspace}}/update_appimage_${{matrix.os}}.json" \
# --foc 1 \
# --file-name ${{github.workspace}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_`uname -m`.zip \
# -u "https://github.com/KangLin/SerialPortAssistant/releases/download/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_`uname -m`.zip;https://sourceforge.net/projects/SerialPortAssistant/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_`uname -m`.zip?viasf=1" \
# --md5 "${MD5SUM}" \
# -m "v${{env.SerialPortAssistant_VERSION}}"
- name: Update artifact
if: ${{matrix.BUILD_TYPE == 'Release'}}
uses: actions/upload-artifact@v4
with:
name: ${{env.artifact_name}}_${{matrix.os}}
path: |
${{github.workspace}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_*.AppImage
${{github.workspace}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}*.zip
${{github.workspace}}/update_appimage_${{matrix.os}}.json