瀏覽代碼

let's see if this works

Dan Korostelev 5 年之前
父節點
當前提交
6881719b55
共有 3 個文件被更改,包括 28 次插入0 次删除
  1. 14 0
      .github/workflows/main.yml
  2. 7 0
      extra/github-actions/build-linux.yml
  3. 7 0
      extra/github-actions/build-mac.yml

+ 14 - 0
.github/workflows/main.yml

@@ -193,7 +193,14 @@ jobs:
           sudo apt-get update -qqy
           sudo apt-get install -qqy ocaml-nox camlp5 opam libpcre3-dev zlib1g-dev libgtk2.0-dev libmbedtls-dev ninja-build neko neko-dev
       
+      - uses: actions/cache@v2
+        id: opam-cache
+        with:
+          path: ~/.opam
+          key: ${{ runner.os }}-${{ hashFiles('opam') }}
+      
       - name: Install OCaml libraries
+        if: steps.opam-cache.outputs.cache-hit != 'true'
         run: |
           set -ex
           opam init # --disable-sandboxing
@@ -260,7 +267,14 @@ jobs:
           brew unlink python@2
           brew bundle --file=tests/Brewfile --no-upgrade
       
+      - uses: actions/cache@v2
+        id: opam-cache
+        with:
+          path: ~/.opam
+          key: ${{ runner.os }}-${{ hashFiles('opam') }}
+      
       - name: Install OCaml libraries
+        if: steps.opam-cache.outputs.cache-hit != 'true'
         run: |
           set -ex
           opam init # --disable-sandboxing

+ 7 - 0
extra/github-actions/build-linux.yml

@@ -6,7 +6,14 @@
     sudo apt-get update -qqy
     sudo apt-get install -qqy ocaml-nox camlp5 opam libpcre3-dev zlib1g-dev libgtk2.0-dev libmbedtls-dev ninja-build neko neko-dev
 
+- uses: actions/cache@v2
+  id: opam-cache
+  with:
+    path: ~/.opam
+    key: ${{ runner.os }}-${{ hashFiles('opam') }}
+
 - name: Install OCaml libraries
+  if: steps.opam-cache.outputs.cache-hit != 'true'
   run: |
     set -ex
     opam init # --disable-sandboxing

+ 7 - 0
extra/github-actions/build-mac.yml

@@ -5,7 +5,14 @@
     brew unlink python@2
     brew bundle --file=tests/Brewfile --no-upgrade
 
+- uses: actions/cache@v2
+  id: opam-cache
+  with:
+    path: ~/.opam
+    key: ${{ runner.os }}-${{ hashFiles('opam') }}
+
 - name: Install OCaml libraries
+  if: steps.opam-cache.outputs.cache-hit != 'true'
   run: |
     set -ex
     opam init # --disable-sandboxing