CI: Add caching of external dependencies
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bfc775b..fa4a701 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -15,24 +15,38 @@
       run: echo "CC=gcc-10" >> $GITHUB_ENV && echo "CXX=g++-10" >> $GITHUB_ENV
     - uses: actions/setup-python@v2
 
+    - name: Cache external dependencies
+      id: cache-ext
+      uses: actions/cache@v2
+      with:
+        path: ext
+        key: ${{ runner.os }}-${{ hashFiles('ext/*.cmd') }}
     - uses: ilammy/setup-nasm@v1
+      if: steps.cache-ext.outputs.cache-hit != 'true'
       with:
         version: 2.15.05
     - uses: seanmiddleditch/gha-setup-ninja@v3
+      if: steps.cache-ext.outputs.cache-hit != 'true'
     - run: pip install meson
+      if: steps.cache-ext.outputs.cache-hit != 'true'
     - name: Build aom
+      if: steps.cache-ext.outputs.cache-hit != 'true'
       working-directory: ./ext
       run: bash aom.cmd
     - name: Build dav1d
+      if: steps.cache-ext.outputs.cache-hit != 'true'
       working-directory: ./ext
       run: bash dav1d.cmd
     - name: Build rav1e
+      if: steps.cache-ext.outputs.cache-hit != 'true'
       working-directory: ./ext
       run: bash rav1e.cmd
     - name: Build libgav1
+      if: steps.cache-ext.outputs.cache-hit != 'true'
       working-directory: ./ext
       run: bash libgav1.cmd
     - name: Build libyuv
+      if: steps.cache-ext.outputs.cache-hit != 'true'
       working-directory: ./ext
       run: bash libyuv.cmd