Skip to content

Commit ccab9c6

Browse files
committed
[feat] ci: update final bundle tests
1 parent fdea2dd commit ccab9c6

6 files changed

Lines changed: 90 additions & 14 deletions

File tree

.github/workflows/build_linux.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,21 @@ jobs:
6464
cd FastTrack
6565
chmod +x fasttrack.run
6666
./fasttrack.run -- --cli --help
67+
68+
- name: GUI startup smoke test
69+
run: |
70+
cd FastTrack
71+
chmod +x fasttrack.run
72+
73+
set +e
74+
timeout 10s ./fasttrack.run -- -platform offscreen
75+
status=$?
76+
set -e
77+
78+
if [ "$status" -eq 124 ]; then
79+
echo "GUI startup test passed: app stayed alive for 10 seconds."
80+
exit 0
81+
fi
82+
83+
echo "GUI startup test failed: app exited with status $status."
84+
exit "$status"

.github/workflows/build_mac.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55

66
env:
7-
QT_VERSION: 6.9.1
7+
QT_VERSION: 6.11.1
88

99
jobs:
1010
build_mac:
@@ -89,6 +89,7 @@ jobs:
8989
export PKG_CONFIG_PATH="$HOME/opencv-install/lib/pkgconfig:$PKG_CONFIG_PATH"
9090
export CMAKE_PREFIX_PATH="$HOME/opencv-install:$CMAKE_PREFIX_PATH"
9191
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
92+
export CMAKE_PREFIX_PATH="${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos:$CMAKE_PREFIX_PATH"
9293
./run.sh ci_clang
9394
- name: build_ft
9495
run: |
@@ -120,7 +121,7 @@ jobs:
120121
path: ./build/bin/FastTrack.dmg
121122

122123
test_bundle:
123-
runs-on: macos-latest
124+
runs-on: macos-26
124125
needs: build_mac
125126
steps:
126127
- name: download artifact
@@ -134,3 +135,25 @@ jobs:
134135
cd FastTrack
135136
hdiutil attach FastTrack.dmg -mountpoint /Volumes/FastTrackApp
136137
/Volumes/FastTrackApp/FastTrack.app/Contents/MacOS/FastTrack --cli --help
138+
139+
- name: GUI startup smoke test
140+
run: |
141+
brew install coreutils
142+
143+
cd FastTrack
144+
hdiutil attach FastTrack.dmg -mountpoint /Volumes/FastTrackApp
145+
146+
BIN=/Volumes/FastTrackApp/FastTrack.app/Contents/MacOS/FastTrack
147+
148+
set +e
149+
gtimeout 20s "$BIN"
150+
status=$?
151+
set -e
152+
153+
if [ "$status" -eq 124 ]; then
154+
echo "GUI startup test passed: app stayed alive for 20 seconds."
155+
exit 0
156+
fi
157+
158+
echo "GUI startup test failed: app exited with status $status."
159+
exit "$status"

.github/workflows/build_win.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,22 @@ jobs:
6363
run: |
6464
cd FastTrack
6565
./FastTrack.exe --cli --help
66+
67+
- name: GUI startup smoke test
68+
shell: pwsh
69+
run: |
70+
cd FastTrack
71+
72+
$p = Start-Process -FilePath ".\FastTrack.exe" -PassThru -WindowStyle Hidden
73+
74+
Start-Sleep -Seconds 10
75+
76+
if ($p.HasExited) {
77+
Write-Host "GUI startup test failed: app exited early with code $($p.ExitCode)."
78+
exit $p.ExitCode
79+
}
80+
81+
Write-Host "GUI startup test passed: app stayed alive for 10 seconds."
82+
83+
Stop-Process -Id $p.Id -Force
84+
exit 0

.github/workflows/test.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
branches:
99
- master
1010
env:
11-
QT_VERSION: 6.7.2
11+
QT_VERSION: 6.11.1
1212
OPENCV_VERSION: 4.10.0
1313

