File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,17 +12,19 @@ jobs:
1212 build :
1313 runs-on : ubuntu-latest
1414 steps :
15- - uses : mymindstorm/setup-emsdk@v5
15+ - uses : mymindstorm/setup-emsdk@v6
1616
1717 - name : Verify
1818 run : emcc -v
1919` ` `
2020
2121## Cache
2222
23+ To just cache emsdk:
24+
2325` ` ` yaml
2426- name : Setup emsdk
25- uses : mymindstorm/setup-emsdk@v5
27+ uses : mymindstorm/setup-emsdk@v6
2628 with :
2729 # Make sure to set a version number!
2830 version : 1.38.40
3537 run : emcc -v
3638` ` `
3739
40+ If you want to also cache system libraries generated during build time:
41+
42+ ` ` ` yaml
43+ env :
44+ EM_VERSION : 1.39.18
45+ EM_CACHE_FOLDER : ' emsdk-cache'
46+
47+ jobs :
48+ test :
49+ runs-on : ubuntu-latest
50+ steps :
51+ - uses : actions/checkout@v2
52+ - name : Setup cache
53+ id : cache-system-libraries
54+ uses : actions/cache@v2
55+ with :
56+ path : ${{env.EM_CACHE_FOLDER}}
57+ key : ${{env.EM_VERSION}}-${{ runner.os }}
58+ - uses : mymindstorm/setup-emsdk@v6
59+ with :
60+ version : ${{env.EM_VERSION}}
61+ actions-cache-folder : ${{env.EM_CACHE_FOLDER}}
62+ - name : Build library
63+ run : make -j2
64+ - name : Run unit tests
65+ run : make check
66+ ` ` `
67+
3868## Options
3969
4070` ` ` yaml
You can’t perform that action at this time.
0 commit comments