Skip to content

Merge pull request #28 from QQxiaoming/dependabot/github_actions/acti… #111

Merge pull request #28 from QQxiaoming/dependabot/github_actions/acti…

Merge pull request #28 from QQxiaoming/dependabot/github_actions/acti… #111

Workflow file for this run

name: linux
on:
push:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_zh_CN.md'
- 'DEVELOPNOTE.md'
- '.readthedocs.yaml'
tags:
- V**
pull_request:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_zh_CN.md'
- 'DEVELOPNOTE.md'
- '.readthedocs.yaml'
workflow_dispatch:
jobs:
ubuntu-2004:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v3.3.0
with:
version: '6.5.3'
aqtversion: ==3.1.7
- name: Setup OpenCV
uses: Dovyski/setup-opencv-action@v1.1
with:
opencv-version: 4.0.0
opencv-extra-modules: false
WITH_TBB: OFF
WITH_IPP: OFF
- name: Install prerequisites
run: |
sudo apt update
sudo apt install -y make gcc patchelf chrpath qt5-default
- name: Build all
run: |
git fetch --tags --force
sed -i 's/--long --dirty/--long/g' ./tools/generate_info.sh
sed -i 's/QT_DIR=\/opt\/Qt6.2.0\/6.2.0\/gcc_64/QT_DIR=$(cd "$(dirname "$0")";pwd)\/..\/Qt\/6.2.0\/gcc_64/g' build_deb.sh
sed -i 's/\/home\/xiaoming\/Desktop\/opencv/\/usr\/local/g' build_deb.sh
sed -i 's/\/home\/xiaoming\/Desktop\/opencv/\/usr\/local/g' partform_unix.pri
./build_deb.sh
- name: Upload build asserts
uses: actions/upload-artifact@v4.3.1
with:
name: YUVviewer_Ubuntu2004
path: |
./dpkg/*.deb
- name: Run tests
run: |
if ls ./dpkg | grep ".deb" ; then echo "Pass"; else echo "Failed" && exit 1; fi;
timeout --foreground -s SIGKILL 20s ./dpkg/YUVviewer_Linux_*/opt/YUVviewer/YUVviewer --version > >(tee run.log) || {
if cat run.log | grep "YUVviewer" ; then echo "Pass" && exit 0; else echo "Failed" && exit 1; fi;
}