Skip to content

Commit

Permalink
Fixed install-ffmpeg for empty patch
Browse files Browse the repository at this point in the history
  • Loading branch information
asticode committed Mar 30, 2024
1 parent 5f81a71 commit 1a710a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [windows-latest]

env:
FFMPEG_VERSION: n5.1.2
Expand Down Expand Up @@ -64,12 +64,12 @@ jobs:
run: |
choco install make
choco install yasm
echo "FFMPEG_POST_CHECKOUT='&& git apply $(cygpath -u ${{ github.WORKSPACE }})/.github/workflows/windows.patch'" >> $env:GITHUB_ENV
echo "FFMPEG_PATCH_PATH='$(cygpath -u ${{ github.WORKSPACE }})/.github/workflows/windows.patch'" >> $env:GITHUB_ENV
- if: ${{ steps.load-ffmpeg-cache.outputs.cache-hit != 'true' }}
name: Install ffmpeg
run: |
make install-ffmpeg srcPath=${{ env.FFMPEG_PATH }}/src version=${{ env.FFMPEG_VERSION }} postCheckout=${{ env.FFMPEG_POST_CHECKOUT }}
make install-ffmpeg srcPath=${{ env.FFMPEG_PATH }}/src version=${{ env.FFMPEG_VERSION }} patchPath=${{ env.FFMPEG_PATCH_PATH }}
- if: ${{ steps.load-ffmpeg-cache.outputs.cache-hit != 'true' }}
name: Save ffmpeg cache
Expand Down
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
version = "n5.1.2"
srcPath = "tmp/$(version)/src"
postCheckout = ""
platform = ""
version=n5.1.2
srcPath=tmp/$(version)/src
patchPath=
platform=

generate-flags:
go run internal/cmd/flags/main.go

install-ffmpeg:
rm -rf $(srcPath)
mkdir -p $(srcPath)
# cd $(srcPath) is necessary for windows build since otherwise git doesn't clone in the proper dir
cd $(srcPath) && git clone https://github.com/FFmpeg/FFmpeg $(srcPath)
cd $(srcPath) && git checkout $(version) $(postCheckout)
git clone https://github.com/FFmpeg/FFmpeg $(srcPath)
ls -la $(srcPath)
cd $(srcPath) && git checkout $(version)
ifneq "" "$(patchPath)"
cd $(srcPath) && git apply $(patchPath)
endif
cd $(srcPath) && ./configure --prefix=.. $(configure)
cd $(srcPath) && make
cd $(srcPath) && make install
Expand Down

0 comments on commit 1a710a7

Please sign in to comment.