-
Notifications
You must be signed in to change notification settings - Fork 8
72 lines (60 loc) · 2.3 KB
/
release_windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: 'build Windows release'
on:
workflow_run:
workflows: ["create GitHub release"]
types: [completed]
jobs:
msvc:
permissions:
contents: write
runs-on: windows-latest
env:
VULKAN_SDK_VERSION: 1.3.250.1
strategy:
fail-fast: false
matrix:
include:
- tool: nope-viewer
tool_fullname: NopeViewer
- tool: nope-diff
tool_fullname: NopeDiff
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
iwr https://sdk.lunarg.com/sdk/download/${{env.VULKAN_SDK_VERSION}}/windows/VulkanSDK-${{env.VULKAN_SDK_VERSION}}-Installer.exe -OutFile VulkanSDK-Installer.exe
.\VulkanSDK-Installer.exe --accept-licenses --default-answer --confirm-command install | Out-Null
iwr https://sdk.lunarg.com/sdk/download/${{env.VULKAN_SDK_VERSION}}/windows/VulkanRT-${{env.VULKAN_SDK_VERSION}}-Installer.exe -OutFile VulkanRT-Installer.exe
.\VulkanRT-Installer.exe /S | Out-Null
- name: Build
run: |
.\scripts\msvc-env.ps1
python.exe .\configure.py --debug-opts gpu_capture --build-backend ninja
nmake
- name: Build installer
run: |
.\scripts\msvc-env.ps1
.\venv\Scripts\ngli-activate.ps1
pip install pyinstaller
pyinstaller.exe `
--collect-all pynopegl_utils `
--add-binary "venv/Scripts/ffmpeg.exe;bin" `
--add-binary "venv/Scripts/ffprobe.exe;bin" `
-i scripts/pyinstaller/${{ matrix.tool }}.ico `
scripts/pyinstaller/${{ matrix.tool }}.py
mv ./dist/${{ matrix.tool }} ./dist/${{ matrix.tool_fullname}}
Compress-Archive -Path ./dist/${{ matrix.tool_fullname }}/ ./dist/${{ matrix.tool_fullname }}.zip
- name: Upload installer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$version = $(Get-Content -TotalCount 1 .\VERSION)
$output_file = "dist/${{ matrix.tool_fullname }}-$version-x86_64.zip"
mv dist/${{ matrix.tool_fullname }}.zip $output_file
gh release upload "v$version" $output_file