Skip to content

Log: rename RabbitRemoteControl_logqt.conf to RabbitRemoteControl_log… #1778

Log: rename RabbitRemoteControl_logqt.conf to RabbitRemoteControl_log…

Log: rename RabbitRemoteControl_logqt.conf to RabbitRemoteControl_log… #1778

Workflow file for this run

name: ubuntu
on: [push]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
build:
strategy:
matrix:
os: [Ubuntu-22.04, Ubuntu-20.04, Ubuntu-18.04]
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: [Release, Debug]
runs-on: ${{matrix.os}}
env:
BUILD_TYPE: ${{matrix.BUILD_TYPE}}
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}_${{matrix.os}}
RabbitRemoteControl_VERSION: 0.0.27
steps:
- name: core dump infomations
if: false
run: |
echo "# ulimit -a"
ulimit -a
echo "# cat /proc/sys/kernel/core_pattern"
cat /proc/sys/kernel/core_pattern
echo "# ulimit -c unlimited"
ulimit -c unlimited
echo "# sudo sysctl -w kernel.core_pattern=core"
sudo sysctl -w kernel.core_pattern=${{github.workspace}}/core
echo "# ulimit -a"
ulimit -a
echo "# cat /proc/sys/kernel/core_pattern"
cat /proc/sys/kernel/core_pattern
# See: https://www.cnblogs.com/cong-wang/p/15026524.html
# Naming of core dump files
# By default, a core dump file is named core, but the /proc/sys/kernel/core_pattern file (since Linux 2.6 and
# 2.4.21) can be set to define a template that is used to name core dump files. The template can contain %
# specifiers which are substituted by the following values when a core file is created:
#
# %% a single % character
# %c core file size soft resource limit of crashing process (since Linux 2.6.24)
# %d dump mode—same as value returned by prctl(2) PR_GET_DUMPABLE (since Linux 3.7)
# %e executable filename (without path prefix)
# %E pathname of executable, with slashes ('/') replaced by exclamation marks ('!') (since Linux 3.0).
# %g (numeric) real GID of dumped process
# %h hostname (same as nodename returned by uname(2))
# %i TID of thread that triggered core dump, as seen in the PID namespace in which the thread resides
# (since Linux 3.18)
# %I TID of thread that triggered core dump, as seen in the initial PID namespace (since Linux 3.18)
# %p PID of dumped process, as seen in the PID namespace in which the process resides
# %P PID of dumped process, as seen in the initial PID namespace (since Linux 3.12)
# %s number of signal causing dump
# %t time of dump, expressed as seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)
# %u (numeric) real UID of dumped process
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: make_directory
run: |
cmake -E make_directory ${{env.SOURCE_DIR}}
cmake -E make_directory ${{env.TOOSL_DIR}}
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: git clone https://github.com/KangLin/RabbitCommon.git
# - name: apt helper action
# uses: ryankurte/action-apt@v0.3.0
# with:
# arch: amd64
# packages: xvfb xpra libglu1-mesa-dev libpulse-mainloop-glib0 cmake build-essential libusb-1.0-0-dev libvncserver-dev libpixman-1-dev libssh-dev libtelnet-dev libqxmpp-dev debhelper dh-systemd fakeroot graphviz qttools5-dev qttools5-dev-tools qtbase5-dev qtbase5-dev-tools qtmultimedia5-dev qtlocation5-dev libqt5svg5-dev libutf8proc-dev libqtermwidget5-0-dev libpam0g-dev libxkbcommon-dev libxkbcommon-x11-dev xorg-dev libx11-xcb-dev libx11-dev libxfixes-dev qtwebengine5-dev gdb
- name: apt helper action
run: |
sudo apt-get update -y \
&& sudo apt-get upgrade -y \
&& sudo apt-get install -y xvfb xpra \
cmake build-essential \
debhelper fakeroot graphviz \
libglu1-mesa-dev libpulse-mainloop-glib0 \
libusb-1.0-0-dev libvncserver-dev libpixman-1-dev libssh-dev \
libtelnet-dev libqxmpp-dev libfuse-dev \
qttools5-dev qttools5-dev-tools qtbase5-dev qtbase5-dev-tools \
qtmultimedia5-dev qtlocation5-dev libqt5svg5-dev \
qtwebengine5-dev libqtermwidget5-0-dev libqt5serialport5-dev\
libutf8proc-dev libpam0g-dev \
libxkbcommon-dev libxkbcommon-x11-dev xorg-dev libx11-xcb-dev \
libx11-dev libxfixes-dev
#freerdp2-dev
- name: Cache installed
uses: actions/cache@v2
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
key: cache-installed-ubuntu-${{matrix.os}}-${{matrix.BUILD_TYPE}}_2023_03_02
- name: build FreeRDP
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/FreeRDP3 ]; then
git clone https://github.com/FreeRDP/FreeRDP.git
# git clone https://github.com/KangLin/FreeRDP.git
cd FreeRDP
git checkout -b b7b46b812395cf3a67b1e36f0fbf1386f4372443 b7b46b812395cf3a67b1e36f0fbf1386f4372443
git submodule update --init --recursive
cmake -E make_directory build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX="${{env.INSTALL_DIR}}" \
-DWITH_SERVER=ON \
-DWITH_CLIENT_SDL=OFF \
-DWITH_KRB5=OFF \
-DWITH_MANPAGES=OFF
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install/strip
fi
- name: build RabbitVNC
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/RabbitVNC ]; then
git clone https://github.com/KangLin/RabbitVNC.git
cd ${{env.SOURCE_DIR}}/RabbitVNC
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF
cmake --build . --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install/strip
fi
- name: build tigervnc
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/tigervnc ]; then
git clone https://github.com/KangLin/tigervnc.git
cd ${{env.SOURCE_DIR}}/tigervnc
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF
cmake --build . --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install/strip
fi
- name: build libdatachannel
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/LibDataChannel ]; then
git clone -b v0.17.8 https://github.com/paullouisageneau/libdatachannel.git
cd libdatachannel
git submodule update --init --recursive
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }}
cmake --build . --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install/strip
fi
# - name: build log4qt
# working-directory: ${{env.SOURCE_DIR}}
# env:
# QT_ROOT: /usr/lib/`uname -m`-linux-gnu/qt5
# run: |
# if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/Log4Qt ]; then
# git clone https://github.com/KangLin/Log4Qt.git
# cd Log4Qt
# cmake -E make_directory build
# cd build
# cmake .. -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
# -DQT_DIR=${{env.QT_ROOT}}/lib/cmake/Qt5 \
# -DQt5_DIR=${{env.QT_ROOT}}/lib/cmake/Qt5 \
# -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} \
# -DCMAKE_PREFIX_PATH=${{env.QT_ROOT}} \
# -DLOG4QT_ENABLE_EXAMPLES=OFF \
# -DLOG4QT_ENABLE_TESTS=OFF
# cmake --build . --config ${{matrix.BUILD_TYPE}}
# cmake --build . --config ${{matrix.BUILD_TYPE}} --target install/strip
# fi
- name: build QtService
working-directory: ${{env.SOURCE_DIR}}
env:
QT_ROOT: /usr/lib/`uname -m`-linux-gnu/qt5
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/QtService ]; then
git clone https://github.com/KangLin/qt-solutions.git
cd qt-solutions/qtservice
git submodule update --init --recursive
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DQT_DIR=${{env.QT_ROOT}}/lib/cmake/Qt5 \
-DQt5_DIR=${{env.QT_ROOT}}/lib/cmake/Qt5
cmake --build . --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install/strip
fi
- name: build_debpackage.sh
working-directory: ${{github.workspace}}
env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
RabbitVNC_DIR: ${{ env.INSTALL_DIR }}/lib/cmake/RabbitVNC
LibDataChannel_DIR: ${{ env.INSTALL_DIR }}/lib/cmake/LibDataChannel
QtService_DIR: ${{ env.INSTALL_DIR }}/lib/cmake/QtService
FreeRDP_DIR: ${{env.INSTALL_DIR}}/lib/cmake/FreeRDP3
FreeRDP-Client_DIR: ${{env.INSTALL_DIR}}/lib/cmake/FreeRDP-Client3
WinPR_DIR: ${{env.INSTALL_DIR}}/lib/cmake/WinPR3
FreeRDP-Shadow_DIR: ${{env.INSTALL_DIR}}/lib/cmake/FreeRDP-Shadow3
FreeRDP-Server_DIR: ${{env.INSTALL_DIR}}/lib/cmake/FreeRDP-Server3
run: |
if [ ${{matrix.BUILD_TYPE}} == 'Release' ]; then
export BUILD_VIEWER_TERMINAL=OFF
else
export tigervnc_DIR=${{env.INSTALL_DIR}}/lib/cmake/tigervnc
fi
./build_debpackage.sh /usr/lib/`uname -m`-linux-gnu/qt5
cp ../rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64.deb rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{matrix.os}}.deb
md5sum rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{matrix.os}}.deb > rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{matrix.os}}.deb.md5sum
- name: update xml file
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.os == 'Ubuntu-20.04'}}
working-directory: ${{github.workspace}}
#continue-on-error: true
run: |
#sudo apt update -y -qq
#sudo apt-get install -y -qq xvfb xpra
sudo Xvfb :99 -ac &
export DISPLAY=:99.0
echo "Install rabbit remote control ......"
sudo apt install ./rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{matrix.os}}.deb
#echo "ls -l /opt/RabbitRemoteControl/bin/"
#ls -l /opt/RabbitRemoteControl/bin/
echo "Update update_linux.xml ......"
export QT_XCB_GL_INTEGRATION=none
MD5SUM=`cat rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{matrix.os}}.deb.md5sum|awk '{print $1}'`
echo "MD5SUM rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{ matrix.os }}.deb: ${MD5SUM}"
#ulimit -c unlimited
#echo "# sudo sysctl -w kernel.core_pattern=core"
#sudo sysctl -w kernel.core_pattern=${{github.workspace}}/core
/opt/RabbitRemoteControl/bin/RabbitRemoteControl.sh \
-f "`pwd`/update_linux.xml" \
-u "https://github.com/KangLin/RabbitRemoteControl/releases/download/${{env.RabbitRemoteControl_VERSION}}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{matrix.os}}.deb;https://sourceforge.net/projects/rabbitremotecontrol/files/${{env.RabbitRemoteControl_VERSION}}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{matrix.os}}.deb" \
--md5 "${MD5SUM}" \
--pf rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{ matrix.os }}.deb \
-m "v${{env.RabbitRemoteControl_VERSION}}"
- name: dump core
if: false
working-directory: ${{github.workspace}}
run: |
gdb /opt/RabbitRemoteControl/bin/RabbitRemoteControlApp core
- name: update
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v2
with:
name: rabbitremotecontrol_${{matrix.os}}
path: |
rabbitremotecontrol_*.deb
update_linux.xml
- name: Upload To Github Release
if: ${{ matrix.BUILD_TYPE == 'Release' && startsWith(github.ref, 'refs/tags/') }}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
prerelease: true
body: |
[:cn: 修改日志](ChangeLog_zh_CN.md) [:cn: 说明](README_zh_CN.md)
[:us: Change log](ChangeLog.md) [:us: README](README.md)
files: |
${{github.workspace}}/update_linux.xml
${{github.workspace}}/rabbitremotecontrol_*.deb
${{github.workspace}}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_amd64_${{matrix.os}}.deb.md5sum
#- name: Release
# uses: fnkr/github-action-ghr@v1
# if: startsWith(github.ref, 'refs/tags/')
# env:
# GHR_COMPRESS: xz
# GHR_PATH: ${{github.workspace}}/rabbitremotecontrol_*.deb
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload To Github Release
# # You may pin to the exact commit or the version.
# # uses: xresloader/upload-to-github-release@3ad14478ee4fb9bd65e84c6d496a7d6862892f43
# uses: xresloader/upload-to-github-release@v1.3.2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# # The files or file patterns to upload. You can upload multiple files by split them by semicolon. You can use the glob pattern to find the files.
# file: ${{github.workspace}}/rabbitremotecontrol_*.deb;${{github.workspace}}/update_linux.xml # default is
# # The files or file patterns to delete before uploading new files. You can delete multiple files by split them by semicolon. You can use the glob pattern to find the files.
# #delete_file: # optional, default is
# # If you need to overwrite existing files, add overwrite: true to the with.
# overwrite: true # optional, default is false
# # The resultant deployment is a draft Release that only repository collaborators can see. This gives you an opportunity to examine and edit the draft release.
# draft: true # optional, default is true
# # The resultant deployment is a Prerelease. This gives you an opportunity to examine and edit the prerelease.
# prerelease: true # optional, default is false
# # With tags: true, your Releases deployment will trigger if and only if the build is a tagged build.
# tags: true # optional, default is false
# # Only work on these branches(splited by semicolon), set to nothing to accept all branches.
# branches: master # optional, default is
# # With verbose: true, be verbose.
# verbose: true # optional, default is false
# # Set custom tag name.
# #tag_name: 'v${{env.RabbitRemoteControl_VERSION}}'
# # If try to update latest release.
# #update_latest_release: true # optional, default is false
# if: ${{ matrix.BUILD_TYPE == 'Release' && startsWith(github.ref, 'refs/tags/') }}