update workflow files and readme
This commit is contained in:
@@ -2,21 +2,27 @@ FROM node:20
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ENV ELAN_HOME=/usr/local/elan \
|
||||
PATH=/usr/local/elan/bin:$PATH \
|
||||
LEAN_VERSION=leanprover/lean4:v4.1.0
|
||||
# TODO: read toolchain from `lean-toolchain`
|
||||
|
||||
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
||||
|
||||
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --no-modify-path --default-toolchain $LEAN_VERSION; \
|
||||
chmod -R a+w $ELAN_HOME; \
|
||||
elan --version; \
|
||||
lean --version; \
|
||||
leanc --version; \
|
||||
lake --version;
|
||||
COPY ./lean-toolchain /lean-toolchain
|
||||
|
||||
USER node
|
||||
|
||||
WORKDIR /home/node
|
||||
RUN git clone https://github.com/leanprover-community/lean4game.git
|
||||
|
||||
RUN export LEAN_VERSION="$(cat /lean-toolchain | grep -oE '[^:]+$')" && git clone --depth 1 --branch $LEAN_VERSION https://github.com/leanprover-community/lean4game.git
|
||||
|
||||
WORKDIR /
|
||||
|
||||
USER root
|
||||
|
||||
ENV ELAN_HOME=/usr/local/elan \
|
||||
PATH=/usr/local/elan/bin:$PATH
|
||||
|
||||
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
||||
|
||||
RUN export LEAN_VERSION="$(cat /lean-toolchain)" && \
|
||||
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --no-modify-path --default-toolchain $LEAN_VERSION; \
|
||||
chmod -R a+w $ELAN_HOME; \
|
||||
elan --version; \
|
||||
lean --version; \
|
||||
leanc --version; \
|
||||
lake --version;
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
"overrideCommand": true,
|
||||
"onCreateCommand": {
|
||||
"npm_install": "(cd ~/lean4game && npm install)",
|
||||
"lake_build": "(cd ~/game && lake update && lake exe cache get && lake build)"
|
||||
"lake_build": "(cd ~/game && lake clean && lake exe cache get && lake build)"
|
||||
},
|
||||
"postStartCommand": "cd ~/lean4game && export LEAN4GAME_SINGLE_GAME=true && npm start",
|
||||
"postStartCommand": "cd ~/lean4game && export VITE_LEAN4GAME_SINGLE=true && npm start",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
|
||||
@@ -3,8 +3,8 @@ version: "3.9"
|
||||
services:
|
||||
game:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
context: ..
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
volumes:
|
||||
- ..:/home/node/game
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user