Skip to content

Commit

Permalink
test:update test case
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Aug 15, 2023
1 parent 72069af commit 98d2e8a
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 4 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/test_archlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: test_archlinux

on:
push:
branches: [ test_archlinux ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_zh_CN.md'
- 'DEVELOPNOTE.md'
- '.readthedocs.yaml'
pull_request:
branches: [ test_archlinux ]
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@v3

- name: Install Qt
uses: jurplel/[email protected]
with:
version: '6.2.0'

- name: Setup OpenCV
uses: Dovyski/[email protected]
with:
opencv-version: 4.0.0
opencv-extra-modules: false

- 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
git describe --always --long --dirty --abbrev=10 --tags | awk '{print "\""$0"\""}' > git_tag.inc
sed -i 's/git_tag.inc/git_tag.ci.inc/g' YUVviewer.pro
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
- uses: addnab/docker-run-action@v3
with:
image: m0rf30/arch-yay:latest
options: -v ${{ github.workspace }}:/work
run: |
yay -Syu --noconfirm gdb
yay -Syu --noconfirm yuvviewer-bin
echo "test ldd yuvviewer E"
ldd /opt/YUVviewer/YUVviewer
echo "test ldd yuvviewer X"
echo ".................................................."
echo "test run yuvviewer E"
echo "run" > ~/.gdbinit
/opt/YUVviewer/YUVviewer --version
cp -r /work/out_arch/opt/YUVviewer/YUVviewer /opt/YUVviewer/YUVviewer
ldd /work/out_arch/opt/YUVviewer/YUVviewer
ls /work
ls /work/out_arch
ls /work/out_arch/opt
ls /work/out_arch/opt/YUVviewer
/opt/YUVviewer/YUVviewer --version
echo "test run yuvviewer X"
- name: Upload build asserts
uses: actions/[email protected]
with:
name: out_arch
path: |
./out_arch
7 changes: 4 additions & 3 deletions build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ YUVVIEWER_VERSION="V"$YUVVIEWER_MAJARVERSION$YUVVIEWER_SUBVERSION$YUVVIEWER_REVI
# 编译
rm -rf .qmake.stash Makefile
lrelease ./YUVviewer.pro
qmake ./YUVviewer.pro -spec linux-g++ CONFIG+=qtquickcompiler
qmake ./YUVviewer.pro -spec linux-g++ CONFIG+=qtquickcompiler CONFIG+=debug
make clean
make -j8
# clean打包目录
Expand All @@ -33,7 +33,7 @@ rm -f ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64.deb
cp -r ./dpkg/YUVviewer ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64
# 使用linuxdeployqt拷贝依赖so库到打包目录
export QMAKE=$QT_DIR/bin/qmake
./tools/linuxdeploy-x86_64.AppImage --executable=./build_release/out/YUVviewer --appdir=./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/opt --plugin=qt
./tools/linuxdeploy-x86_64.AppImage --executable=./build_debug/out/YUVviewer --appdir=./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/opt --plugin=qt
rm -rf ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/opt/apprun-hooks
mv ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/opt/usr ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/opt/YUVviewer
mv ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/opt/YUVviewer/bin/YUVviewer ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/opt/YUVviewer/YUVviewer
Expand All @@ -52,6 +52,7 @@ InstalledSize=$SIZE
sed -i "s/#SIZE#/$InstalledSize/g" ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/DEBIAN/control
chmod 755 ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/* -R
# 打包
dpkg -b ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64 ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64.deb
mkdir out_arch
cp -r ./dpkg/YUVviewer_Linux_"$YUVVIEWER_VERSION"_x86_64/* ./out_arch
echo build success!
###############################################################################
1 change: 0 additions & 1 deletion src/YUVviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include <QApplication>
#include <QScreen>
#include <QMessageBox>
Expand Down

0 comments on commit 98d2e8a

Please sign in to comment.