-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from beeceej/speed-runtime-up
LGTM: include binary in repo
- Loading branch information
Showing
5 changed files
with
35 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,4 @@ | ||
FROM ocaml/opam2 as build | ||
RUN sudo apt-get update -y && \ | ||
sudo apt-get install \ | ||
pkg-config \ | ||
libgmp-dev \ | ||
m4 \ | ||
netbase -y | ||
RUN opam install -y dune \ | ||
tls \ | ||
cohttp \ | ||
cohttp-lwt-unix \ | ||
yojson \ | ||
atdgen | ||
WORKDIR lgtm | ||
ADD . . | ||
RUN sudo chown -R opam:nogroup . | ||
RUN ./bin/build | ||
|
||
FROM debian:buster-slim | ||
COPY --from=build /home/opam/opam-repository/lgtm/_build/default/src/main.exe lgtm | ||
RUN apt-get update -y && apt-get install netbase -y | ||
ADD bin bin | ||
ADD . . | ||
ENTRYPOINT ./bin/entrypoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ocaml/opam2 as build | ||
WORKDIR lgtm | ||
RUN sudo apt-get update -y && sudo apt-get install -y \ | ||
pkg-config \ | ||
libgmp-dev \ | ||
m4 | ||
RUN opam install -y dune \ | ||
tls \ | ||
cohttp \ | ||
cohttp-lwt-unix \ | ||
yojson \ | ||
atdgen | ||
ADD . . | ||
RUN sudo chown -R opam:nogroup . | ||
RUN ./bin/build | ||
RUN mkdir release | ||
RUN mv _build/default/src/main.exe release/lgtm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
VERSION := "v0.0.3" | ||
RELEASE_IMAGE := beeceej/lgtm:release | ||
|
||
release: clean lgtm | ||
git tag -a "$(VERSION)" -m "release $(VERSION)" | ||
git push --tags | ||
|
||
lgtm: docker-release | ||
docker run -it --rm -v "$${PWD}/release:/home/opam/opam-repository/lgtm/tmp" beeceej/lgtm:release mv release/lgtm tmp/lgtm | ||
docker-release: | ||
docker build -t $(RELEASE_IMAGE) -f Dockerfile.release . | ||
|
||
clean: | ||
rm -rf release | ||
|
||
.PHONY: clean docker-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#! /bin/sh | ||
|
||
/lgtm | ||
./release/lgtm |
Binary file not shown.