ZeroEpsilon/Dockerfile

23 lines
554 B
Docker

FROM crystallang/crystal:latest AS build
# Install dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libsfml-dev libimgui-dev 'libstdc++6' 'g++' curl
# Add this directory to container as /app
RUN mkdir /ZeroEpsilon
ADD shard.yml shard.lock /ZeroEpsilon/
WORKDIR /ZeroEpsilon
# Install shards
RUN shards install
FROM build AS source
# Copy all sources
ADD spec /ZeroEpsilon/spec
ADD src /ZeroEpsilon/src
WORKDIR /ZeroEpsilon
FROM source AS test
# Run tests
RUN crystal spec --verbose