Skip to content
Snippets Groups Projects
Verified Commit b4d11df8 authored by Konrad Botor's avatar Konrad Botor
Browse files

Added Emscripten image build to CI - ref. !12

parent 195d418a
No related branches found
No related tags found
No related merge requests found
Pipeline #70858 passed
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
*.sh text eol=lf
Dockerfile.* text eol=lf
\ No newline at end of file
Dockerfile.* text eol=lf
*.patch text eol-lf
\ No newline at end of file
......@@ -75,7 +75,7 @@ lint_python_scripts:
.build_docker_image:
extends: .docker_image_builder_job_template
image: docker:20.10.21
image: docker:24.0.1-cli
variables:
BUILD_TARGET: ""
before_script:
......@@ -96,7 +96,7 @@ lint_python_scripts:
fi
echo -e "\e[0Ksection_end:$(date +%s):tag\r\e[0K"
echo -e "\e[0Ksection_start:$(date +%s):build[collapsed=true]\r\e[0KBaking image "$CI_REGISTRY_IMAGE/$BUILD_TARGET:${tag}"..."
docker buildx bake --progress=plain --push "$BUILD_TARGET"
docker buildx bake --progress=plain --provenance=false --push "$BUILD_TARGET"
echo -e "\e[0Ksection_end:$(date +%s):build\r\e[0K"
tags:
- public-runner-docker
......@@ -111,7 +111,7 @@ build_docker_dind_image:
exists:
- Dockerfile.docker-dind
services:
- docker:20.10.21-dind
- docker:24.0.1-dind
build_docker_builder_image:
extends: .build_docker_image
......@@ -161,6 +161,18 @@ build_tox_test_runner_image:
exists:
- Dockerfile.tox-test-runner
build_emscripten_image:
extends: .build_docker_image
stage: build
variables:
BUILD_TARGET: "emscripten"
needs:
- build_docker_dind_image
rules:
- if: $CI_COMMIT_BRANCH
exists:
- Dockerfile.emscripten
example_docker_image_builder_job:
extends: .docker_image_builder_job_template
stage: example-build
......
# syntax=docker/dockerfile:1.5
ARG EMSCRIPTEN_VERSION=3.1.43
FROM emscripten/emsdk:${EMSCRIPTEN_VERSION} AS pure_emscripten_sdk
......@@ -23,18 +24,30 @@ ENV OPENSSL_VERSION_TAG=${OPENSSL_VERSION_TAG}
USER emscripten
WORKDIR /home/emscripten
RUN mkdir -vp tmp_src && cd tmp_src && \
git clone https://github.com/boostorg/boost.git && \
cd boost && \
git checkout tags/${BOOST_VERSION_TAG} && \
git submodule update --init --recursive && \
cd .. && \
git clone https://github.com/openssl/openssl.git && \
cd openssl && \
git checkout tags/${OPENSSL_VERSION_TAG} && \
git submodule update --init --recursive && \
cd .. && \
git clone https://github.com/ElementsProject/secp256k1-zkp.git
RUN <<-EOF
set -e
git config --global advice.detachedHead false
mkdir -vp tmp_src
cd tmp_src
git clone https://github.com/boostorg/boost.git
cd boost
git checkout tags/${BOOST_VERSION_TAG}
git submodule update --init --recursive
cd ..
git clone https://github.com/openssl/openssl.git
cd openssl
git checkout tags/${OPENSSL_VERSION_TAG}
git submodule update --init --recursive
cd ..
git clone https://github.com/ElementsProject/secp256k1-zkp.git
EOF
FROM lib_source as emscripten_lib_builder
......
variable "CI_REGISTRY_IMAGE" {}
variable "CI_COMMIT_SHA" {}
variable "EMSCRIPTEN_VERSION" {
default = null
}
variable "BOOST_VERSION_TAG" {
default = null
}
variable "OPENSSL_VERSION_TAG" {
default = null
}
variable "tag" {
default = "latest"
}
......@@ -64,4 +73,16 @@ target "tox-test-runner" {
tags = generate-tags("tox-test-runner")
cache-from = generate-cache-from("tox-test-runner")
cache-to = generate-cache-to("tox-test-runner")
}
target "emscripten" {
dockerfile = "Dockerfile.emscripten"
tags = generate-tags("emscripten")
cache-from = generate-cache-from("emscripten")
cache-to = generate-cache-to("emscripten")
args = {
EMSCRIPTEN_VERSION = "${EMSCRIPTEN_VERSION}",
BOOST_VERSION_TAG = "${BOOST_VERSION_TAG}",
OPENSSL_VERSION_TAG = "${OPENSSL_VERSION_TAG}"
}
}
\ No newline at end of file
......@@ -29,7 +29,7 @@ printf "using clang : emscripten : emcc -s USE_ZLIB=1 -s USE_ICU=0 : <archiver>e
./b2 \
--build-dir="${TMP_SRC}/boost_build/" \
--prefix="${INSTALL_PREFIX}" \
-j $(nproc) \
-j "$(nproc)" \
-q \
runtime-link=static \
link=static \
......
......@@ -23,6 +23,7 @@ emconfigure ./Configure \
linux-x32 \
-static
# shellcheck disable=SC2016
sed -i 's/$(CROSS_COMPILE)//' Makefile
emmake make -j 8
emmake make install
......
......@@ -13,6 +13,16 @@ git checkout d22774e248c703a191049b78f8d04f37d6fcfa05
export VERBOSE=1
emconfigure ./autogen.sh
emconfigure ./configure --prefix=${INSTALL_PREFIX} --with-asm=no --enable-shared=no --enable-tests=no --enable-benchmark=no --enable-exhaustive-tests=no --with-pic=no --with-valgrind=no --enable-module-recovery=yes --enable-module-rangeproof=yes --enable-experimental
emconfigure ./configure --prefix="${INSTALL_PREFIX}" \
--with-asm=no \
--enable-shared=no \
--enable-tests=no \
--enable-benchmark=no \
--enable-exhaustive-tests=no \
--with-pic=no \
--with-valgrind=no \
--enable-module-recovery=yes \
--enable-module-rangeproof=yes \
--enable-experimental
emmake make
emmake make install
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment