Skip to content

Commit 39fe0fc

Browse files
authored
Merge pull request #5 from OpenSportsLab/dev-jintao
Update after implementation of Description and Dense Description
2 parents 81f0bf2 + 7e9731e commit 39fe0fc

163 files changed

Lines changed: 9761 additions & 5355 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

12 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 96 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
push:
55
branches:
66
- main
7+
- dev-jintao
78
workflow_dispatch:
89

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
914
permissions:
1015
contents: read
1116
actions: write
@@ -16,13 +21,24 @@ jobs:
1621
runs-on: windows-latest
1722
defaults:
1823
run:
19-
working-directory: Tool
24+
working-directory: annotation_tool
2025
steps:
2126
- uses: actions/checkout@v4
2227

2328
- uses: actions/setup-python@v5
2429
with:
25-
python-version: "3.9"
30+
python-version: "3.11"
31+
32+
- name: Cache pip
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
~\AppData\Local\pip\Cache
37+
~\AppData\Local\pip\cache
38+
~\AppData\Roaming\pip\Cache
39+
key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
40+
restore-keys: |
41+
${{ runner.os }}-pip-
2642
2743
- name: Install requirements
2844
run: |
@@ -37,104 +53,153 @@ jobs:
3753
try { pip cache purge } catch { Write-Host "pip cache purge failed (ignored)" }
3854
3955
- name: Build exe
56+
shell: pwsh
57+
run: >
58+
python -m PyInstaller --noconfirm --clean --windowed --onefile
59+
--name "SoccerNetProAnalyzer"
60+
--add-data "style;style"
61+
--add-data "ui;ui"
62+
--add-data "controllers;controllers"
63+
--add-data "image;image"
64+
"main.py"
65+
66+
- name: Zip Windows binary (manual runs only)
67+
if: github.event_name == 'workflow_dispatch'
68+
shell: pwsh
4069
run: |
41-
pyinstaller --noconfirm --clean --windowed --onefile `
42-
--name "SoccerNetProAnalyzer" `
43-
--add-data "style;style" `
44-
--add-data "ui;ui" `
45-
--add-data "ui2;ui2" `
46-
"main.py"
47-
48-
# 为了避免你再次 hit artifact quota:只在网页端手动 Run workflow 时上传
70+
Move-Item -Force dist\SoccerNetProAnalyzer.exe dist\SoccerNetProAnalyzer-win.exe
71+
Compress-Archive -Path dist\SoccerNetProAnalyzer-win.exe -DestinationPath dist\SoccerNetProAnalyzer-win.zip -Force
72+
4973
- name: Upload artifact (manual runs only)
5074
if: github.event_name == 'workflow_dispatch'
5175
uses: actions/upload-artifact@v4
5276
with:
5377
name: SoccerNetProAnalyzer-Windows
54-
path: Tool/dist/SoccerNetProAnalyzer.exe
78+
path: annotation_tool/dist/SoccerNetProAnalyzer-win.zip
5579
retention-days: 3
5680

5781
build-macos:
5882
name: Build on macOS
5983
runs-on: macos-latest
6084
defaults:
6185
run:
62-
working-directory: Tool
86+
working-directory: annotation_tool
6387
steps:
6488
- uses: actions/checkout@v4
6589

6690
- uses: actions/setup-python@v5
6791
with:
68-
python-version: "3.9"
92+
python-version: "3.11"
93+
94+
- name: Cache pip
95+
uses: actions/cache@v4
96+
with:
97+
path: |
98+
~/Library/Caches/pip
99+
~/.cache/pip
100+
key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
101+
restore-keys: |
102+
${{ runner.os }}-pip-
69103
70104
- name: Install requirements
71105
run: |
72106
python -m pip install --upgrade pip
73107
pip install -r requirements.txt
74108
75109
- name: Cleanup before PyInstaller
110+
shell: bash
76111
run: |
77112
rm -rf build dist *.spec
78113
pip cache purge || true
79114
80-
- name: Build binary
115+
- name: Build app
116+
shell: bash
117+
run: >
118+
python -m PyInstaller --noconfirm --clean --windowed
119+
--name "SoccerNetProAnalyzer"
120+
--add-data "style:style"
121+
--add-data "ui:ui"
122+
--add-data "controllers:controllers"
123+
--add-data "image:image"
124+
"main.py"
125+
126+
- name: Zip macOS app (manual runs only)
127+
if: github.event_name == 'workflow_dispatch'
128+
shell: bash
81129
run: |
82-
pyinstaller --noconfirm --clean --windowed --onefile \
83-
--name "SoccerNetProAnalyzer" \
84-
--add-data "style:style" \
85-
--add-data "ui:ui" \
86-
--add-data "ui2:ui2" \
87-
"main.py"
130+
ditto -c -k --sequesterRsrc --keepParent "dist/SoccerNetProAnalyzer.app" "dist/SoccerNetProAnalyzer-mac.zip"
88131
89132
- name: Upload artifact (manual runs only)
90133
if: github.event_name == 'workflow_dispatch'
91134
uses: actions/upload-artifact@v4
92135
with:
93136
name: SoccerNetProAnalyzer-macOS
94-
path: Tool/dist/SoccerNetProAnalyzer
137+
path: annotation_tool/dist/SoccerNetProAnalyzer-mac.zip
95138
retention-days: 3
96139

97140
build-linux:
98141
name: Build on Linux
99142
runs-on: ubuntu-latest
100143
defaults:
101144
run:
102-
working-directory: Tool
145+
working-directory: annotation_tool
103146
steps:
104147
- uses: actions/checkout@v4
105148

106149
- uses: actions/setup-python@v5
107150
with:
108-
python-version: "3.9"
151+
python-version: "3.11"
109152

110153
- name: Install system deps (Qt/OpenCV runtime)
154+
shell: bash
111155
run: |
112156
sudo apt-get update
113-
sudo apt-get install -y libgl1 libglib2.0-0
157+
sudo apt-get install -y libgl1 libglib2.0-0 libxcb-cursor0
158+
159+
- name: Cache pip
160+
uses: actions/cache@v4
161+
with:
162+
path: |
163+
~/.cache/pip
164+
key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
165+
restore-keys: |
166+
${{ runner.os }}-pip-
114167
115168
- name: Install requirements
116169
run: |
117170
python -m pip install --upgrade pip
118171
pip install -r requirements.txt
119172
120173
- name: Cleanup before PyInstaller
174+
shell: bash
121175
run: |
122176
rm -rf build dist *.spec
123177
pip cache purge || true
124178
125179
- name: Build binary
180+
shell: bash
181+
run: >
182+
python -m PyInstaller --noconfirm --clean --windowed --onefile
183+
--name "SoccerNetProAnalyzer"
184+
--add-data "style:style"
185+
--add-data "ui:ui"
186+
--add-data "controllers:controllers"
187+
--add-data "image:image"
188+
"main.py"
189+
190+
- name: Zip Linux binary (manual runs only)
191+
if: github.event_name == 'workflow_dispatch'
192+
shell: bash
126193
run: |
127-
pyinstaller --noconfirm --clean --windowed --onefile \
128-
--name "SoccerNetProAnalyzer" \
129-
--add-data "style:style" \
130-
--add-data "ui:ui" \
131-
--add-data "ui2:ui2" \
132-
"main.py"
194+
mv -f dist/SoccerNetProAnalyzer dist/SoccerNetProAnalyzer-linux
195+
cd dist
196+
zip -r SoccerNetProAnalyzer-linux.zip SoccerNetProAnalyzer-linux
197+
cd ..
133198
134199
- name: Upload artifact (manual runs only)
135200
if: github.event_name == 'workflow_dispatch'
136201
uses: actions/upload-artifact@v4
137202
with:
138203
name: SoccerNetProAnalyzer-Linux
139-
path: Tool/dist/SoccerNetProAnalyzer
204+
path: annotation_tool/dist/SoccerNetProAnalyzer-linux.zip
140205
retention-days: 3

.github/workflows/deploy_docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ on:
44
push:
55
branches:
66
- main
7+
- dev-jintao
78
workflow_dispatch:
89

10+
911
permissions:
1012
contents: write
1113

@@ -20,7 +22,7 @@ jobs:
2022
- name: Set up Python
2123
uses: actions/setup-python@v5
2224
with:
23-
python-version: "3.9"
25+
python-version: "3.11"
2426

2527
- name: Install dependencies
2628
run: |

0 commit comments

Comments
 (0)