Experimental Docker build

master
paradust7 2022-08-03 18:38:30 +00:00
parent 86edb519d3
commit c5e8ebd392
3 changed files with 56 additions and 0 deletions

9
.dockerignore Normal file
View File

@ -0,0 +1,9 @@
Dockerfile
build/
build-*/
sources
minetest
www
.git
.github
upload.sh

14
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: build
on: push
jobs:
docker:
name: "Build Docker Image"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build docker image
run: |
docker build . -t mtweb
docker run --rm mtweb node --experimental-wasm-threads /minetest-wasm/www/minetest.js

33
Dockerfile Normal file
View File

@ -0,0 +1,33 @@
FROM ubuntu:22.04
# install deps
RUN \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
wget \
python3 \
git \
build-essential \
cmake \
tclsh \
zip
COPY . /minetest-wasm
# Install emsdk
RUN \
cd "$HOME" \
&& echo "Building from $(pwd)" \
&& git clone --depth 1 https://github.com/emscripten-core/emsdk.git \
&& cd emsdk \
&& ./emsdk install latest \
&& ./emsdk activate latest
# Build minetest-wasm
RUN \
cd "$HOME"/emsdk \
&& . ./emsdk_env.sh \
&& cd /minetest-wasm \
&& ./apply_patches.sh \
&& ls -la \
&& ./build_all.sh