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 20, 2024
1 parent 0507faa commit a4ed3a7
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 29 deletions.
20 changes: 11 additions & 9 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 All @@ -69,9 +70,9 @@ jobs:
choco uninstall mingw
pip install aqtinstall
python3 -m aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ windows desktop ${{ env.QT_VERSION }} win64_mingw
python3 -m aqt install-tool -O ${{ github.workspace }}/Qt/ windows desktop tools_mingw90
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/mingw1120_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
Expand All @@ -87,7 +88,7 @@ jobs:
cp FastTrack.exe FastTrack
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/lib*.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 +110,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 +129,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 +141,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
20 changes: 11 additions & 9 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 All @@ -63,9 +64,9 @@ jobs:
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_mingw90
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/mingw1120_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
Expand All @@ -81,7 +82,7 @@ jobs:
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/libgomp-1.dll .
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
Expand All @@ -102,6 +103,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 +122,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 +132,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
11 changes: 5 additions & 6 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 @@ -49,9 +49,9 @@ jobs:
choco uninstall mingw
pip install aqtinstall
python3 -m aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ windows desktop ${{ env.QT_VERSION }} win64_mingw
python3 -m aqt install-tool -O ${{ github.workspace }}/Qt/ windows desktop tools_mingw90
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/mingw1120_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 cmake git
Expand All @@ -62,14 +62,13 @@ 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/ ../
cmake --build . --config Release
cmake --install .
- name: install_deps
shell: cmd
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install numpy pandas pytest
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
5 changes: 3 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ if [ "$1" = "unix" ]; then
python -m pytest test/accuracyTest.py
fi
if [ "$1" = "win" ]; then
qmake FastTrack.pro -spec win32-g++ CONFIG+="NO_WEB"
qmake6 FastTrack.pro -spec win32-g++ CONFIG+="NO_WEB"
mingw32-make clean
mingw32-make check
mingw32-make
mingw32-make check # Not working with latest Qt and mingw, mixing path
python -m pytest test/accuracyTest.py
fi
if [ "$1" = "" ]; then
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 a4ed3a7

Please sign in to comment.