Skip to content

Commit ade0deb

Browse files
committed
gitlab: Enable CI for wasm build
Add GitLab CI job that builds QEMU using emscripten. The build runs in the container defined in tests/docker/dockerfiles/emsdk-wasm32-cross.docker. Signed-off-by: Kohei Tokunaga <[email protected]>
1 parent 8bed6e9 commit ade0deb

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.gitlab-ci.d/buildtest-template.yml

+27
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,30 @@
115115
- du -chs ${CI_PROJECT_DIR}/*-cache
116116
variables:
117117
QEMU_JOB_FUNCTIONAL: 1
118+
119+
.wasm_build_job_template:
120+
extends: .base_job_template
121+
stage: build
122+
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
123+
before_script:
124+
- source scripts/ci/gitlab-ci-section
125+
- section_start setup "Pre-script setup"
126+
- JOBS=$(expr $(nproc) + 1)
127+
- section_end setup
128+
script:
129+
- du -sh .git
130+
- mkdir build
131+
- cd build
132+
- section_start configure "Running configure"
133+
- emconfigure ../configure --disable-docs
134+
${TARGETS:+--target-list="$TARGETS"}
135+
$CONFIGURE_ARGS ||
136+
{ cat config.log meson-logs/meson-log.txt && exit 1; }
137+
- if test -n "$LD_JOBS";
138+
then
139+
pyvenv/bin/meson configure . -Dbackend_max_links="$LD_JOBS" ;
140+
fi || exit 1;
141+
- section_end configure
142+
- section_start build "Building QEMU"
143+
- emmake make -j"$JOBS"
144+
- section_end build

.gitlab-ci.d/buildtest.yml

+9
Original file line numberDiff line numberDiff line change
@@ -792,3 +792,12 @@ coverity:
792792
when: never
793793
# Always manual on forks even if $QEMU_CI == "2"
794794
- when: manual
795+
796+
build-wasm:
797+
extends: .wasm_build_job_template
798+
timeout: 2h
799+
needs:
800+
job: wasm-emsdk-cross-container
801+
variables:
802+
IMAGE: emsdk-wasm32-cross
803+
CONFIGURE_ARGS: --static --disable-tools --enable-debug --enable-tcg-interpreter

.gitlab-ci.d/container-cross.yml

+5
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,8 @@ win64-fedora-cross-container:
9494
extends: .container_job_template
9595
variables:
9696
NAME: fedora-win64-cross
97+
98+
wasm-emsdk-cross-container:
99+
extends: .container_job_template
100+
variables:
101+
NAME: emsdk-wasm32-cross

0 commit comments

Comments
 (0)