1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/kl222-SerialPortAssistant

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
ubuntu.yml 5.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Kang Lin Отправлено 13.09.2024 05:42 a49c57d
name: build_ubuntu
on:
workflow_call:
outputs:
name:
description: "The artifact name"
value: ${{ jobs.build_ubuntu.outputs.name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build_ubuntu:
strategy:
matrix:
BUILD_TYPE: [Release]
# See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
# See: https://github.com/actions/runner-images/
runs-on: ubuntu-latest
env:
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_ubuntu_${{matrix.BUILD_TYPE}}
SerialPortAssistant_VERSION: 0.5.26
artifact_name: build_ubuntu
# Map the job outputs to step outputs
outputs:
name: ${{ env.artifact_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
- name: Make directories
run: |
cmake -E make_directory ${{github.workspace}}/build
cmake -E make_directory ${{env.SOURCE_DIR}}
cmake -E make_directory ${{env.TOOSL_DIR}}
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Install apt packages
run: |
sudo apt update
sudo apt upgrade
sudo apt install -y -q cmake build-essential xvfb xpra \
libglu1-mesa-dev libpulse-mainloop-glib0 \
cmake debhelper fakeroot \
qt6-tools-dev qt6-tools-dev-tools qt6-base-dev qt6-base-dev-tools \
qt6-l10n-tools qt6-translations-l10n qt6-scxml-dev \
qt6-webengine-dev qt6-webengine-dev-tools libqt6serialport6-dev \
libxkbcommon-dev libxkbcommon-x11-dev xorg-dev libx11-xcb-dev \
libx11-dev libxfixes-dev \
libcmark-dev cmark
- name: Cache installed
uses: actions/cache@v3
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
key: cache-installed-ubuntu
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: |
git clone https://github.com/KangLin/RabbitCommon.git
- name: build SerialPortAssistant
env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
PKG_CONFIG_PATH: ${{env.INSTALL_DIR}}/lib/pkgconfig
run: |
cd ${{github.workspace}}
./build_debpackage.sh
cp ../serialportassistant_${{env.SerialPortAssistant_VERSION}}_amd64.deb serialportassistant_${{env.SerialPortAssistant_VERSION}}_amd64.deb
- name: update configure file
working-directory: ${{github.workspace}}
if: ${{ matrix.BUILD_TYPE == 'Release' }}
run: |
sudo Xvfb :99 -ac &
export DISPLAY=:99.0
sudo apt install ./serialportassistant_${{env.SerialPortAssistant_VERSION}}_amd64.deb
echo "test ......"
./test/test_linux.sh
echo "Update configure file ......"
MD5=`md5sum serialportassistant_${{env.SerialPortAssistant_VERSION}}_amd64.deb | awk '{print $1}'`
export QT_XCB_GL_INTEGRATION=none
ulimit -c unlimited
echo "# sudo sysctl -w kernel.core_pattern=core"
sudo sysctl -w kernel.core_pattern=${{github.workspace}}/core
/opt/SerialPortAssistant/bin/SerialPortAssistant.sh \
-f "`pwd`/update_ubuntu.json" \
--foc 1 \
--md5 ${MD5} \
-m "${{env.SerialPortAssistant_VERSION}}" \
-p serialportassistant_${{env.SerialPortAssistant_VERSION}}_amd64.deb \
-u "https://github.com/KangLin/SerialPortAssistant/releases/download/v${{env.SerialPortAssistant_VERSION}}/serialportassistant_${{env.SerialPortAssistant_VERSION}}_amd64.deb;https://sourceforge.net/projects/SerialPortAssistant/files/v${{env.SerialPortAssistant_VERSION}}/serialportassistant_${{env.SerialPortAssistant_VERSION}}_amd64.deb"
- name: Update version configure file
if: ${{ matrix.BUILD_TYPE == 'Release'}}
working-directory: ${{github.workspace}}
run: |
sudo Xvfb :99 -ac &
export DISPLAY=:99.0
/opt/SerialPortAssistant/bin/SerialPortAssistant.sh \
-f "${{github.workspace}}/version.json" \
--foc 0 \
--pv ${{env.SerialPortAssistant_VERSION}}
- name: dump core
if: false
working-directory: ${{github.workspace}}
run: |
gdb /opt/SerialPortAssistant/bin/SerialPortAssistant core
#- name: Generate appimage
# run: |
# cd debian/serialportassistant/opt
# URL_LINUXDEPLOYQT=https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
# wget -c -nv ${URL_LINUXDEPLOYQT} -O linuxdeployqt.AppImage
# chmod a+x linuxdeployqt.AppImage
# cd SerialPortAssistant
# ../linuxdeployqt.AppImage share/applications/*.desktop \
# -qmake=qmake -appimage -verbose
# cp SerialPort_Assistant-${VERSION}-x86_64.AppImage ${{github.workspace}}/.
- name: update
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: |
${{github.workspace}}/serialportassistant_${{env.SerialPortAssistant_VERSION}}_amd64.deb
${{github.workspace}}/update_ubuntu.json
${{github.workspace}}/version.json
1
https://api.gitlife.ru/oschina-mirror/kl222-SerialPortAssistant.git
git@api.gitlife.ru:oschina-mirror/kl222-SerialPortAssistant.git
oschina-mirror
kl222-SerialPortAssistant
kl222-SerialPortAssistant
master