Skip to content

Commit 0b335eb

Browse files
committed
Script: Add build library depend script
1 parent 2009a42 commit 0b335eb

21 files changed

+573
-64
lines changed

.github/workflows/android.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
BUILD_TYPE: [Release]
1818
qt_arch: [android_arm64_v8a, android_x86_64]
19-
qt_version: [6.8.1]
19+
qt_version: [6.8.2]
2020
include:
2121
- qt_arch: android_arm64_v8a
2222
VCPKG_TARGET_TRIPLET: arm64-android
@@ -38,7 +38,7 @@ jobs:
3838
VCPKG_DEFAULT_HOST_TRIPLET: x64-linux
3939
VCPKG_MANIFEST_FEATURES: "freerdp;vnc;wol"
4040
SOURCE_DIR: ${{github.workspace}}/.cache/source
41-
TOOSL_DIR: ${{github.workspace}}/.cache/tools
41+
TOOLS_DIR: ${{github.workspace}}/.cache/tools
4242
INSTALL_DIR: ${{github.workspace}}/.cache/install
4343
artifact_name: build_android
4444
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/26.3.11579264
@@ -61,7 +61,7 @@ jobs:
6161
run: |
6262
cmake --version
6363
cmake -E make_directory ${{env.SOURCE_DIR}}
64-
cmake -E make_directory ${{env.TOOSL_DIR}}
64+
cmake -E make_directory ${{env.TOOLS_DIR}}
6565
cmake -E make_directory ${{env.INSTALL_DIR}}
6666
cmake -E make_directory ${{github.workspace}}/build
6767
@@ -93,9 +93,9 @@ jobs:
9393
9494
- name: Install Qt of linux_gcc_64
9595
uses: jurplel/install-qt-action@v3
96-
if: ${{ matrix.qt_version == '6.8.1' }}
96+
if: ${{ matrix.qt_version == '6.8.2' }}
9797
with:
98-
dir: '${{env.TOOSL_DIR}}/qt' # optional
98+
dir: '${{env.TOOLS_DIR}}/qt' # optional
9999
version: '${{matrix.qt_version}}'
100100
#host: 'linux'
101101
target: 'desktop'
@@ -108,7 +108,7 @@ jobs:
108108
uses: jurplel/install-qt-action@v3
109109
if: ${{ matrix.qt_version == '6.6.3' }}
110110
with:
111-
dir: '${{env.TOOSL_DIR}}/qt' # optional
111+
dir: '${{env.TOOLS_DIR}}/qt' # optional
112112
version: '${{matrix.qt_version}}'
113113
#host: 'linux'
114114
target: 'desktop'
@@ -121,7 +121,7 @@ jobs:
121121
uses: jurplel/install-qt-action@v3
122122
with:
123123
# Directory to install Qt
124-
dir: '${{env.TOOSL_DIR}}/qt' # optional
124+
dir: '${{env.TOOLS_DIR}}/qt' # optional
125125
# Version of Qt to install
126126
version: '${{matrix.qt_version}}'
127127
# Host platform

.github/workflows/appimage.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
BUILD_TYPE: [Release]
18-
qt_version: [6.8.1]
18+
qt_version: [6.8.2]
1919
qt_arch: [linux_gcc_64]
2020

2121
# See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
@@ -25,7 +25,7 @@ jobs:
2525
env:
2626
BUILD_TYPE: ${{matrix.BUILD_TYPE}}
2727
SOURCE_DIR: ${{github.workspace}}/.cache/source
28-
TOOSL_DIR: ${{github.workspace}}/.cache/tools
28+
TOOLS_DIR: ${{github.workspace}}/.cache/tools
2929
INSTALL_DIR: ${{github.workspace}}/.cache/install
3030
RabbitRemoteControl_VERSION: v0.0.32
3131
artifact_name: build_appimage
@@ -44,7 +44,7 @@ jobs:
4444
run: |
4545
cmake -E make_directory ${{github.workspace}}/build
4646
cmake -E make_directory ${{env.SOURCE_DIR}}
47-
cmake -E make_directory ${{env.TOOSL_DIR}}
47+
cmake -E make_directory ${{env.TOOLS_DIR}}
4848
cmake -E make_directory ${{env.INSTALL_DIR}}
4949
5050
- name: git clone RabbitCommon
@@ -75,7 +75,7 @@ jobs:
7575
- name: Install Qt
7676
uses: jurplel/install-qt-action@v3
7777
with:
78-
dir: '${{env.TOOSL_DIR}}/qt'
78+
dir: '${{env.TOOLS_DIR}}/qt'
7979
aqtversion: '==3.1.*'
8080
version: ${{matrix.qt_version}}
8181
host: 'linux'
@@ -92,7 +92,7 @@ jobs:
9292
with:
9393
path: |
9494
${{env.INSTALL_DIR}}
95-
${{env.TOOSL_DIR}}
95+
${{env.TOOLS_DIR}}
9696
key: install_ubuntu_${{matrix.BUILD_TYPE}}
9797

