Building and Deploying on GitLab — Emscripten 4.0.9-git (dev) documentation (original) (raw)

Fork me on GitHub

GitLab CI/CD is a popular continuous integration service which offers free plans to everyone. Thanks to an Alpine Linux package by Jakub Jirutka installing emscripten in GitLab CI/CD is literally a one line task.

A sample .gitlab-ci.yml

image: alpine:3.9

before_script:

pages: script:

Let’s break it down:

before_script:

In the before_script stage we download the package from the Alpine Linux testing repository.

This step also contains the command to add an additional build tool make.

In the script stage we can now run the commands we want. In this sample we are using make, but you can call emcc directly if you prefer.

For an example of this setup in practice, see the Example Emscripten site using GitLab Pages.