Skip to content

Commit 7fb60e8

Browse files
authored
Pull different Emscripten SDK versions according to build type (#53)
1 parent 2503a68 commit 7fb60e8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/build_libzim_wasm.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ env:
4242
DISPATCH_TYPE: ${{ github.event.inputs.buildtype }}
4343
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444
SSH_KEY: ${{ secrets.SSH_KEY }}
45+
BUILD_TYPE: ${{ github.event.inputs.buildtype }}
4546

4647
jobs:
4748
build:
@@ -51,7 +52,13 @@ jobs:
5152
- uses: actions/checkout@v3
5253
# Customizes the Emscripten docker container via the Dockerfile in this repo
5354
- name: Build the Docker image
54-
run: docker build -t "docker-emscripten-libzim:v3" ./docker
55+
run: |
56+
if [[ $BUILD_TYPE =~ 'source' ]]; then
57+
BUILD_VERSION='3.1.12'
58+
else
59+
BUILD_VERSION='3.1.41'
60+
fi
61+
docker build -t "docker-emscripten-libzim:v3" ./docker --build-arg VERSION=$BUILD_VERSION
5562
# If we're building release version
5663
- name: Build release from libzim binaries
5764
if: github.event_name == 'pull_request' || github.event_name == 'push' || github.event.inputs.buildtype == 'release'

docker/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Docker image suitable to build libzim & kiwixlib with emscripten
2-
FROM emscripten/emsdk:3.1.41
2+
ARG VERSION
3+
FROM emscripten/emsdk:${VERSION}
34

45
# Install build tools
56
RUN apt-get update && apt-get install -y --no-install-recommends wget ninja-build pkg-config python3 autopoint libtool autoconf patch g++ locales curl git \

0 commit comments

Comments
 (0)