GithubHelp home page GithubHelp logo

vld375 / wasm-ci Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nnaumenko/wasm-ci

0.0 0.0 0.0 1 KB

Running and testing Webassembly code using Gitlab CI

Home Page: https://gitlab.com/nnaumenko/wasm-ci

Shell 16.00% C++ 18.22% Dockerfile 65.78%

wasm-ci's Introduction

Running and testing Webassembly code using Gitlab CI

This repo contains dockerfile for image nnaumenko/emscripten-firefox and example how to automate running of WebAssembly tests directly in Firefox browser with Gitlab CI.

Example

Hello world

Purpose: use Gitlab CI to automatically build C++ program into WebAssembly, run the built program directly in Firefox browser, fail the CI Job if the program terminated abnormally and display the program's output.

This can be used to automate simple tests for WebAssembly modules:

  • Emrun's exit code is the value returned by main() in hello.cpp. Returning non-zero value will cause Gitlab CI Job to fail. Non-zero return value can be used to signal failed tests.
  • The stdout and stderr of the C++ program are captured by Emrun. The output can be reviewed to identify the exact failure point. Alternatively the output can be redirected to file which can be parsed or forwarded to other CI Jobs as an artifact.

Docker image

The image is based on trzeci/emscripten-ubuntu with Firefox browser added and configured to operate in headless mode.

To build the image:

git clone https://gitlab.com/nnaumenko/gitlab-ci-wasm
cd gitlab-ci-wasm/docker/emscripten-firefox
sudo docker build -t myimage .

Further reading

Base docker image

Base docker image trzeci/emscripten repo

Emscripten

Emrun documentation

Gitlab CI/CD documentation

wasm-ci's People

Contributors

nnaumenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.