On 6/8/25 17:49, Kohei Tokunaga wrote:
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.m...@gmail.com>
---
.gitlab-ci.d/buildtest.yml | 24 +++++++++++++++++++++---
.gitlab-ci.d/container-cross.yml | 18 +++++++++++++++++-
.gitlab-ci.d/container-template.yml | 4 +++-
3 files changed, 41 insertions(+), 5 deletions(-)
V2:
- Fixed to use --wasm64-32bit-address-limit instead of the removed
--wasm64-memory64. This can be considered as a significant change from the
previous version of this patch so the Reviewed-by tag has been removed.
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index d888a60063..0dded04188 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -787,11 +787,29 @@ coverity:
# Always manual on forks even if $QEMU_CI == "2"
- when: manual
-build-wasm:
+build-wasm32:
OK (or following bellow logic, "build-wasm32-32-bit").
extends: .wasm_build_job_template
timeout: 2h
needs:
- job: wasm-emsdk-cross-container
+ job: wasm32-emsdk-cross-container
variables:
IMAGE: emsdk-wasm32-cross
- CONFIGURE_ARGS: --static --disable-tools --enable-debug
--enable-tcg-interpreter
+ CONFIGURE_ARGS: --static --cpu=wasm32 --disable-tools --enable-debug
--enable-tcg-interpreter
+
+build-wasm-wasm64:
Maybe build-wasm64-64bit?> + extends: .wasm_build_job_template
+ timeout: 2h
+ needs:
+ job: wasm64-emsdk-cross-container
+ variables:
+ IMAGE: emsdk-wasm64-cross
+ CONFIGURE_ARGS: --static --cpu=wasm64 --disable-tools --enable-debug
--enable-tcg-interpreter
+
+build-wasm-wasm64l:
So this one becomes build-wasm64-32bit (or better name, "wasm64[l]" is
not easy to distinct and figure out this is the 32-bit AS version.
+ extends: .wasm_build_job_template
+ timeout: 2h
+ needs:
+ job: wasm64l-emsdk-cross-container
+ variables:
+ IMAGE: emsdk-wasm64l-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 8d3be53b75..1bacaff818 100644
--- a/.gitlab-ci.d/container-cross.yml
+++ b/.gitlab-ci.d/container-cross.yml
@@ -92,7 +92,23 @@ win64-fedora-cross-container:
variables:
NAME: fedora-win64-cross
-wasm-emsdk-cross-container:
+wasm32-emsdk-cross-container:
extends: .container_job_template
variables:
NAME: emsdk-wasm32-cross
+ BUILD_ARGS: --build-arg TARGET_CPU=wasm32
+ DOCKERFILE: emsdk-wasm-cross
+
+wasm64-emsdk-cross-container:
+ extends: .container_job_template
+ variables:
+ NAME: emsdk-wasm64-cross
+ BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=1
+ DOCKERFILE: emsdk-wasm-cross
+
+wasm64l-emsdk-cross-container:
(same comments)
+ extends: .container_job_template
+ variables:
+ NAME: emsdk-wasm64l-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 4eec72f383..01ca840413 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
Nitpicking about names, otherwise LGTM!