From 8a80349649de86cb751d69ec4be5c6afabdaeeb2 Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 16:10:56 -0700 Subject: [PATCH 01/10] Skip ffmpeg in the CI for the latest macOS --- .github/workflows/python-package.yml | 5 ++++- .github/workflows/release.yml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a6d0d19e..bced9a73 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -50,6 +50,9 @@ jobs: - name: Setup FFmpeg uses: FedericoCarboni/setup-ffmpeg@v2 + # ffmpeg is not supported in the latest macOS arch: + # Error: setup-ffmpeg can only be run on 64-bit systems + if: matrix.platform != 'macos-latest' - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -89,4 +92,4 @@ jobs: pytest -s -vv tests env: MAPILLARY_TOOLS__TESTS_EXECUTABLE: mapillary_tools - MAPILLARY_TOOLS__TESTS_EXIFTOOL_EXECUTABLE: perl ${{ github.workspace }}/exiftool/exiftool.pl \ No newline at end of file + MAPILLARY_TOOLS__TESTS_EXIFTOOL_EXECUTABLE: perl ${{ github.workspace }}/exiftool/exiftool.pl diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d4173a3..04c7a46c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,6 +51,9 @@ jobs: - name: Setup FFmpeg uses: FedericoCarboni/setup-ffmpeg@v2 + # ffmpeg is not supported in the latest macOS arch: + # Error: setup-ffmpeg can only be run on 64-bit systems + if: matrix.platform != 'macos-latest' - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} uses: actions/setup-python@v4 From 8ba4749cf12ca709c1e74f28566dee38b3540477 Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 16:15:43 -0700 Subject: [PATCH 02/10] setup-python@v5 --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index bced9a73..5800faf5 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -55,7 +55,7 @@ jobs: if: matrix.platform != 'macos-latest' - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} # optional x64 or x86. Defaults to x64 if not specified From b515efc94c8de32c805181fdb2968b1fc057f4f3 Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 16:36:08 -0700 Subject: [PATCH 03/10] do not specify architecture: ["x64"] --- .github/workflows/python-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5800faf5..41dabd00 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -18,7 +18,6 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] platform: ["ubuntu-latest", "macos-latest", "windows-latest"] - architecture: ["x64"] runs-on: ${{ matrix.platform }} From 36667c758c038dca20ddd75fb4a088adc03cb6a1 Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 16:40:26 -0700 Subject: [PATCH 04/10] Revert "Skip ffmpeg in the CI for the latest macOS" This reverts commit 8a80349649de86cb751d69ec4be5c6afabdaeeb2. --- .github/workflows/python-package.yml | 5 +---- .github/workflows/release.yml | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 41dabd00..7a319fcd 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -49,9 +49,6 @@ jobs: - name: Setup FFmpeg uses: FedericoCarboni/setup-ffmpeg@v2 - # ffmpeg is not supported in the latest macOS arch: - # Error: setup-ffmpeg can only be run on 64-bit systems - if: matrix.platform != 'macos-latest' - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -91,4 +88,4 @@ jobs: pytest -s -vv tests env: MAPILLARY_TOOLS__TESTS_EXECUTABLE: mapillary_tools - MAPILLARY_TOOLS__TESTS_EXIFTOOL_EXECUTABLE: perl ${{ github.workspace }}/exiftool/exiftool.pl + MAPILLARY_TOOLS__TESTS_EXIFTOOL_EXECUTABLE: perl ${{ github.workspace }}/exiftool/exiftool.pl \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04c7a46c..1d4173a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,9 +51,6 @@ jobs: - name: Setup FFmpeg uses: FedericoCarboni/setup-ffmpeg@v2 - # ffmpeg is not supported in the latest macOS arch: - # Error: setup-ffmpeg can only be run on 64-bit systems - if: matrix.platform != 'macos-latest' - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} uses: actions/setup-python@v4 From b5ad818be121d0e8dd6c06d6d7bb4b177a0901d6 Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 16:43:23 -0700 Subject: [PATCH 05/10] Revert "Revert "Skip ffmpeg in the CI for the latest macOS"" This reverts commit 36667c758c038dca20ddd75fb4a088adc03cb6a1. --- .github/workflows/python-package.yml | 5 ++++- .github/workflows/release.yml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7a319fcd..41dabd00 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -49,6 +49,9 @@ jobs: - name: Setup FFmpeg uses: FedericoCarboni/setup-ffmpeg@v2 + # ffmpeg is not supported in the latest macOS arch: + # Error: setup-ffmpeg can only be run on 64-bit systems + if: matrix.platform != 'macos-latest' - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -88,4 +91,4 @@ jobs: pytest -s -vv tests env: MAPILLARY_TOOLS__TESTS_EXECUTABLE: mapillary_tools - MAPILLARY_TOOLS__TESTS_EXIFTOOL_EXECUTABLE: perl ${{ github.workspace }}/exiftool/exiftool.pl \ No newline at end of file + MAPILLARY_TOOLS__TESTS_EXIFTOOL_EXECUTABLE: perl ${{ github.workspace }}/exiftool/exiftool.pl diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d4173a3..04c7a46c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,6 +51,9 @@ jobs: - name: Setup FFmpeg uses: FedericoCarboni/setup-ffmpeg@v2 + # ffmpeg is not supported in the latest macOS arch: + # Error: setup-ffmpeg can only be run on 64-bit systems + if: matrix.platform != 'macos-latest' - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} uses: actions/setup-python@v4 From 66c9cbb69b0cb3f02cb62fde8aa781887c6366dd Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 17:00:49 -0700 Subject: [PATCH 06/10] do not run the ffmpeg tests in a shell --- tests/integration/fixtures.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/integration/fixtures.py b/tests/integration/fixtures.py index 1658becd..3534272d 100644 --- a/tests/integration/fixtures.py +++ b/tests/integration/fixtures.py @@ -75,14 +75,12 @@ def _ffmpeg_installed(): [ffmpeg_path, "-version"], stderr=subprocess.PIPE, stdout=subprocess.PIPE, - shell=True, ) # In Windows, ffmpeg is installed but ffprobe is not? subprocess.run( [ffprobe_path, "-version"], stderr=subprocess.PIPE, stdout=subprocess.PIPE, - shell=True, ) except FileNotFoundError: return False From 9333f271df371ba45b82bb819621a59903b83770 Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 17:12:26 -0700 Subject: [PATCH 07/10] update checkout and python --- .github/workflows/python-package.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 41dabd00..95502de1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -18,6 +18,9 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] platform: ["ubuntu-latest", "macos-latest", "windows-latest"] + # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + # Optional - x64 or x86 architecture, defaults to x64 + # architecture: "x64" runs-on: ${{ matrix.platform }} @@ -28,14 +31,14 @@ jobs: steps: # https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side # pull into mapillary/mapillary_tools/main - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: main # https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side # pull into mapillary/mapillary_tools/exiftool - name: Setup ExifTool - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: "exiftool/exiftool" path: exiftool @@ -53,12 +56,10 @@ jobs: # Error: setup-ffmpeg can only be run on 64-bit systems if: matrix.platform != 'macos-latest' - - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - # optional x64 or x86. Defaults to x64 if not specified - architecture: ${{ matrix.architecture }} - name: Install dependencies run: | From b3ad183ca115e836e1c78f19a7e86192281bcd24 Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 17:16:48 -0700 Subject: [PATCH 08/10] upgrade actions --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04c7a46c..1da43ede 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,14 +30,14 @@ jobs: steps: # https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side # pull into mapillary/mapillary_tools/main - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: main # https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side # pull into mapillary/mapillary_tools/exiftool - name: Setup ExifTool - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: "exiftool/exiftool" path: exiftool @@ -50,13 +50,13 @@ jobs: perl ${{ github.workspace }}/exiftool/exiftool.pl -ver - name: Setup FFmpeg - uses: FedericoCarboni/setup-ffmpeg@v2 + uses: FedericoCarboni/setup-ffmpeg@v3 # ffmpeg is not supported in the latest macOS arch: # Error: setup-ffmpeg can only be run on 64-bit systems if: matrix.platform != 'macos-latest' - name: Set up ${{ matrix.architecture }} Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} # optional x64 or x86. Defaults to x64 if not specified From ee37881c107b65be266f89967c772e0d1bdae18d Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 17:19:24 -0700 Subject: [PATCH 09/10] test if it works --- .github/workflows/python-package.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 95502de1..d56f0ed1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -51,10 +51,7 @@ jobs: perl ${{ github.workspace }}/exiftool/exiftool.pl -ver - name: Setup FFmpeg - uses: FedericoCarboni/setup-ffmpeg@v2 - # ffmpeg is not supported in the latest macOS arch: - # Error: setup-ffmpeg can only be run on 64-bit systems - if: matrix.platform != 'macos-latest' + uses: FedericoCarboni/setup-ffmpeg@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 From 97a7c6a559c829a30da036f05f6abffe1f883cde Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Sun, 5 May 2024 17:20:13 -0700 Subject: [PATCH 10/10] Revert "test if it works" This reverts commit ee37881c107b65be266f89967c772e0d1bdae18d. --- .github/workflows/python-package.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d56f0ed1..95502de1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -51,7 +51,10 @@ jobs: perl ${{ github.workspace }}/exiftool/exiftool.pl -ver - name: Setup FFmpeg - uses: FedericoCarboni/setup-ffmpeg@v3 + uses: FedericoCarboni/setup-ffmpeg@v2 + # ffmpeg is not supported in the latest macOS arch: + # Error: setup-ffmpeg can only be run on 64-bit systems + if: matrix.platform != 'macos-latest' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5