Skip to content

Commit b25e160

Browse files
committed
CI: move expensive exiftool/ffmpeg installation steps after lint/type check
1 parent d435eff commit b25e160

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

.github/workflows/python-package.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,6 @@ jobs:
3535
with:
3636
path: main
3737

38-
# https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side
39-
# pull into mapillary/mapillary_tools/exiftool
40-
- name: Setup ExifTool
41-
uses: actions/checkout@v4
42-
with:
43-
repository: "exiftool/exiftool"
44-
path: exiftool
45-
46-
- name: Check ExifTool version
47-
# DO NOT USE envvars here which does not work on Windows (needs prefixing with $env:)
48-
# need to rename exiftool to exiftool.pl according to https://exiftool.org/install.html
49-
run: |
50-
mv ${{ github.workspace }}/exiftool/exiftool ${{ github.workspace }}/exiftool/exiftool.pl
51-
perl ${{ github.workspace }}/exiftool/exiftool.pl -ver
52-
53-
- name: Setup FFmpeg
54-
uses: FedericoCarboni/setup-ffmpeg@v3
55-
# ffmpeg is not supported in the latest macOS arch:
56-
# Error: setup-ffmpeg can only be run on 64-bit systems
57-
if: matrix.platform != 'macos-latest'
58-
5938
- name: Set up Python ${{ matrix.python-version }}
6039
uses: actions/setup-python@v5
6140
with:
@@ -83,6 +62,33 @@ jobs:
8362
run: |
8463
mypy mapillary_tools tests/cli
8564
65+
# Begin of expensive steps: run after the quick checks done above
66+
67+
# https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side
68+
# pull into mapillary/mapillary_tools/exiftool
69+
- name: Setup ExifTool
70+
uses: actions/checkout@v4
71+
with:
72+
repository: "exiftool/exiftool"
73+
path: exiftool
74+
75+
- name: Check ExifTool version
76+
# DO NOT USE envvars here which does not work on Windows (needs prefixing with $env:)
77+
# need to rename exiftool to exiftool.pl according to https://exiftool.org/install.html
78+
run: |
79+
mv ${{ github.workspace }}/exiftool/exiftool ${{ github.workspace }}/exiftool/exiftool.pl
80+
perl ${{ github.workspace }}/exiftool/exiftool.pl -ver
81+
82+
- name: Setup FFmpeg
83+
uses: FedericoCarboni/setup-ffmpeg@v3
84+
# ffmpeg is not supported in the latest macOS arch:
85+
# Error: setup-ffmpeg can only be run on 64-bit systems
86+
if: matrix.platform != 'macos-latest'
87+
# Allow this step to fail (it frequently fails)
88+
continue-on-error: true
89+
90+
# End of expensive steps
91+
8692
- name: Test with pytest
8793
run: |
8894
mapillary_tools --version

0 commit comments

Comments
 (0)