9898
- name: pcapplusplus
@@ -116,7 +116,7 @@ jobs:
116116
working-directory: ${{env.SOURCE_DIR}}
117117
run: |
118118
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/FreeRDP3 ]; then
119-
git clone -b 3.11.0 https://github.com/FreeRDP/FreeRDP.git
119+
git clone -b 3.11.1 https://github.com/FreeRDP/FreeRDP.git
120120
# git clone https://github.com/KangLin/FreeRDP.git
121121
cd FreeRDP
122122
git submodule update --init --recursive
@@ -199,7 +199,7 @@ jobs:
199199
200200
- name: linuxdeploy
201201
run: |
202-
cd ${{env.TOOSL_DIR}}
202+
cd ${{env.TOOLS_DIR}}
203203
if [ ! -f linuxdeploy-`uname -m`.AppImage ]; then
204204
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/2.0.0-alpha-1-20241106/linuxdeploy-`uname -m`.AppImage
205205
chmod u+x linuxdeploy-`uname -m`.AppImage
@@ -251,7 +251,7 @@ jobs:
251251
export EXTRA_PLATFORM_PLUGINS="libqxcb.so"
252252
# Icons from theme are not displayed in QtWidgets Application: https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/17
253253
export EXTRA_QT_MODULES="svg"
254-
${{env.TOOSL_DIR}}/linuxdeploy-`uname -m`.AppImage --appdir=AppDir -v0 \
254+
${{env.TOOLS_DIR}}/linuxdeploy-`uname -m`.AppImage --appdir=AppDir -v0 \
255255
--deploy-deps-only=AppDir/usr/plugins/Client \
256256
--deploy-deps-only=AppDir/usr/lib/`uname -m`-linux-gnu \
257257
--plugin qt \

