You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improve caching logic of #1
Uses a single step instead of two seperate steps, as it is less bugprone
* Update as requested and suggested by @mymindstorm
Copy file name to clipboardExpand all lines: README.md
+4-18Lines changed: 4 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,35 +25,24 @@ jobs:
25
25
uses: actions/cache@v1
26
26
id: cache # This is important!
27
27
with:
28
-
# Set to the same folder as store-actions-cache (more below)
28
+
# Set to the same folder as actions-cache-folder (more below)
29
29
path: 'emsdk-cache'
30
30
# Set the end bit to emsdk version
31
31
key: ${{ runner.os }}-emsdk-1.38.40
32
32
33
-
- name: Setup emsdk (cache not found)
33
+
- name: Setup emsdk (use cache if found, create otherwise)
34
34
uses: mymindstorm/setup-emsdk@v2
35
-
if: steps.cache.outputs.cache-hit != 'true'
36
35
with:
37
36
# Make sure to set a version number!
38
37
version: 1.38.40
39
38
# This is the name of the cache folder.
40
39
# The cache folder will be placed in the build directory,
41
40
# so make sure it doesn't conflict with anything!
42
-
store-actions-cache: 'emsdk-cache'
41
+
actions-cache-folder: 'emsdk-cache'
43
42
# This stops it from using tc.cacheDir since we are using
44
43
# actions/cache.
45
44
no-cache: true
46
45
47
-
- name: Setup emsdk (cache found)
48
-
uses: mymindstorm/setup-emsdk@v2
49
-
if: steps.cache.outputs.cache-hit == 'true'
50
-
with:
51
-
# Make sure to set a version number!
52
-
version: 1.38.40
53
-
# Set to the same folder as store-actions-cache
54
-
actions-cache-folder: 'emsdk-cache'
55
-
no-cache: true
56
-
57
46
- name: Verify
58
47
run: emcc -v
59
48
```
@@ -70,11 +59,8 @@ no-install:
70
59
no-cache:
71
60
description: "If true will not cache any downloads with tc.cacheDir."
72
61
default: false
73
-
store-actions-cache:
74
-
description: "Name of the folder emsdk cache will be copied to on sucessful run. This folder will go under $GITHUB_HOME (I.e. build dir)"
75
-
default: ''
76
62
actions-cache-folder:
77
-
description: "Set to the folder where your cached emsdk-master folder is."
63
+
description: "Set to the folder where your cached emsdk-master folder is or where emsdk cache will be copied to on sucessful run. This folder will go under $GITHUB_HOME (I.e. build dir)."
Copy file name to clipboardExpand all lines: action.yml
+1-4Lines changed: 1 addition & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,8 @@ inputs:
11
11
no-cache:
12
12
description: "If true will not cache any downloads with tc.cacheDir."
13
13
default: false
14
-
store-actions-cache:
15
-
description: "Name of the folder emsdk cache will be copied to on sucessful run. This folder will go under $GITHUB_HOME (I.e. build dir)"
16
-
default: ''
17
14
actions-cache-folder:
18
-
description: "Set to the folder where your cached emsdk-master folder is."
15
+
description: "Set to the folder where your cached emsdk-master folder is or where emsdk cache will be copied to on sucessful run. This folder will go under $GITHUB_HOME (I.e. build dir)."
0 commit comments