update workflow files and readme

This commit is contained in:
joneugster
2023-11-09 17:51:20 +01:00
parent 0e18fd850d
commit b19bb8a23b
5 changed files with 67 additions and 74 deletions

View File

@@ -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;

View File

@@ -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": {

View File

@@ -3,8 +3,8 @@ version: "3.9"
services:
game:
build:
context: .
dockerfile: Dockerfile
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/home/node/game
ports: