Skip to content

Commit

Permalink
[feat] ci: update qt&opencv
Browse files Browse the repository at this point in the history
  • Loading branch information
bgallois committed Aug 19, 2024
1 parent 0507faa commit 72f3089
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 18 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
branches: [master]

env:
QT_VERSION: 6.5.2
OPENCV_VERSION: 4.8.0
OPENCV_VERSION_: 480
QT_VERSION: 6.7.2
OPENCV_VERSION: 4.10.0
OPENCV_VERSION_: 4100

jobs:
build_linux:
Expand All @@ -32,6 +32,7 @@ jobs:
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_ft
run: |
./run.sh ci
Expand All @@ -45,7 +46,7 @@ jobs:
cp fasttrack appdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/lib/
chmod +x deploy.AppImage
./deploy.AppImage appdir/fasttrack -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
./deploy.AppImage appdir/fasttrack -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
mkdir -p appdir/usr/share/fasttrack/
cp *.qm appdir/usr/share/fasttrack
wget -O tool.AppImage https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
Expand Down Expand Up @@ -88,6 +89,8 @@ jobs:
windeployqt FastTrack/FastTrack.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 FastTrack
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/libgomp-1.dll FastTrack
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/libgcc_s_seh*.dll FastTrack
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/libstd*.dll FastTrack
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/opencv_videoio_ffmpeg${{ env.OPENCV_VERSION_ }}_64.dll FastTrack
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/libopencv_world${{ env.OPENCV_VERSION_ }}.dll FastTrack
cp *.qm FastTrack
Expand All @@ -109,6 +112,9 @@ jobs:
pip install aqtinstall
python3 -m aqt install-qt -m qtcharts -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
Expand All @@ -125,7 +131,6 @@ jobs:
brew upgrade -q -f
brew install pkg-config
brew install openssl
brew unlink unixodbc
brew install libiodbc
brew tap FastTrackOrg/fasttrack
brew install --build-from-source FastTrackOrg/fasttrack/opencv
Expand All @@ -138,7 +143,6 @@ jobs:
macdeployqt FastTrack.app -always-overwrite
wget https://raw.githubusercontent.com/tamlok/macdeployqtfix/master/macdeployqtfix.py
cp *.qm FastTrack.app/Contents/Resources/
cp /usr/local/lib/libsharp* FastTrack.app/Contents/Frameworks
python macdeployqtfix.py FastTrack.app/Contents/MacOS/FastTrack ../../Qt/${{ env.QT_VERSION }}/
hdiutil create -volname FastTrack -srcfolder FastTrack.app -ov -format UDZO FastTrack.dmg
- name: upload_artefact
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/build_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
branches: [master]

env:
QT_VERSION: 6.5.2
OPENCV_VERSION: 4.8.0
OPENCV_VERSION_: 480
QT_VERSION: 6.7.2
OPENCV_VERSION: 4.10.0
OPENCV_VERSION_: 4100

jobs:
build_linux:
Expand All @@ -32,6 +32,7 @@ jobs:
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
Expand All @@ -43,7 +44,7 @@ jobs:
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
./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
Expand Down Expand Up @@ -82,6 +83,8 @@ jobs:
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/libgomp-1.dll .
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/libgcc_s_seh*.dll .
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/libstd*.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
Expand All @@ -102,6 +105,9 @@ jobs:
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
Expand All @@ -118,7 +124,6 @@ jobs:
brew upgrade -q -f
brew install pkg-config
brew install openssl
brew unlink unixodbc
brew install libiodbc
brew tap FastTrackOrg/fasttrack
brew install --build-from-source FastTrackOrg/fasttrack/opencv
Expand All @@ -129,7 +134,6 @@ jobs:
make
cd build_cli/
macdeployqt FastTrack-cli.app -always-overwrite
cp /usr/local/lib/libsharp* FastTrack-cli.app/Contents/Frameworks
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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches:
- master
env:
QT_VERSION: 6.5.2
OPENCV_VERSION: 4.8.0
QT_VERSION: 6.7.2
OPENCV_VERSION: 4.10.0

jobs:
test_linux:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
run: |
git clone https://github.com/google/googletest
cd googletest
git checkout release-1.11.0
git checkout v1.15.2
mkdir build
cd build
cmake -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX:PATH=./install/ ../
Expand Down
2 changes: 1 addition & 1 deletion src/FastTrack-Cli.pro
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ win32 {
CONFIG += c++2a
QMAKE_CXXFLAGS += -O3
CONFIG += console
LIBS += -L"$$PWD/../OpenCV_MinGW_64/lib" -lopencv_world480
LIBS += -L"$$PWD/../OpenCV_MinGW_64/lib" -lopencv_world4100
INCLUDEPATH += "$$PWD/../OpenCV_MinGW_64/include"
}

Expand Down
2 changes: 1 addition & 1 deletion src/FastTrack.pro
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ win32 {
TARGET = FastTrack
CONFIG += c++2a
QMAKE_CXXFLAGS += -O3
LIBS += -L"$$PWD/../OpenCV_MinGW_64/lib" -lopencv_world480
LIBS += -L"$$PWD/../OpenCV_MinGW_64/lib" -lopencv_world4100
INCLUDEPATH += "$$PWD/../OpenCV_MinGW_64/include"
}

Expand Down
2 changes: 1 addition & 1 deletion test/Test.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ unix:macx {
win32 {
CONFIG += c++2a
QMAKE_CXXFLAGS += -O3 -g
LIBS += -L"$$PWD/../OpenCV_MinGW_64/bin" -lopencv_world480
LIBS += -L"$$PWD/../OpenCV_MinGW_64/bin" -lopencv_world4100
INCLUDEPATH += "$$PWD/../OpenCV_MinGW_64/include"
LIBS += -L"$$PWD/../googletest/build/install/lib" -lgtest -lgtest_main
INCLUDEPATH += "$$PWD/../googletest/build/install/include/"
Expand Down
2 changes: 2 additions & 0 deletions test/trackingTest.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <QCoreApplication>
#include <QDir>
#include <QFile>
#include <QHash>
Expand Down Expand Up @@ -914,5 +915,6 @@ TEST_F(DataTest, info) {

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
QCoreApplication app(argc, argv);
return RUN_ALL_TESTS();
}

0 comments on commit 72f3089

Please sign in to comment.