Skip to content

Commit f54724a

Browse files
committed
[feat] global: add packaging tests
1 parent 6630ef6 commit f54724a

3 files changed

Lines changed: 83 additions & 10 deletions

File tree

.github/workflows/build_linux.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,19 @@ jobs:
5757
with:
5858
name: FastTrack-Cli
5959
path: ./build/bin/fasttrack-cli.run
60+
61+
test_bundle:
62+
runs-on: ubuntu-latest
63+
needs: build_linux
64+
steps:
65+
- name: download artifact
66+
uses: actions/download-artifact@v4
67+
with:
68+
name: FastTrack-Cli
69+
path: FastTrack-Cli
70+
71+
- name: Run FastTrack executable
72+
run: |
73+
cd FastTrack-Cli
74+
chmod +x fasttrack-cli.run
75+
./fasttrack-cli.run -- --help

.github/workflows/build_mac.yml

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ jobs:
1414
- uses: actions/setup-python@v2
1515
with:
1616
python-version: '3.8'
17+
- name: Set up Homebrew #https://github.com/Homebrew/homebrew-cask/issues/150323
18+
id: set-up-homebrew
19+
uses: Homebrew/actions/setup-homebrew@master
1720
- name: install_qt
1821
run: |
19-
pip install aqtinstall
20-
python3 -m aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ mac desktop ${{ env.QT_VERSION }}
22+
brew install aqtinstall
23+
aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ mac desktop ${{ env.QT_VERSION }}
2124
echo ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/bin/ >> $GITHUB_PATH
2225
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlmimer.*
2326
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlodbc.*
2427
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlpsql.*
25-
- name: Set up Homebrew #https://github.com/Homebrew/homebrew-cask/issues/150323
26-
id: set-up-homebrew
27-
uses: Homebrew/actions/setup-homebrew@master
2828
- name: install_opencv
2929
run: |
3030
rm -f /usr/local/bin/2to3*
@@ -38,9 +38,27 @@ jobs:
3838
brew upgrade -q -f
3939
brew install pkg-config
4040
brew install openssl
41-
brew install libiodbc
4241
brew install opencv
42+
brew uninstall --ignore-dependencies qt
4343
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
44+
- name: remove_MimerSQL_plugin
45+
run: |
46+
QT_DIR=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos
47+
rm -f $QT_DIR/plugins/sqldrivers/libqsqlmimer.so
48+
rm -f $QT_DIR/lib/cmake/Qt6Sql/Qt6QMimerSQLDriverPlugin*.cmake
49+
sed -i '/QMimerSQLDriverPlugin/d' $QT_DIR/lib/cmake/Qt6Sql/Qt6SqlPlugins.cmake || true
50+
- name: remove_ODBCSQL_plugin
51+
run: |
52+
QT_DIR=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos
53+
rm -f $QT_DIR/plugins/sqldrivers/libqsqlodbc.so
54+
rm -f $QT_DIR/lib/cmake/Qt6Sql/Qt6QODBCDriverPlugin*.cmake
55+
sed -i '/Qt6QODBCDriverPlugin/d' $QT_DIR/lib/cmake/Qt6Sql/Qt6SqlPlugins.cmake || true
56+
- name: remove_QPSQL_plugin
57+
run: |
58+
QT_DIR=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos
59+
rm -f $QT_DIR/plugins/sqldrivers/libqsqlpsql.so
60+
rm -f $QT_DIR/lib/cmake/Qt6Sql/Qt6QPSQLDriverPlugin*.cmake
61+
sed -i '/Qt6QPSQLDriverPlugin/d' $QT_DIR/lib/cmake/Qt6Sql/Qt6SqlPlugins.cmake || true
4462
- name: build_ft
4563
run: |
4664
./run.sh ci
@@ -49,9 +67,11 @@ jobs:
4967
macdeployqt FastTrack.app -always-overwrite
5068
wget https://raw.githubusercontent.com/arl/macdeployqtfix/refs/heads/master/macdeployqtfix.py
5169
#cp *.qm FastTrack.app/Contents/Resources/
70+
find / -name "libutf8_validity.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
5271
find / -name "libgcc_s.1.1.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
5372
find / -name "libsharpyuv.0.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
5473
find / -name "libjxl_cms.0.11.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
74+
find / -name "libvtk*.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
5575
cp -v /opt/homebrew/Cellar/opencv/*/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
5676
cp -v /opt/homebrew/opt/little-cms2/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
5777
cp -v /opt/homebrew/opt/jpeg-xl/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
@@ -68,16 +88,38 @@ jobs:
6888
mv fasttrack-cli.app FastTrack-Cli.app
6989
macdeployqt FastTrack-Cli.app -always-overwrite
7090
#cp *.qm FastTrack-Cli.app/Contents/Resources/
91+
find / -name "libutf8_validity.dylib" -exec cp {} FastTrack-Cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
7192
find / -name "libgcc_s.1.1.dylib" -exec cp {} FastTrack-Cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
7293
find / -name "libsharpyuv.0.dylib" -exec cp {} FastTrack-Cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
7394
find / -name "libjxl_cms.0.11.dylib" -exec cp {} FastTrack-Cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
74-
cp -v /opt/homebrew/Cellar/opencv/*/lib/lib*.dylib FastTrack-Cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
95+
find / -name "libvtk*.dylib" -exec cp {} FastTrack-Cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
96+
find / -name "libqslite*.dylib" -exec cp {} FastTrack-Cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
97+
cp -v /opt/homebrew/opt/opencv/*/lib/lib*.dylib FastTrack-Cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
7598
cp -v /opt/homebrew/opt/little-cms2/lib/lib*.dylib FastTrack-Cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
7699
cp -v /opt/homebrew/opt/jpeg-xl/lib/lib*.dylib FastTrack-Cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
77-
python macdeployqtfix.py fasttrack-cli.app/contents/macos/fasttrack-cli ../../Qt/${{ env.QT_VERSION }}/
100+
python macdeployqtfix.py FastTrack-Cli.app/Contents/MacOS/FastTrack-Cli ../../Qt/${{ env.QT_VERSION }}/
101+
find FastTrack-Cli.app/Contents/Frameworks -type f -name "*.dylib" -exec codesign --remove-signature {} \; 2>/dev/null || true
102+
find FastTrack-Cli.app/Contents/Frameworks -type f -name "*.dylib" -exec codesign --force --sign - {} \;
103+
codesign --deep --force --sign - FastTrack-Cli.app
78104
hdiutil create -volname FastTrack-Cli -srcfolder FastTrack-Cli.app -ov -format UDZO FastTrack-Cli.dmg
79105
- name: upload_artefact
80106
uses: actions/upload-artifact@v4
81107
with:
82108
name: FastTrack-Cli.dmg
83109
path: ./build/bin/FastTrack-Cli.dmg
110+
111+
test_bundle:
112+
runs-on: macos-latest
113+
needs: build_mac
114+
steps:
115+
- name: download artifact
116+
uses: actions/download-artifact@v4
117+
with:
118+
name: FastTrack-Cli.dmg
119+
path: FastTrack-Cli
120+
121+
- name: Run FastTrack executable
122+
run: |
123+
cd FastTrack-Cli
124+
hdiutil attach FastTrack-Cli.dmg -mountpoint /Volumes/FastTrackApp
125+
/Volumes/FastTrackApp/FastTrack-Cli.app/Contents/MacOS/FastTrack-Cli --help

.github/workflows/build_win.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,32 @@ jobs:
3535
cd build
3636
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DSKIP_TEST=ON ../
3737
mingw32-make
38-
mv bin FastTrack
3938
mv bin/fasttrack.exe bin/FastTrack.exe
4039
mv bin/fasttrack-cli.exe bin/FastTrack-Cli.exe
40+
mv bin FastTrack
4141
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
4242
cp ${{ github.workspace }}/src/assets/icon.ico FastTrack
4343
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/lib*.dll FastTrack
4444
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/opencv_videoio_ffmpeg${{ env.OPENCV_VERSION_ }}_64.dll FastTrack
4545
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/libopencv_world${{ env.OPENCV_VERSION_ }}.dll FastTrack
46-
cp *.qm FastTrack
46+
#cp *.qm FastTrack
4747
- name: upload_artefact
4848
uses: actions/upload-artifact@v4
4949
with:
5050
name: FastTrack
5151
path: build/FastTrack
52+
53+
test_bundle:
54+
runs-on: windows-latest
55+
needs: build_win
56+
steps:
57+
- name: download artifact
58+
uses: actions/download-artifact@v4
59+
with:
60+
name: FastTrack
61+
path: FastTrack
62+
63+
- name: Run FastTrack executable
64+
run: |
65+
cd FastTrack
66+
./FastTrack-Cli.exe --help

0 commit comments

Comments
 (0)