Skip to content

Commit f69d6dd

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

3 files changed

Lines changed: 53 additions & 16 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: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Build Mac
33
on:
44
workflow_dispatch:
55

6-
env:
7-
QT_VERSION: 6.7.2
8-
96
jobs:
107
build_mac:
118
runs-on: macos-14
@@ -14,14 +11,6 @@ jobs:
1411
- uses: actions/setup-python@v2
1512
with:
1613
python-version: '3.8'
17-
- name: install_qt
18-
run: |
19-
pip install aqtinstall
20-
python3 -m aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ mac desktop ${{ env.QT_VERSION }}
21-
echo ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/bin/ >> $GITHUB_PATH
22-
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlmimer.*
23-
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlodbc.*
24-
rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlpsql.*
2514
- name: Set up Homebrew #https://github.com/Homebrew/homebrew-cask/issues/150323
2615
id: set-up-homebrew
2716
uses: Homebrew/actions/setup-homebrew@master
@@ -40,6 +29,7 @@ jobs:
4029
brew install openssl
4130
brew install libiodbc
4231
brew install opencv
32+
brew install qt
4333
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
4434
- name: build_ft
4535
run: |
@@ -55,7 +45,7 @@ jobs:
5545
cp -v /opt/homebrew/Cellar/opencv/*/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
5646
cp -v /opt/homebrew/opt/little-cms2/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
5747
cp -v /opt/homebrew/opt/jpeg-xl/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
58-
python macdeployqtfix.py fasttrack.app/contents/macos/fasttrack ../../Qt/${{ env.QT_VERSION }}/
48+
python macdeployqtfix.py fasttrack.app/contents/macos/fasttrack /opt/homebrew/opt/qt
5949
hdiutil create -volname FastTrack -srcfolder FastTrack.app -ov -format UDZO FastTrack.dmg
6050
- name: upload_artefact
6151
uses: actions/upload-artifact@v4
@@ -71,13 +61,29 @@ jobs:
7161
find / -name "libgcc_s.1.1.dylib" -exec cp {} FastTrack-Cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
7262
find / -name "libsharpyuv.0.dylib" -exec cp {} FastTrack-Cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
7363
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!
64+
cp -v /opt/homebrew/opt/opencv/*/lib/lib*.dylib FastTrack-Cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
7565
cp -v /opt/homebrew/opt/little-cms2/lib/lib*.dylib FastTrack-Cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
7666
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 }}/
67+
python macdeployqtfix.py FastTrack-Cli.app/Contents/MacOS/FastTrack-Cli /opt/homebrew/opt/qt/
7868
hdiutil create -volname FastTrack-Cli -srcfolder FastTrack-Cli.app -ov -format UDZO FastTrack-Cli.dmg
7969
- name: upload_artefact
8070
uses: actions/upload-artifact@v4
8171
with:
8272
name: FastTrack-Cli.dmg
8373
path: ./build/bin/FastTrack-Cli.dmg
74+
75+
test_bundle:
76+
runs-on: macos-latest
77+
needs: build_mac
78+
steps:
79+
- name: download artifact
80+
uses: actions/download-artifact@v4
81+
with:
82+
name: FastTrack-Cli.dmg
83+
path: FastTrack-Cli
84+
85+
- name: Run FastTrack executable
86+
run: |
87+
cd FastTrack-Cli
88+
hdiutil attach FastTrack-Cli.dmg -mountpoint /Volumes/FastTrackApp
89+
/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)