1414
jobs:
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v2
1919
- uses: actions/setup-python@v2
2020
with:
21-
python-version: '3.8'
21+
python-version: '3.11'
2222
- name: install_qt6
2323
run: |
2424
sudo apt-get update
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/checkout@v2
4444
- uses: actions/setup-python@v2
4545
with:
46-
python-version: '3.8'
46+
python-version: '3.11'
4747
- name: install_qt6
4848
run: |
4949
choco uninstall mingw
@@ -52,6 +52,8 @@ jobs:
5252
python3 -m aqt install-tool -O ${{ github.workspace }}/Qt/ windows desktop tools_mingw1310
5353
echo "${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/mingw_64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
5454
echo "${{ github.workspace }}/Qt/Tools/mingw1310_64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
55+
echo "CMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/mingw_64" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
56+
echo "Qt6_DIR=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/mingw_64/lib/cmake/Qt6" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5557
- name: install_opencv
5658
run: |
5759
choco install wget unzip cmake git
@@ -81,15 +83,10 @@ jobs:
8183
test_mac:
8284
runs-on: macos-latest
8385
steps:
84-
- uses: actions/checkout@v2
85-
- uses: actions/setup-python@v2
86+
- uses: actions/setup-python@v5
8687
with:
87-
python-version: '3.8'
88-
- name: install_qt6
89-
run: |
90-
pip install aqtinstall
91-
python3 -m aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ mac desktop ${{ env.QT_VERSION }}
92-
echo ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/bin/ >> $GITHUB_PATH
88+
python-version: '3.11'
89+
- uses: actions/checkout@v2
9390
- name: Set up Homebrew #https://github.com/Homebrew/homebrew-cask/issues/150323
9491
id: set-up-homebrew
9592
uses: Homebrew/actions/setup-homebrew@master
@@ -101,6 +98,7 @@ jobs:
10198
rm -f /usr/local/bin/python3*
10299
rm -f /usr/local/opt/go/bin/go*
103100
rm -f /usr/local/bin/go*
101+
brew uninstall --ignore-dependencies qt@6 || true
104102
brew update -q -f
105103
brew upgrade -q -f
106104
brew install pkg-config
@@ -110,6 +108,12 @@ jobs:
110108
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
111109
python -m pip install --upgrade pip setuptools wheel
112110
python -m pip install numpy pandas pytest
111+
- name: install_qt6
112+
run: |
113+
python -m pip install aqtinstall
114+
python -m aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ mac desktop ${{ env.QT_VERSION }}
115+
echo ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/bin/ >> $GITHUB_PATH
113116
- name: test_ft
114117
run: |
118+
export CMAKE_PREFIX_PATH="${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos:$CMAKE_PREFIX_PATH"
115119
./test.sh unix

run.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,15 @@ if [ "$1" = "ci_clang" ]; then
5757
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DSKIP_TEST=ON ../
5858
make
5959
fi
60+
61+
if [ "$1" = "build_linux" ]; then
62+
act -W .github/workflows/build_linux.yml --rm --pull --artifact-server-path "$PWD/.artifacts"
63+
fi
64+
65+
if [ "$1" = "build_win" ]; then
66+
act -W .github/workflows/build_win.yml --rm --pull --artifact-server-path "$PWD/.artifacts"
67+
fi
68+
69+
if [ "$1" = "build_mac" ]; then
70+
act -W .github/workflows/build_mac.yml --rm --pull --artifact-server-path "$PWD/.artifacts"
71+
fi

test/accuracyTest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def invertId(operations, dataframe, startTime = 0):
6161
# errors -= len(n)
6262

6363
for i, j in enumerate(indexes):
64-
dataframe["id"].loc[j] = operations[i][1]
64+
dataframe.loc[j, "id"] = operations[i][1]
6565
return errors
6666

6767
def errorsCounter(reference, tracking):

0 commit comments

Comments
 (0)