Video editing with Python
Fix Windows CI workflow (#1690)
Álvaro Mondéjar033542875d21
diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.ymlindex 1ef9158f..7583c712 100644--- a/.github/workflows/format_check.yml+++ b/.github/workflows/format_check.yml@@ -21,10 +21,10 @@ jobs:- name: Set up Pythonuses: actions/setup-python@v2with:- python-version: '3.x'+ python-version: 3.9- name: Install dependenciesrun: |- python -m pip install --upgrade pip+ python -m pip install --upgrade wheel pippip install .[lint]- name: Lint examplesrun: flake8 examples --show-sourcediff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.ymlindex 54c6f5ea..e41c0c39 100644--- a/.github/workflows/test_suite.yml+++ b/.github/workflows/test_suite.yml@@ -82,13 +82,15 @@ jobs:with:path: |ImageMagick.exe- key: ${{ runner.os }}-6.9.12+ key: ${{ runner.os }}-latest- name: Download ImageMagick installershell: cmdif: steps.imagemagick-installer-cache.outputs.cache-hit != 'true'run: |- set IMAGEMAGICK_URL=https://download.imagemagick.org/ImageMagick/download/binaries/ImageMagick-6.9.12-19-Q16-x86-static.exe+ python3 scripts/get-latest-imagemagick-win.py >im-url.txt+ set /p IMAGEMAGICK_URL= <im-url.txt+ rm im-url.txtecho %IMAGEMAGICK_URL%curl %IMAGEMAGICK_URL% -o ImageMagick.exe@@ -104,7 +106,7 @@ jobs:dir imagemagickmove imagemagick\ffmpeg.exe ffmpeg.exe- move imagemagick\convert.exe convert.exe+ move imagemagick\magick.exe convert.exe- name: Install Python dependenciesrun: |diff --git a/scripts/get-latest-imagemagick-win.py b/scripts/get-latest-imagemagick-win.pynew file mode 100644index 00000000..b48cc803--- /dev/null+++ b/scripts/get-latest-imagemagick-win.py@@ -0,0 +1,12 @@+import sys+from urllib.request import urlopen++BINARIES_URL = "https://download.imagemagick.org/ImageMagick/download/binaries/"++content = urlopen(BINARIES_URL).read().decode("utf-8")++for line in reversed(content.split("<td>")):+ if 'static.exe">ImageMagick' in line:+ filename = line.split('"')[1]+ sys.stdout.write(f"{BINARIES_URL}{filename}\n")+ break