File: GitLab.rst

package info (click to toggle)
emscripten 2.0.12~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 108,440 kB
  • sloc: ansic: 510,324; cpp: 384,763; javascript: 84,341; python: 51,362; sh: 50,019; pascal: 4,159; makefile: 3,409; asm: 2,150; lisp: 1,869; ruby: 488; cs: 142
file content (46 lines) | stat: -rw-r--r-- 1,428 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.. _GitLab:

================================
Building and Deploying on GitLab
================================

`GitLab CI/CD <https://about.gitlab.com/product/continuous-integration/>`_ is a popular continuous integration service which offers free plans to everyone. Thanks to an `Alpine Linux package by Jakub Jirutka <https://pkgs.alpinelinux.org/packages?name=emscripten>`_ installing emscripten in GitLab CI/CD is literally a one line task.

A sample .gitlab-ci.yml
=======================

.. code-block:: yaml

    image: alpine:3.9

    before_script:
      - apk add emscripten make --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing

    pages:
      script:
      - make
      artifacts:
        paths:
        - public
      only:
        - master

Let's break it down:

.. code-block:: yaml

    before_script:
      - apk add emscripten make --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing

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*.

.. code-block:: yaml

    script:
      - 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 <https://pages.gitlab.io/emscripten>`_.