The wasm builds are tested for 3 targets: wasm32, wasm64(-sMEMORY64=1) and
wasm64(-sMEMORY64=2). The CI builds the containers using the same Dockerfile
(emsdk-wasm-cross.docker) with different build args.
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
---
.gitlab-ci.d/buildtest.yml | 26 ++++++++++++++++++++++----
.gitlab-ci.d/container-cross.yml | 20 ++++++++++++++++++--
.gitlab-ci.d/container-template.yml | 4 +++-
.gitlab-ci.d/containers.yml | 4 +++-
4 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index dfe954fe3c..98bf28488c 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -785,11 +785,29 @@ coverity:
# Always manual on forks even if $QEMU_CI == "2"
- when: manual
-build-wasm:
+build-wasm32-32bit:
extends: .wasm_build_job_template
timeout: 2h
needs:
- - job: wasm-emsdk-cross-container
+ - job: wasm32-32bit-emsdk-cross-container
variables:
- IMAGE: emsdk-wasm32-cross
- CONFIGURE_ARGS: --static --disable-tools --enable-debug --enable-tcg-interpreter
+ IMAGE: emsdk-wasm32-32bit-cross
+ CONFIGURE_ARGS: --static --cpu=wasm32 --disable-tools --enable-debug --enable-tcg-interpreter
+
+build-wasm64-64bit:
+ extends: .wasm_build_job_template
+ timeout: 2h
+ needs:
+ - job: wasm64-64bit-emsdk-cross-container
+ variables:
+ IMAGE: emsdk-wasm64-64bit-cross
+ CONFIGURE_ARGS: --static --cpu=wasm64 --disable-tools --enable-debug --enable-tcg-interpreter
+
+build-wasm64-32bit:
+ extends: .wasm_build_job_template
+ timeout: 2h
+ needs:
+ - job: wasm64-32bit-emsdk-cross-container
+ variables:
+ IMAGE: emsdk-wasm64-32bit-cross
+ CONFIGURE_ARGS: --static --cpu=wasm64 --wasm64-32bit-address-limit --disable-tools --enable-debug --enable-tcg-interpreter
diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml
index 0fd7341afa..66fc7343e2 100644
--- a/.gitlab-ci.d/container-cross.yml
+++ b/.gitlab-ci.d/container-cross.yml
@@ -86,7 +86,23 @@ win64-fedora-cross-container:
variables:
NAME: fedora-win64-cross
-wasm-emsdk-cross-container:
+wasm32-32bit-emsdk-cross-container:
extends: .container_job_template
variables:
- NAME: emsdk-wasm32-cross
+ NAME: emsdk-wasm32-32bit-cross
+ BUILD_ARGS: --build-arg TARGET_CPU=wasm32
+ DOCKERFILE: emsdk-wasm-cross
+
+wasm64-64bit-emsdk-cross-container:
+ extends: .container_job_template
+ variables:
+ NAME: emsdk-wasm64-64bit-cross
+ BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=1
+ DOCKERFILE: emsdk-wasm-cross
+
+wasm64-32bit-emsdk-cross-container:
+ extends: .container_job_template
+ variables:
+ NAME: emsdk-wasm64-32bit-cross
+ BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=2
+ DOCKERFILE: emsdk-wasm-cross
diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-template.yml
index 82c1b69e8d..b92e96b0fc 100644
--- a/.gitlab-ci.d/container-template.yml
+++ b/.gitlab-ci.d/container-template.yml
@@ -10,12 +10,14 @@
- export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest"
- docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- until docker info; do sleep 1; done
+ - export DOCKERFILE_NAME=${DOCKERFILE:-$NAME}
script:
- echo "TAG:$TAG"
- echo "COMMON_TAG:$COMMON_TAG"
- docker build --tag "$TAG" --cache-from "$TAG" --cache-from "$COMMON_TAG"
--build-arg BUILDKIT_INLINE_CACHE=1
- -f "tests/docker/dockerfiles/$NAME.docker" "."
+ $BUILD_ARGS
+ -f "tests/docker/dockerfiles/$DOCKERFILE_NAME.docker" "."
- docker push "$TAG"
after_script:
- docker logout
diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index f7d3e7205d..ae99e0a541 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -58,7 +58,9 @@ weekly-container-builds:
- tricore-debian-cross-container
- xtensa-debian-cross-container
- win64-fedora-cross-container
- - wasm-emsdk-cross-container
+ - wasm32-32bit-emsdk-cross-container
+ - wasm64-64bit-emsdk-cross-container
+ - wasm64-32bit-emsdk-cross-container
# containers
- amd64-alpine-container
- amd64-debian-container
--
2.43.0
On 1/9/26 04:11, Kohei Tokunaga wrote: > +wasm64-64bit-emsdk-cross-container: > + extends: .container_job_template > + variables: > + NAME: emsdk-wasm64-64bit-cross > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=1 > + DOCKERFILE: emsdk-wasm-cross > + > +wasm64-32bit-emsdk-cross-container: > + extends: .container_job_template > + variables: > + NAME: emsdk-wasm64-32bit-cross > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=2 > + DOCKERFILE: emsdk-wasm-cross To expand on my question about WASM64_MEMORY64 vs --wasm64-32bit-address-limit, I would expect the two wasm64 build jobs to share the same container. r~
Hi Richard, > On 1/9/26 04:11, Kohei Tokunaga wrote: > > +wasm64-64bit-emsdk-cross-container: > > + extends: .container_job_template > > + variables: > > + NAME: emsdk-wasm64-64bit-cross > > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=1 > > + DOCKERFILE: emsdk-wasm-cross > > + > > +wasm64-32bit-emsdk-cross-container: > > + extends: .container_job_template > > + variables: > > + NAME: emsdk-wasm64-32bit-cross > > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=2 > > + DOCKERFILE: emsdk-wasm-cross > > To expand on my question about WASM64_MEMORY64 vs --wasm64-32bit-address-limit, I would > expect the two wasm64 build jobs to share the same container. Thanks for the feedback, I'll fix this in the next version of the series. Regards, Kohei
Hi Richard, > > On 1/9/26 04:11, Kohei Tokunaga wrote: > > > +wasm64-64bit-emsdk-cross-container: > > > + extends: .container_job_template > > > + variables: > > > + NAME: emsdk-wasm64-64bit-cross > > > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=1 > > > + DOCKERFILE: emsdk-wasm-cross > > > + > > > +wasm64-32bit-emsdk-cross-container: > > > + extends: .container_job_template > > > + variables: > > > + NAME: emsdk-wasm64-32bit-cross > > > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=2 > > > + DOCKERFILE: emsdk-wasm-cross > > > > To expand on my question about WASM64_MEMORY64 vs --wasm64-32bit-address-limit, I would > > expect the two wasm64 build jobs to share the same container. > > Thanks for the feedback, I'll fix this in the next version of the series. I've fixed the test to share the same container. Dependencies are now compiled with -sMEMORY64=1 to produce wasm64 object files. The build-wasm64-32bit test compiles QEMU with --wasm64-32bit-address-limit so that the final linked output is lowered by Emscripten's -sMEMORY64=2. https://patchew.org/QEMU/cover.1768308374.git.ktokunaga.mail@gmail.com/ Regards, Kohei
© 2016 - 2026 Red Hat, Inc.