Skip to content

[feat] ci: update qt&opencv #550

[feat] ci: update qt&opencv

[feat] ci: update qt&opencv #550

Workflow file for this run

name: FastTrack-Cli_build
on:
push:
branches: [master]
env:
QT_VERSION: 6.7.2
OPENCV_VERSION: 4.10.0
OPENCV_VERSION_: 4100
jobs:
build_linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install_opencv
run: |
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install mesa-common-dev libgl1-mesa-dev libssl-dev
sudo apt-get install libxcb-*
sudo apt-get install libxkb-*
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libnss3
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
sudo apt-get install libopencv-dev
- name: install_qt6
run: |
pip install aqtinstall
python3 -m aqt install-qt -O ${{ github.workspace }}/Qt/ linux desktop ${{ env.QT_VERSION }}
echo ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/bin/ >> $GITHUB_PATH
rm ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/plugins/sqldrivers/libqsqlmimer.so
- name: build_ftcli
run: |
./run.sh cli
make clean
- name: build_appimage
run: |
wget -O deploy.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod +x deploy.AppImage
cp sh.fasttrack.fasttrackcli.desktop build_cli/
cp src/assets/fasttrack.png build_cli/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/lib/
./deploy.AppImage build_cli/fasttrack-cli -appimage -no-translations -bundle-non-qt-libs -unsupported-allow-new-glibc -qmake=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/bin/qmake6 -extra-plugins=platforms/,sqldrivers/ -exclude-libs=libgmodule-2.0.so,libmimerapi.so
mv FastTrack*.AppImage FastTrack-cli-x86_64.AppImage
- name: upload_artefact
uses: actions/upload-artifact@v2
with:
name: FastTrack-cli-x86_64.AppImage
path: ./FastTrack-cli-x86_64.AppImage
build_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install_qt6
run: |
choco uninstall mingw
pip install aqtinstall
python3 -m aqt install-qt -O ${{ github.workspace }}/Qt/ windows desktop ${{ env.QT_VERSION }} win64_mingw
python3 -m aqt install-tool -O ${{ github.workspace }}/Qt/ windows desktop tools_mingw1310
echo "${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/mingw_64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{ github.workspace }}/Qt/Tools/mingw1310_64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install_opencv
run: |
choco install wget unzip
wget https://github.com/FastTrackOrg/Windows_MinGW_64_OpenCV/releases/download/${{ env.OPENCV_VERSION }}/OpenCV_MinGW_64.zip
unzip OpenCV_MinGW_64.zip -d ${{ github.workspace }}
- name: build_ftcli
run: |
cd src/
qmake FastTrack-Cli.pro -spec win32-g++ CONFIG+=release
mingw32-make
mingw32-make clean
chmod -777 build_cli
cd build_cli/
windeployqt FastTrack-Cli.exe --no-translations # https://bugreports.qt.io/browse/QTBUG-62103?jql=status%20%3D%20Open%20AND%20text%20~%20%22windeployqt%20platform%22 and https://bugreports.qt.io/browse/QTBUG-112204
cp ..\assets\icon.ico .
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/lib*.dll .
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/opencv_videoio_ffmpeg${{ env.OPENCV_VERSION_ }}_64.dll .
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/libopencv_world${{ env.OPENCV_VERSION_ }}.dll .
- name: upload_artefact
uses: actions/upload-artifact@v2
with:
name: FastTrack-Cli
path: src/build_cli/
build_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install_qt6
run: |
pip install aqtinstall
python3 -m aqt install-qt -O ${{ github.workspace }}/Qt/ mac desktop ${{ env.QT_VERSION }}
echo ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/bin/ >> $GITHUB_PATH
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlmimer.*
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlodbc.*
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlpsql.*
- name: Set up Homebrew #https://github.com/Homebrew/homebrew-cask/issues/150323
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: install_opencv
run: |
rm -f /usr/local/bin/2to3*
rm -f /usr/local/bin/idle3*
rm -f /usr/local/bin/pydoc3*
rm -f /usr/local/bin/python3*
rm -f /usr/local/opt/go/bin/go*
rm -f /usr/local/bin/go*
rm -rf /usr/local/lib/node*
brew update -q -f
brew upgrade -q -f
brew install pkg-config
brew install openssl
brew install libiodbc
brew tap FastTrackOrg/fasttrack
brew install --build-from-source FastTrackOrg/fasttrack/opencv
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
- name: build_ftcli
run: |
qmake CONFIG+=release src/FastTrack-Cli.pro
make
cd build_cli/
macdeployqt FastTrack-cli.app -always-overwrite
wget https://raw.githubusercontent.com/tamlok/macdeployqtfix/master/macdeployqtfix.py
python macdeployqtfix.py FastTrack-cli.app/Contents/MacOS/FastTrack-cli ../../Qt/${{ env.QT_VERSION }}/
hdiutil create -volname FastTrack-cli -srcfolder FastTrack-cli.app -ov -format UDZO FastTrack-cli.dmg
- name: upload_artefact
uses: actions/upload-artifact@v2
with:
name: FastTrack-cli.dmg
path: ./build_cli/FastTrack-cli.dmg
upload_builds:
needs: [build_linux, build_win, build_mac]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: create_dir
run: |
mkdir ./tmp/
- name: install_SSH_key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.KEY }}
known_hosts: ${{ secrets.HOST }}
- uses: actions/download-artifact@v2
with:
path: ./tmp/
- name: upload_builds_to_server
run: |
cd tmp/FastTrack-Cli/
zip -r FastTrack-Cli.zip ./*
cd ..
mkdir rel/
mv FastTrack-Cli/FastTrack-Cli.zip ./rel
rm -r ./FastTrack-Cli
cp FastTrack*/* ./rel
rsync ./rel/* ${{ secrets.USER }}@${{ secrets.ADDRESS }}:${{ secrets.PATH }}