From 67c480c7e590a166a2ea16169502450c0ee3733b Mon Sep 17 00:00:00 2001 From: domna Date: Fri, 10 Nov 2023 21:10:00 +0100 Subject: [PATCH 1/7] Test windows ci/cd build --- .github/workflows/pyinstaller.yaml | 77 ++++++++++++++++++++++++++++++ noScribeEdit.spec | 6 +-- 2 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pyinstaller.yaml diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml new file mode 100644 index 0000000..da55f79 --- /dev/null +++ b/.github/workflows/pyinstaller.yaml @@ -0,0 +1,77 @@ +name: pyinstaller + +on: + push: + branches: + - main + - master + tags: + - '*' + pull_request: + +jobs: + # linux: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.10' + # - name: Build wheels + # uses: PyO3/maturin-action@v1 + # with: + # target: ${{ matrix.target }} + # args: --release --out dist --find-interpreter + # sccache: 'true' + # manylinux: auto + # - name: Upload wheels + # uses: actions/upload-artifact@v3 + # with: + # name: wheels + # path: dist + + windows: + runs-on: windows-latest + strategy: + matrix: + target: [x64, x86] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + architecture: ${{ matrix.target }} + - name: Install pyinstaller + run: pip install pyinstaller + - name: Build package with pyinstaller + run: pyinstaller noScribeEdit.spec + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: noScribeEdit + path: dist + + # macos: + # runs-on: macos-latest + # strategy: + # matrix: + # target: [x86_64, aarch64] + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.10' + # - name: Build wheels + # uses: PyO3/maturin-action@v1 + # with: + # target: ${{ matrix.target }} + # args: --release --out dist --find-interpreter + # sccache: 'true' + # - name: Upload wheels + # uses: actions/upload-artifact@v3 + # with: + # name: wheels + # path: dist \ No newline at end of file diff --git a/noScribeEdit.spec b/noScribeEdit.spec index d2e8c46..a5cbe1a 100644 --- a/noScribeEdit.spec +++ b/noScribeEdit.spec @@ -7,9 +7,9 @@ block_cipher = None a = Analysis( ['noScribeEdit.py'], pathex=[], - binaries=[('C:/Users/kai/Documents/Programmierung/2023_WhisperTranscribe/noScribeEditor/ffmpeg_win/ffmpeg.exe','ffmpeg_win'), - ('C:/Users/kai/Documents/Programmierung/2023_WhisperTranscribe/noScribeEditor/ffmpeg_win/ffplay.exe','ffmpeg_win')], - datas=[('C:/Users/kai/Documents/Programmierung/2023_WhisperTranscribe/noScribeEditor/noScribeEditLogo.png', '.')], + binaries=[('ffmpeg_win/ffmpeg.exe','ffmpeg_win'), + ('ffmpeg_win/ffplay.exe','ffmpeg_win')], + datas=[('noScribeEditLogo.png', '.')], hiddenimports=[], hookspath=[], hooksconfig={}, From 24a745f65a1eb45f6f24e7fd92c235e04397a44a Mon Sep 17 00:00:00 2001 From: domna Date: Fri, 10 Nov 2023 21:16:51 +0100 Subject: [PATCH 2/7] Adds proper artifact name --- .github/workflows/pyinstaller.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml index da55f79..9e2f916 100644 --- a/.github/workflows/pyinstaller.yaml +++ b/.github/workflows/pyinstaller.yaml @@ -48,10 +48,10 @@ jobs: run: pip install pyinstaller - name: Build package with pyinstaller run: pyinstaller noScribeEdit.spec - - name: Upload wheels + - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: noScribeEdit + name: noScribeEdit-win-${{ matrix.target }} path: dist # macos: From c1edd1614fe868dbf7d6d6b71552c27efa3321bd Mon Sep 17 00:00:00 2001 From: domna Date: Sat, 11 Nov 2023 09:33:29 +0100 Subject: [PATCH 3/7] Adds macOS build --- .github/workflows/pyinstaller.yaml | 41 +++++++++++------------ noScribeEdit-macOS.spec | 53 ++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 21 deletions(-) create mode 100644 noScribeEdit-macOS.spec diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml index 9e2f916..48892d7 100644 --- a/.github/workflows/pyinstaller.yaml +++ b/.github/workflows/pyinstaller.yaml @@ -54,24 +54,23 @@ jobs: name: noScribeEdit-win-${{ matrix.target }} path: dist - # macos: - # runs-on: macos-latest - # strategy: - # matrix: - # target: [x86_64, aarch64] - # steps: - # - uses: actions/checkout@v3 - # - uses: actions/setup-python@v4 - # with: - # python-version: '3.10' - # - name: Build wheels - # uses: PyO3/maturin-action@v1 - # with: - # target: ${{ matrix.target }} - # args: --release --out dist --find-interpreter - # sccache: 'true' - # - name: Upload wheels - # uses: actions/upload-artifact@v3 - # with: - # name: wheels - # path: dist \ No newline at end of file + macos: + runs-on: macos-latest + strategy: + matrix: + target: [x86_64, aarch64] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + architecture: ${{ matrix.target }} + - name: Install pyinstaller + run: pip install pyinstaller + - name: Build package with pyinstaller + run: pyinstaller noScribeEdit-macOS.spec + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: noScribeEdit-macOS-${{ matrix.target }} + path: dist \ No newline at end of file diff --git a/noScribeEdit-macOS.spec b/noScribeEdit-macOS.spec new file mode 100644 index 0000000..0eea41a --- /dev/null +++ b/noScribeEdit-macOS.spec @@ -0,0 +1,53 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis( + ['noScribeEdit.py'], + pathex=[], + binaries=[('ffmpeg_mac/ffmpeg','ffmpeg_mac'), + ('ffmpeg_mac/ffplay','ffmpeg_mac')], + datas=[('noScribeEditLogo.png', '.')], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) + +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='noScribeEdit', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon='noScribeEditLogo.ico' +) +coll = COLLECT( + exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='noScribeEdit', +) From 71dea1b764eef240ba8dbd3cc317a6d5440e6ad6 Mon Sep 17 00:00:00 2001 From: domna Date: Sat, 11 Nov 2023 09:35:15 +0100 Subject: [PATCH 4/7] Use arm64 instead of aarch64 --- .github/workflows/pyinstaller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml index 48892d7..0acc908 100644 --- a/.github/workflows/pyinstaller.yaml +++ b/.github/workflows/pyinstaller.yaml @@ -58,7 +58,7 @@ jobs: runs-on: macos-latest strategy: matrix: - target: [x86_64, aarch64] + target: [x86_64, arm64] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 From 7e283f79fc88b2500f1cedf0f15cf62c36c8dbe9 Mon Sep 17 00:00:00 2001 From: domna Date: Sat, 11 Nov 2023 09:36:38 +0100 Subject: [PATCH 5/7] Use `x64` instead of `x86_64` --- .github/workflows/pyinstaller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml index 0acc908..05b68d9 100644 --- a/.github/workflows/pyinstaller.yaml +++ b/.github/workflows/pyinstaller.yaml @@ -58,7 +58,7 @@ jobs: runs-on: macos-latest strategy: matrix: - target: [x86_64, arm64] + target: [x64, arm64] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 From 3fc747eeaade17e629557356de8f900643ed51e1 Mon Sep 17 00:00:00 2001 From: domna Date: Sat, 11 Nov 2023 09:40:01 +0100 Subject: [PATCH 6/7] Use python 3.10 for macOS build --- .github/workflows/pyinstaller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml index 05b68d9..a26ebd3 100644 --- a/.github/workflows/pyinstaller.yaml +++ b/.github/workflows/pyinstaller.yaml @@ -63,7 +63,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.10' architecture: ${{ matrix.target }} - name: Install pyinstaller run: pip install pyinstaller From bd1fb05aa4be32627da08e5ad2c6b3e2ed5809bc Mon Sep 17 00:00:00 2001 From: domna Date: Sat, 11 Nov 2023 09:50:05 +0100 Subject: [PATCH 7/7] Adds upgrade pip step --- .github/workflows/pyinstaller.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml index a26ebd3..823ae58 100644 --- a/.github/workflows/pyinstaller.yaml +++ b/.github/workflows/pyinstaller.yaml @@ -44,6 +44,8 @@ jobs: with: python-version: '3.9' architecture: ${{ matrix.target }} + - name: Upgrade pip + run: pip install --upgrade pip - name: Install pyinstaller run: pip install pyinstaller - name: Build package with pyinstaller @@ -65,6 +67,8 @@ jobs: with: python-version: '3.10' architecture: ${{ matrix.target }} + - name: Upgrade pip + run: pip install --upgrade pip - name: Install pyinstaller run: pip install pyinstaller - name: Build package with pyinstaller