Skip to content

Commit

Permalink
Add system library caching info to readme. (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mymindstorm committed Jul 12, 2020
1 parent 7b928ac commit 2a4a91b
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: mymindstorm/setup-emsdk@v5
- uses: mymindstorm/setup-emsdk@v6

- name: Verify
run: emcc -v
```
## Cache
To just cache emsdk:
```yaml
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v5
uses: mymindstorm/setup-emsdk@v6
with:
# Make sure to set a version number!
version: 1.38.40
Expand All @@ -35,6 +37,34 @@ jobs:
run: emcc -v
```
If you want to also cache system libraries generated during build time:
```yaml
env:
EM_VERSION: 1.39.18
EM_CACHE_FOLDER: 'emsdk-cache'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup cache
id: cache-system-libraries
uses: actions/cache@v2
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}
- uses: mymindstorm/setup-emsdk@v6
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
- name: Build library
run: make -j2
- name: Run unit tests
run: make check
```
## Options
```yaml
Expand Down

0 comments on commit 2a4a91b

Please sign in to comment.