99permissions :
1010 contents : write
1111
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.ref }}
14+ cancel-in-progress : true
15+
1216jobs :
1317 generate-release-notes :
18+ name : Generate release notes
1419 runs-on : ubuntu-latest
1520 outputs :
1621 changelog : ${{ steps.notes.outputs.changelog }}
@@ -31,17 +36,19 @@ jobs:
3136 } >> "$GITHUB_OUTPUT"
3237
3338 create-release:
39+ name: Create GitHub Release
3440 needs: generate-release-notes
3541 runs-on: ubuntu-latest
3642 steps:
37- - name: Create/Update GitHub Release (body only)
43+ - name: Create/Update GitHub Release
3844 uses: softprops/action-gh-release@v2
3945 with:
4046 tag_name: ${{ github.ref_name }}
4147 name: ${{ github.ref_name }}
4248 body: ${{ needs.generate-release-notes.outputs.changelog }}
4349
4450 build-windows:
51+ name: Build on Windows
4552 needs: create-release
4653 runs-on: windows-latest
4754 defaults:
5461 with:
5562 python-version: "3.11"
5663
64+ - name: Cache pip
65+ uses: actions/cache@v4
66+ with:
67+ path: |
68+ ~\AppData\Local\pip\Cache
69+ ~\AppData\Local\pip\cache
70+ ~\AppData\Roaming\pip\Cache
71+ key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
72+ restore-keys: |
73+ ${{ runner.os }}-pip-
74+
5775 - name: Install requirements
76+ shell: pwsh
5877 run: |
5978 python -m pip install --upgrade pip
79+ pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
6080 pip install -r requirements.txt
6181
6282 - name: Cleanup before PyInstaller
@@ -68,32 +88,37 @@ jobs:
6888
6989 - name: Build exe
7090 shell: pwsh
71- run: |
72- python -m PyInstaller --noconfirm --clean --windowed --onefile `
73- --name "SoccerNetProAnalyzer" `
74- --add-data "style;style" `
75- --add-data "ui;ui" `
76- --add-data "controllers;controllers" `
77- --add-data "image;image" `
78- "main.py"
91+ run: >
92+ python -m PyInstaller --noconfirm --clean --windowed --onefile
93+ --name "VideoAnnotationTool"
94+ --add-data "style;style"
95+ --add-data "ui;ui"
96+ --add-data "controllers;controllers"
97+ --add-data "image;image"
98+ --add-data "config.yaml;."
99+ --collect-all "soccernetpro"
100+ --collect-all "wandb"
101+ --collect-all "torch_geometric"
102+ "main.py"
79103
80104 - name: Rename binary
81105 shell: pwsh
82106 run: |
83- Move-Item -Force dist\SoccerNetProAnalyzer .exe dist\SoccerNetProAnalyzer -win.exe
107+ Move-Item -Force dist\VideoAnnotationTool .exe dist\VideoAnnotationTool -win.exe
84108
85109 - name: Zip Windows binary
86110 shell: pwsh
87111 run: |
88- Compress-Archive -Path dist\SoccerNetProAnalyzer -win.exe -DestinationPath dist\SoccerNetProAnalyzer -win.zip -Force
112+ Compress-Archive -Path dist\VideoAnnotationTool -win.exe -DestinationPath dist\VideoAnnotationTool -win.zip -Force
89113
90114 - name: Upload Release Asset (Windows)
91115 uses: softprops/action-gh-release@v2
92116 with:
93- files: annotation_tool/dist/SoccerNetProAnalyzer-win.zip
94117 tag_name: ${{ github.ref_name }}
118+ files: annotation_tool/dist/VideoAnnotationTool-win.zip
95119
96120 build-macos:
121+ name: Build on macOS
97122 needs: create-release
98123 runs-on: macos-latest
99124 defaults:
@@ -106,7 +131,18 @@ jobs:
106131 with:
107132 python-version: "3.11"
108133
134+ - name: Cache pip
135+ uses: actions/cache@v4
136+ with:
137+ path: |
138+ ~/Library/Caches/pip
139+ ~/.cache/pip
140+ key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
141+ restore-keys: |
142+ ${{ runner.os }}-pip-
143+
109144 - name: Install requirements
145+ shell: bash
110146 run: |
111147 python -m pip install --upgrade pip
112148 pip install -r requirements.txt
@@ -121,25 +157,30 @@ jobs:
121157 shell: bash
122158 run: >
123159 python -m PyInstaller --noconfirm --clean --windowed
124- --name "SoccerNetProAnalyzer "
160+ --name "VideoAnnotationTool "
125161 --add-data "style:style"
126162 --add-data "ui:ui"
127163 --add-data "controllers:controllers"
128164 --add-data "image:image"
165+ --add-data "config.yaml:."
166+ --collect-all "soccernetpro"
167+ --collect-all "wandb"
168+ --collect-all "torch_geometric"
129169 "main.py"
130170
131171 - name: Zip macOS app
132172 shell: bash
133173 run: |
134- ditto -c -k --sequesterRsrc --keepParent "dist/SoccerNetProAnalyzer .app" "dist/SoccerNetProAnalyzer -mac.zip"
174+ ditto -c -k --sequesterRsrc --keepParent "dist/VideoAnnotationTool .app" "dist/VideoAnnotationTool -mac.zip"
135175
136176 - name: Upload Release Asset (macOS)
137177 uses: softprops/action-gh-release@v2
138178 with:
139- files: annotation_tool/dist/SoccerNetProAnalyzer-mac.zip
140179 tag_name: ${{ github.ref_name }}
180+ files: annotation_tool/dist/VideoAnnotationTool-mac.zip
141181
142182 build-linux:
183+ name: Build on Linux
143184 needs: create-release
144185 runs-on: ubuntu-latest
145186 defaults:
@@ -158,9 +199,20 @@ jobs:
158199 sudo apt-get update
159200 sudo apt-get install -y libgl1 libglib2.0-0 libxcb-cursor0
160201
202+ - name: Cache pip
203+ uses: actions/cache@v4
204+ with:
205+ path: |
206+ ~/.cache/pip
207+ key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
208+ restore-keys: |
209+ ${{ runner.os }}-pip-
210+
161211 - name: Install requirements
212+ shell: bash
162213 run: |
163214 python -m pip install --upgrade pip
215+ pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
164216 pip install -r requirements.txt
165217
166218 - name: Cleanup before PyInstaller
@@ -173,27 +225,31 @@ jobs:
173225 shell: bash
174226 run: >
175227 python -m PyInstaller --noconfirm --clean --windowed --onefile
176- --name "SoccerNetProAnalyzer "
228+ --name "VideoAnnotationTool "
177229 --add-data "style:style"
178230 --add-data "ui:ui"
179231 --add-data "controllers:controllers"
180232 --add-data "image:image"
233+ --add-data "config.yaml:."
234+ --collect-all "soccernetpro"
235+ --collect-all "wandb"
236+ --collect-all "torch_geometric"
181237 "main.py"
182238
183239 - name: Rename binary
184240 shell: bash
185241 run: |
186- mv -f dist/SoccerNetProAnalyzer dist/SoccerNetProAnalyzer -linux
242+ mv -f dist/VideoAnnotationTool dist/VideoAnnotationTool -linux
187243
188244 - name: Zip Linux binary
189245 shell: bash
190246 run: |
191247 cd dist
192- zip -r SoccerNetProAnalyzer -linux.zip SoccerNetProAnalyzer -linux
248+ zip -r VideoAnnotationTool -linux.zip VideoAnnotationTool -linux
193249 cd ..
194250
195251 - name: Upload Release Asset (Linux)
196252 uses: softprops/action-gh-release@v2
197253 with:
198- files: annotation_tool/dist/SoccerNetProAnalyzer-linux.zip
199254 tag_name: ${{ github.ref_name }}
255+ files: annotation_tool/dist/VideoAnnotationTool-linux.zip
0 commit comments