From def97411117347075d86658a5f082fe92cb10615 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 1 Jun 2021 17:35:24 -0400 Subject: [PATCH] chore: Install wasmception after bind mount --- Dockerfile.x86_64 | 7 +------ Makefile | 8 ++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile.x86_64 b/Dockerfile.x86_64 index cd68676..323eb7b 100644 --- a/Dockerfile.x86_64 +++ b/Dockerfile.x86_64 @@ -4,7 +4,6 @@ FROM ubuntu:focal ARG DEBIAN_FRONTEND=noninteractive ARG HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64 ARG WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-8/wasi-sdk_8.0_amd64.deb -ARG WASMCEPTION_URL=https://github.com/gwsystems/wasmception/releases/download/v0.2.0/wasmception-linux-x86_64-0.2.0.tar.gz ARG SHFMT_URL=https://github.com/mvdan/sh/releases/download/v3.2.4/shfmt_v3.2.4_linux_amd64 ARG SHELLCHECK_URL=https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz @@ -48,6 +47,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ fonts-roboto \ gnuplot \ imagemagick \ + libz3-4 \ netpbm \ pango1.0-tools \ wamerican @@ -76,11 +76,6 @@ ENV LLVM_VERSION=8 ADD install_llvm.sh /sledge/install_llvm.sh RUN ./sledge/install_llvm.sh $LLVM_VERSION -# Wasmception -RUN wget $WASMCEPTION_URL -O wasmception.tar.gz -RUN mkdir -p /sledge/awsm/wasmception -RUN tar xvfz wasmception.tar.gz -C /sledge/awsm/wasmception - # WASI-SDK # TODO: Refactor to output as an arch-neutral filename # RUN curl -sS -L -O $WASI_SDK_URL && dpkg -i wasi-sdk_8.0_amd64.deb && rm -f wasi-sdk_8.0_amd64.deb diff --git a/Makefile b/Makefile index 457987f..7baa02c 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,16 @@ +SHELL:=/bin/bash +ARCH:=$(shell arch) + COMPILER=awsm ROOT=${ROOT:-$(cd "$(dirname ${BASH_SOURCE:-$0})" && pwd)} +WASMCEPTION_URL=https://github.com/gwsystems/wasmception/releases/download/v0.2.0/wasmception-linux-x86_64-0.2.0.tar.gz +# TODO: Add ARM release build .PHONY: build build: +ifeq ($(ARCH),x86_64) + pushd /sledge/awsm/wasmception && wget ${WASMCEPTION_URL} -O wasmception.tar.gz && tar xvfz wasmception.tar.gz && rm wasmception.tar.gz && popd +endif test -f ./${COMPILER}/wasmception/dist/bin/clang || make -C ${COMPILER}/wasmception @cd ${COMPILER} && cargo build --release && cd ${ROOT}