Skip to content

Commit

Permalink
chore: Bump Lean version and add dockerfile for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
joehendrix committed Jan 23, 2024
1 parent d9ad780 commit 9f21552
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
/build
/lakefile.olean
/lake-packages/*
/.lake
/.vscode
3 changes: 1 addition & 2 deletions LibUV/Stream.lean
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import LibUV.Loop

open scoped Alloy.C
alloy c include <stdlib.h> <lean_uv.h>

alloy c include <stdlib.h> <string.h> <lean_uv.h>
section NonemptyProp


Expand Down
19 changes: 19 additions & 0 deletions container/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This is a fairly minimal Ubuntu container that can build
# lean-libuv for testing purposes.
FROM ubuntu:jammy

USER root

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl ca-certificates clang-14 expect git libuv1-dev pkg-config && \
apt-get clean

RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | \
sh -s -- -y --default-toolchain none

RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-14 100

ENV PATH="/root/.elan/bin:${PATH}"

WORKDIR /libuv
1 change: 1 addition & 0 deletions include/lean_uv.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <lean/lean.h>
#include <stdarg.h>
#include <stdlib.h>
#include <uv.h>

Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.3.0
leanprover/lean4:v4.5.0-rc1
11 changes: 9 additions & 2 deletions scripts/runExamples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
lake build

search_dir=/the/path/to/base/dir
dylibs=""
for entry in "build/lib"/*.dylib;
if [[ "$OSTYPE" == "darwin"* ]]; then
dsoext=.dylib
else
dsoext=.so
fi


dynlibs=""
for entry in ".lake/build/lib"/*$dsoext
do
dylibs+=" --load-dynlib=$entry"
done
Expand Down

0 comments on commit 9f21552

Please sign in to comment.