File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ services:
7
7
env :
8
8
global :
9
9
- DOCKER_REPO='ojkwon/arch-emscripten'
10
+ - EMSCRIPTEN_VERSION=1.37.28
11
+ - PROTOBUF_VERSION=3.5.1.1
10
12
matrix :
11
13
- BUILD_TARGET='base'
12
14
- BUILD_TARGET='protobuf'
@@ -20,7 +22,7 @@ script:
20
22
# set docker tag based on last commit short sha.
21
23
- DOCKER_TAG=$DOCKER_REPO:${COMMIT}-$BUILD_TARGET
22
24
- tput setaf 2; echo building docker image tagged as $DOCKER_TAG
23
- - sudo docker build --tag $DOCKER_TAG --build-arg BUILD_TARGET=$BUILD_TARGET --build-arg PROTOBUF_VERSION=3.5.1.1 .
25
+ - sudo docker build --tag $DOCKER_TAG --build-arg BUILD_TARGET=$BUILD_TARGET --build-arg PROTOBUF_VERSION=$PROTOBUF_VERSION --build-arg EMSCRIPTEN_VERSION=$EMSCRIPTEN_VERSION .
24
26
- |
25
27
if [[ ! -z "${TRAVIS_TAG}" ]]; then
26
28
tput setaf 2; echo this build is tagged versioned build, pushing into registry
Original file line number Diff line number Diff line change 4
4
# Build time args
5
5
ARG BUILD_TARGET=""
6
6
ARG PROTOBUF_VERSION=""
7
+ ARG EMSCRIPTEN_VERSION=""
7
8
8
9
# Upgrade system
9
10
RUN pacman --noconfirm -Syyu
@@ -14,14 +15,19 @@ RUN pacman --noconfirm -S \
14
15
python \
15
16
python-setuptools \
16
17
python2-setuptools \
17
- jre8-openjdk \
18
- emscripten
18
+ jre8-openjdk
19
19
20
20
# Change subsequent execution shell to bash
21
21
SHELL ["/bin/bash" , "-l" , "-c" ]
22
22
23
23
USER builder
24
24
25
+ # Install emcc
26
+ RUN cd $TMPDIR && \
27
+ curl https://archive.archlinux.org/packages/e/emscripten/emscripten-$EMSCRIPTEN_VERSION-1-x86_64.pkg.tar.xz > ./emscripten-$EMSCRIPTEN_VERSION-1-x86_64.pkg.tar.xz && \
28
+ curl https://archive.archlinux.org/packages/e/emscripten/emscripten-$EMSCRIPTEN_VERSION-1-x86_64.pkg.tar.xz.sig > ./emscripten-$EMSCRIPTEN_VERSION-1-x86_64.pkg.tar.xz.sig && \
29
+ sudo pacman --noconfirm -U emscripten-$EMSCRIPTEN_VERSION-1-x86_64.pkg.tar.xz
30
+
25
31
# Initialize emcc
26
32
RUN emcc && emcc --version
27
33
@@ -38,9 +44,9 @@ RUN if [[ "${BUILD_TARGET}" == "protobuf" ]]; then \
38
44
cd $TMPDIR/protobuf-wasm && git checkout v$PROTOBUF_VERSION && cp *.patch $TMPDIR/protobuf && \
39
45
cd $TMPDIR/protobuf && git apply *.patch && \
40
46
git status && \
41
- sh autogen.sh && emconfigure ./configure && emmake make && \
47
+ sh autogen.sh && emconfigure ./configure CXXFLAGS= "-O2" && emmake make && \
42
48
cp -r ./src/.libs $TMPDIR/ && \
43
- ls $TMPDIR/.libs; \
49
+ ls -al $TMPDIR/.libs; \
44
50
fi
45
51
46
52
# trigger dummy build to cache corresponding binaryen port for wasm
You can’t perform that action at this time.
0 commit comments