.github/workflows/arch.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: arch
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
name:
7+
description: "The artifact name"
8+
value: ${{ jobs.build_arch.outputs.name }}
9+
10+
env:
11+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
12+
13+
jobs:
14+
build_arch:
15+
strategy:
16+
matrix:
17+
- arch: aarch64
18+
distro: ubuntu22.04
19+
- arch: aarch64
20+
distro: bullseye
21+
22+
# See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
23+
# See: https://github.com/actions/runner-images/
24+
runs-on: ubuntu-24.04
25+
26+
env:
27+
BUILD_TYPE: ${{matrix.BUILD_TYPE}}
28+
SOURCE_DIR: ${{github.workspace}}/.cache/source
29+
TOOLS_DIR: ${{github.workspace}}/.cache/tools
30+
INSTALL_DIR: ${{github.workspace}}/.cache/install
31+
RabbitRemoteControl_VERSION: v0.0.32
32+
artifact_name: build_appimage
33+
34+
# Map the job outputs to step outputs
35+
outputs:
36+
name: ${{ env.artifact_name }}
37+
38+
steps:
39+
- name: Checkout Repository
40+
uses: actions/checkout@v4
41+
with:
42+
submodules: true
43+
44+
- name: Make directories
45+
run: |
46+
cmake -E make_directory ${{github.workspace}}/build
47+
cmake -E make_directory ${{env.SOURCE_DIR}}
48+
cmake -E make_directory ${{env.TOOLS_DIR}}
49+
cmake -E make_directory ${{env.INSTALL_DIR}}
50+
51+
- name: git clone RabbitCommon
52+
working-directory: ${{env.SOURCE_DIR}}
53+
run: |
54+
git clone https://github.com/KangLin/RabbitCommon.git
55+
56+
- uses: uraimo/run-on-arch-action@v2
57+
name: Build artifact
58+
id: build
59+
with:
60+
arch: ${{ matrix.arch }}
61+
distro: ${{ matrix.distro }}
62+
63+
# Not required, but speeds up builds
64+
githubToken: ${{secrets.GITHUB_TOKEN}}
65+
66+
# Create an artifacts directory
67+
setup: |
68+
mkdir -p "${PWD}/artifacts"
69+
70+
# Mount the artifacts directory as /artifacts in the container
71+
dockerRunArgs: |
72+
--volume "${PWD}/artifacts:/artifacts"
73+
74+
# Pass some environment variables to the container
75+
env: | # YAML, but pipe character is necessary
76+
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
77+
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
78+
79+
# The shell to run commands with in the container
80+
shell: /bin/bash
81+
82+
# Install some dependencies in the container. This speeds up builds if
83+
# you are also using githubToken. Any dependencies installed here will
84+
# be part of the container image that gets cached, so subsequent
85+
# builds don't have to re-install them. The image layer is cached
86+
# publicly in your project's package repository, so it is vital that
87+
# no secrets are present in the container state or logs.
88+
install: |
89+
case "${{ matrix.distro }}" in
90+
ubuntu*|jessie|stretch|buster|bullseye)
91+
apt-get update -q -y
92+
apt-get install -q -y git
93+
;;
94+
fedora*)
95+
dnf -y update
96+
dnf -y install git which
97+
;;
98+
alpine*)
99+
apk update
100+
apk add git
101+
;;
102+
esac
103+
104+
# Produce a binary artifact and place it in the mounted volume
105+
run: |
106+
cp $(which git) "/artifacts/${artifact_name}"
107+
echo "Produced artifact at /artifacts/${artifact_name}"
108+
109+
- name: Show the artifact
110+
# Items placed in /artifacts in the container will be in
111+
# ${PWD}/artifacts on the host.
112+
run: |
113+
ls -al "${PWD}/artifacts"

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ on:
1515
jobs:
1616
ubuntu:
1717
uses: ./.github/workflows/ubuntu.yml
18+
secrets: inherit
19+
20+
arch:
21+
uses: ./.github/workflows/arch.yml
22+
secrets: inherit
1823

1924
appimage:
2025
uses: ./.github/workflows/appimage.yml
26+
secrets: inherit
2127

2228
msvc:
2329
uses: ./.github/workflows/msvc.yml
30+
secrets: inherit
2431

2532
mingw:
2633
if: true
2734
uses: ./.github/workflows/mingw.yml
2835

2936
macos:
3037
uses: ./.github/workflows/macos.yml
38+
secrets: inherit
3139

3240
android:
3341
uses: ./.github/workflows/android.yml

.github/workflows/clang-tidy.yml.bak

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
env:
2121
BUILD_TYPE: ${{matrix.BUILD_TYPE}}
2222
SOURCE_DIR: ${{github.workspace}}/.cache/source
23-
TOOSL_DIR: ${{github.workspace}}/.cache/tools
23+
TOOLS_DIR: ${{github.workspace}}/.cache/tools
2424
INSTALL_DIR: ${{github.workspace}}/.cache/install
2525

2626
steps:
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
cmake -E make_directory ${{github.workspace}}/build
3535
cmake -E make_directory ${{env.SOURCE_DIR}}
36-
cmake -E make_directory ${{env.TOOSL_DIR}}
36+
cmake -E make_directory ${{env.TOOLS_DIR}}
3737
cmake -E make_directory ${{env.INSTALL_DIR}}
3838

3939
- name: git clone RabbitCommon

.github/workflows/doxygen.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
env:
1919
BUILD_TYPE: Release
2020
SOURCE_DIR: ${{github.workspace}}/.cache/source
21-
TOOSL_DIR: ${{github.workspace}}/.cache/tools
21+
TOOLS_DIR: ${{github.workspace}}/.cache/tools
2222
INSTALL_DIR: ${{github.workspace}}/.cache/install_ubuntu
2323
DOXYGEN_VERSION: 1.9.8
2424
artifact_name: build_doxygen
@@ -36,7 +36,7 @@ jobs:
3636
- name: make_directory
3737
run: |
3838
cmake -E make_directory ${{env.SOURCE_DIR}}
39-
cmake -E make_directory ${{env.TOOSL_DIR}}
39+
cmake -E make_directory ${{env.TOOLS_DIR}}
4040
cmake -E make_directory ${{env.INSTALL_DIR}}
4141
cmake -E make_directory ${{github.workspace}}/build
4242
@@ -45,7 +45,7 @@ jobs:
4545
id: cache-installed
4646
with:
4747
path: |
48-
${{env.TOOSL_DIR}}
48+
${{env.TOOLS_DIR}}
4949
key: install-doxygen
5050

