Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.
pyodidePublic archive

About

[ARCHIVED] Friendly fork of the original repository: setup the Emscripten compiler toolchain for use with GitHub Actions

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

Note

Archival notice

This repository hosted a friendly fork of the upstream mymindstorm/setup-emsdk action until emscripten-core#48 was merged. At the time of writing, this form is no longer needed, as the upstream action has returned to active maintenance and has been merged into the Emscripten organisation. Please use it via https://github.com/emscripten-core/setup-emsdk.

setup-emsdk

This actions step downloads emsdk and installs a version of Emscripten.

Usage

name: "emsdk"
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: pyodide/setup-emsdk@v15

      - name: Verify
        run: emcc -v

Cache

To just cache emsdk:

- name: Setup emsdk
  uses: pyodide/setup-emsdk@v15
  with:
    # Make sure to set a version number!
    version: 1.38.40
    # This is the name of the cache folder.
    # The cache folder will be placed in the build directory,
    #  so make sure it doesn't conflict with anything!
    actions-cache-folder: 'emsdk-cache'

- name: Verify
  run: emcc -v

If you want to also cache system libraries generated during build time:

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: pyodide/setup-emsdk@v15
        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

version:
  description: 'Version to install'
  default: 'latest'
no-install:
  description: "If true will not download any version of Emscripten. emsdk will still be added to PATH."
  default: false
no-cache:
  description: "If true will not cache any downloads with tc.cacheDir."
  default: false
actions-cache-folder:
  description: "Directory to cache emsdk in. This folder will go under $GITHUB_HOME (I.e. build dir) and be cached using @actions/cache."
  default: ''
update:
  description: "Fetch package information for all the new tools and SDK versions"
  default: false

See action.yml

About

[ARCHIVED] Friendly fork of the original repository: setup the Emscripten compiler toolchain for use with GitHub Actions

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages