|
38 | 38 | - name: Install dependencies |
39 | 39 | run: yarn --frozen-lockfile |
40 | 40 |
|
41 | | - ###################### |
42 | | - # Patch SnoreToast to fix App ID - see https://github.com/th-ch/youtube-music/issues/479#issuecomment-965473559 |
43 | | - - name: SnoreToast - parameters |
44 | | - id: snoretoast-params |
45 | | - if: startsWith(matrix.os, 'windows') |
46 | | - shell: bash |
47 | | - run: | |
48 | | - echo "::set-output name=version::v0.8.0" |
49 | | - echo "::set-output name=path::./vendor/snoretoast" |
50 | | -
|
51 | | - - name: SnoreToast - cache |
52 | | - id: snoretoast-cache |
53 | | - uses: actions/cache@v2 |
54 | | - if: startsWith(matrix.os, 'windows') |
55 | | - with: |
56 | | - path: ${{ steps.snoretoast-params.outputs.path }} |
57 | | - key: snoretoast-${{ steps.snoretoast-params.outputs.version }} |
58 | | - |
59 | | - - name: SnoreToast - compile |
60 | | - if: | |
61 | | - startsWith(matrix.os, 'windows') && |
62 | | - steps.snoretoast-cache.outputs.cache-hit != 'true' |
63 | | - shell: bash |
64 | | - run: | |
65 | | - SNORETOAST_TAG="${{ steps.snoretoast-params.outputs.version }}" |
66 | | - echo "Compiling SnoreToast $SNORETOAST_TAG" |
67 | | -
|
68 | | - git config --global user.email "th-ch@users.noreply.github.com" |
69 | | - git config --global user.name "YouTube Music" |
70 | | - git clone -c advice.detachedHead=false --branch $SNORETOAST_TAG --depth 1 https://github.com/KDE/snoretoast.git ${{ steps.snoretoast-params.outputs.path }} |
71 | | - cd ${{ steps.snoretoast-params.outputs.path }} |
72 | | -
|
73 | | - # Apply https://github.com/KDE/snoretoast/pull/15/commits/c5faeceaf36f4b9fb27e5269990b716a25ecbe43 |
74 | | - # Patch generated with `git format-patch -1 c5faeceaf36f4b9fb27e5269990b716a25ecbe43` |
75 | | - git am < ../snoretoast-patch/0001-Fix-activation-not-writing-to-pipe.patch |
76 | | -
|
77 | | - # Compile for win32 |
78 | | - cmake -A Win32 -B build32 |
79 | | - cmake --build build32 --config Release |
80 | | -
|
81 | | - # Compile for x64 |
82 | | - cmake -A x64 -B build64 |
83 | | - cmake --build build64 --config Release |
84 | | -
|
85 | | - - name: SnoreToast - overwrite with custom build |
86 | | - if: startsWith(matrix.os, 'windows') |
87 | | - shell: bash |
88 | | - run: | |
89 | | - # Override SnoreToast with the patched versions |
90 | | - cp ${{ steps.snoretoast-params.outputs.path }}/build32/bin/Release/snoretoast.exe ./node_modules/node-notifier/vendor/snoreToast/snoretoast-x86.exe |
91 | | - cp ${{ steps.snoretoast-params.outputs.path }}/build64/bin/Release/snoretoast.exe ./node_modules/node-notifier/vendor/snoreToast/snoretoast-x64.exe |
92 | | - # End of SnoreToast patch |
93 | | - ###################### |
94 | | - |
95 | 41 | - name: Test |
96 | 42 | uses: GabrielBB/xvfb-action@v1 |
97 | 43 | env: |
|
0 commit comments