diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91da051..be1629a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/Makefile b/Makefile index 3b74b24..a202f57 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -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 @@ -9,9 +9,12 @@ generate-flags: 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