Skip to content

Commit a9ae4d0

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 2c76c1b commit a9ae4d0

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
@@ -126,3 +126,30 @@
126126
- du -chs ${CI_PROJECT_DIR}/*-cache
127127
variables:
128128
QEMU_JOB_AVOCADO: 1
129+
130+
.wasm_build_job_template:
131+
extends: .base_job_template
132+
stage: build
133+
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
134+
before_script:
135+
- source scripts/ci/gitlab-ci-section
136+
- section_start setup "Pre-script setup"
137+
- JOBS=$(expr $(nproc) + 1)
138+
- section_end setup
139+
script:
140+
- du -sh .git
141+
- mkdir build
142+
- cd build
143+
- section_start configure "Running configure"
144+
- emconfigure ../configure --disable-docs
145+
${TARGETS:+--target-list="$TARGETS"}
146+
$CONFIGURE_ARGS ||
147+
{ cat config.log meson-logs/meson-log.txt && exit 1; }
148+
- if test -n "$LD_JOBS";
149+
then
150+
pyvenv/bin/meson configure . -Dbackend_max_links="$LD_JOBS" ;
151+
fi || exit 1;
152+
- section_end configure
153+
- section_start build "Building QEMU"
154+
- emmake make -j"$JOBS"
155+
- section_end build

.gitlab-ci.d/buildtest.yml

+9
Original file line numberDiff line numberDiff line change
@@ -801,3 +801,12 @@ coverity:
801801
when: never
802802
# Always manual on forks even if $QEMU_CI == "2"
803803
- when: manual
804+
805+
build-wasm:
806+
extends: .wasm_build_job_template
807+
timeout: 2h
808+
needs:
809+
job: wasm-emsdk-cross-container
810+
variables:
811+
IMAGE: emsdk-wasm32-cross
812+
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)