5151
- name: git clone RabbitCommon
@@ -61,12 +61,12 @@ jobs:
6161
6262
- name: Download doxygen
6363
run: |
64-
if [ ! -d ${{env.TOOSL_DIR}}/doxygen-${{env.DOXYGEN_VERSION}} ]; then
65-
cd ${{env.TOOSL_DIR}}
64+
if [ ! -d ${{env.TOOLS_DIR}}/doxygen-${{env.DOXYGEN_VERSION}} ]; then
65+
cd ${{env.TOOLS_DIR}}
6666
wget https://www.doxygen.nl/files/doxygen-${{env.DOXYGEN_VERSION}}.linux.bin.tar.gz
6767
tar xzf doxygen-${{env.DOXYGEN_VERSION}}.linux.bin.tar.gz
6868
fi
69-
sudo cp ${{env.TOOSL_DIR}}/doxygen-${{env.DOXYGEN_VERSION}}/bin/doxygen /usr/bin/doxygen
69+
sudo cp ${{env.TOOLS_DIR}}/doxygen-${{env.DOXYGEN_VERSION}}/bin/doxygen /usr/bin/doxygen
7070
7171
- name: build doxygen
7272
working-directory: ${{github.workspace}}

.github/workflows/macos.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
matrix:
1717
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1818
BUILD_TYPE: [Release, Debug]
19-
qt_version: [6.8.1, 5.15.2, 5.12.12]
19+
qt_version: [6.8.2, 5.15.2, 5.12.12]
2020
qt_arch: [clang_64]
2121
VCPKG_TARGET_TRIPLET: [x64-osx]
2222
include:
23-
- qt_version: 6.8.1
23+
- qt_version: 6.8.2
2424
qt_modules: qtscxml qtmultimedia qtserialport qt5compat
2525

2626
- qt_version: 5.15.2
@@ -34,7 +34,7 @@ jobs:
3434
env:
3535
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
3636
SOURCE_DIR: ${{github.workspace}}/.cache/source
37-
TOOSL_DIR: ${{github.workspace}}/.cache/tools
37+
TOOLS_DIR: ${{github.workspace}}/.cache/tools
3838
INSTALL_DIR: ${{github.workspace}}/.cache/install
3939
qt_modules: ${{matrix.qt_modules}}
4040
VCPKGGITCOMMITID: 9f5925e81bbcd9c8c34cc7a8bd25e3c557b582b2
@@ -59,7 +59,7 @@ jobs:
5959
run: |
6060
cmake -E make_directory ${{github.workspace}}/build
6161
cmake -E make_directory ${{env.SOURCE_DIR}}
62-
cmake -E make_directory ${{env.TOOSL_DIR}}
62+
cmake -E make_directory ${{env.TOOLS_DIR}}
6363
cmake -E make_directory ${{env.INSTALL_DIR}}
6464
6565
- name: Cache installed
@@ -194,7 +194,7 @@ jobs:
194194
- name: Install Qt
195195
uses: jurplel/install-qt-action@v3
196196
with:
197-
dir: '${{env.TOOSL_DIR}}/qt' # optional
197+
dir: '${{env.TOOLS_DIR}}/qt' # optional
198198
version: '${{matrix.qt_version}}' # optional, default is 5.15.2
199199
arch: '${{matrix.qt_arch}}' # optional
200200
modules: '${{env.qt_modules}}' # optional
@@ -287,7 +287,7 @@ jobs:
287287
7z a RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip ./install/*
288288
289289
- name: Update configure file
290-
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.1' }}
290+
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }}
291291
working-directory: ${{github.workspace}}/build
292292
run: |
293293
${{env.SOURCE_DIR}}/RabbitCommon/Install/GenerateJsonFile.sh \
@@ -297,7 +297,7 @@ jobs:
297297
"https://github.com/KangLin/RabbitRemoteControl/releases/download/v${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip;https://sourceforge.net/projects/rabbitRabbitRemoteControl/files/v${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip"
298298
299299
- name: Update artifact
300-
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.1' }}
300+
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }}
301301
uses: actions/upload-artifact@v4
302302
with:
303303
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}

0 commit comments

Comments
 (0)