Skip to content

Commit fed88f9

Browse files
Update release.yml
config.yaml --collect-all "soccernetpro" --collect-all "wandb" --collect-all "torch_geometric"
1 parent 2214936 commit fed88f9

1 file changed

Lines changed: 58 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 58 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99
permissions:
1010
contents: write
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
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:
@@ -54,7 +61,19 @@ jobs:
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
6079
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
@@ -69,18 +88,18 @@ jobs:
6988
7089
- name: Build exe
7190
shell: pwsh
72-
run: |
73-
python -m PyInstaller --noconfirm --clean --windowed --onefile `
74-
--name "VideoAnnotationTool" `
75-
--add-data "style;style" `
76-
--add-data "ui;ui" `
77-
--add-data "controllers;controllers" `
78-
--add-data "image;image" `
79-
--add-data "config.yaml;." `
80-
--collect-all "soccernetpro" `
81-
--collect-all "wandb" `
82-
--collect-all "torch_geometric" `
83-
"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"
84103
85104
- name: Rename binary
86105
shell: pwsh
@@ -95,10 +114,11 @@ jobs:
95114
- name: Upload Release Asset (Windows)
96115
uses: softprops/action-gh-release@v2
97116
with:
98-
files: annotation_tool/dist/VideoAnnotationTool-win.zip
99117
tag_name: ${{ github.ref_name }}
118+
files: annotation_tool/dist/VideoAnnotationTool-win.zip
100119
101120
build-macos:
121+
name: Build on macOS
102122
needs: create-release
103123
runs-on: macos-latest
104124
defaults:
@@ -111,7 +131,18 @@ jobs:
111131
with:
112132
python-version: "3.11"
113133
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+
114144
- name: Install requirements
145+
shell: bash
115146
run: |
116147
python -m pip install --upgrade pip
117148
pip install -r requirements.txt
@@ -145,10 +176,11 @@ jobs:
145176
- name: Upload Release Asset (macOS)
146177
uses: softprops/action-gh-release@v2
147178
with:
148-
files: annotation_tool/dist/VideoAnnotationTool-mac.zip
149179
tag_name: ${{ github.ref_name }}
180+
files: annotation_tool/dist/VideoAnnotationTool-mac.zip
150181
151182
build-linux:
183+
name: Build on Linux
152184
needs: create-release
153185
runs-on: ubuntu-latest
154186
defaults:
@@ -167,7 +199,17 @@ jobs:
167199
sudo apt-get update
168200
sudo apt-get install -y libgl1 libglib2.0-0 libxcb-cursor0
169201
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+
170211
- name: Install requirements
212+
shell: bash
171213
run: |
172214
python -m pip install --upgrade pip
173215
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
@@ -209,5 +251,5 @@ jobs:
209251
- name: Upload Release Asset (Linux)
210252
uses: softprops/action-gh-release@v2
211253
with:
212-
files: annotation_tool/dist/VideoAnnotationTool-linux.zip
213254
tag_name: ${{ github.ref_name }}
255+
files: annotation_tool/dist/VideoAnnotationTool-linux.zip

0 commit comments

Comments
 (0)