Skip to content

Commit

Permalink
release_{macos,win}: distribute NopeDiff along with NopeViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
mbouron committed Feb 2, 2024
1 parent fce3928 commit ac18667
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 11 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/release_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ jobs:
permissions:
contents: write
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- tool: nope-viewer
tool_fullname: NopeViewer
- tool: nope-diff
tool_fullname: NopeDiff

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -38,14 +46,14 @@ jobs:
--add-binary "$(which ffprobe):bin" \
--add-binary "$libarchive:." \
--windowed \
-i scripts/pyinstaller/nope-viewer.icns \
scripts/pyinstaller/nope-viewer.py
create-dmg nope-viewer.dmg dist/nope-viewer.app
-i scripts/pyinstaller/${{ matrix.tool }}.icns \
scripts/pyinstaller/${{ matrix.tool }}.py
create-dmg ${{ matrix.tool }}.dmg dist/${{ matrix.tool }}.app
- name: Upload DMG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
output_file="NopeViewer-$(cat VERSION)-x86_64.dmg"
mv nope-viewer.dmg $output_file
output_file="${{ matrix.tool_fullname }}-$(cat VERSION)-x86_64.dmg"
mv ${{ matrix.tool }}.dmg $output_file
gh release upload v$(cat VERSION) $output_file
20 changes: 14 additions & 6 deletions .github/workflows/release_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ jobs:
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:
Expand Down Expand Up @@ -49,16 +57,16 @@ jobs:
--collect-all pynopegl_utils `
--add-binary "venv/Scripts/ffmpeg.exe;bin" `
--add-binary "venv/Scripts/ffprobe.exe;bin" `
-i scripts/pyinstaller/nope-viewer.ico `
scripts/pyinstaller/nope-viewer.py
mv ./dist/nope-viewer ./dist/NopeViewer
Compress-Archive -Path ./dist/NopeViewer/ ./dist/NopeViewer.zip
-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/NopeViewer-$version-x86_64.zip"
mv dist/NopeViewer.zip $output_file
$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
Binary file added scripts/pyinstaller/nope-diff.icns
Binary file not shown.
Binary file added scripts/pyinstaller/nope-diff.ico
Binary file not shown.
10 changes: 10 additions & 0 deletions scripts/pyinstaller/nope-diff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import os
import os.path as op
import sys

from pynopegl_utils.diff import run

os.environ["PATH"] = os.pathsep.join([op.join(sys._MEIPASS, "bin"), os.environ["PATH"]])

if __name__ == "__main__":
run()

0 comments on commit ac18667

Please sign in to comment.