Skip to content

Upgrading Mirage Packages #646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM ocaml/opam:alpine-3.19-ocaml-4.14 AS build
RUN opam update
FROM ocaml/opam:alpine-ocaml-5.3 AS build
RUN opam-2.2 update

ADD . /home/opam/vpnkit
RUN opam pin add vpnkit /home/opam/vpnkit --kind=path -n
RUN opam depext vpnkit -y
RUN opam-2.2 pin add vpnkit file:///home/opam/vpnkit -n

RUN opam install vpnkit -y
RUN opam-2.2 install vpnkit -y

FROM scratch AS binary
COPY --from=build /home/opam/.opam/4.14/bin/vpnkit /vpnkit
COPY --from=build /home/opam/.opam/5.3/bin/vpnkit /vpnkit

FROM alpine:latest
COPY --from=binary /vpnkit /vpnkit
13 changes: 6 additions & 7 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM ocaml/opam:alpine-3.19-ocaml-4.14 AS build
RUN opam update
FROM ocaml/opam:alpine-ocaml-5.3 AS build
RUN opam-2.2 update

ADD . /home/opam/vpnkit
RUN sudo chown opam:opam -R vpnkit
WORKDIR /home/opam/vpnkit
RUN opam pin add vpnkit /home/opam/vpnkit --kind=path -n
RUN opam depext vpnkit -y
RUN opam-2.2 pin add vpnkit /home/opam/vpnkit --kind=path -n

RUN opam install vpnkit -y -t
RUN opam-2.2 install vpnkit -y -t

# unit tests
RUN opam exec -- dune runtest
RUN opam-2.2 exec -- dune runtest
# integration tests
RUN opam exec -- dune build @e2e
RUN opam-2.2 exec -- dune build @e2e

# we're not interested in the intermediate artifacts
FROM scratch
Expand Down
1 change: 1 addition & 0 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

(rule
(target vpnkit.tgz)
(enabled_if (= %{os_type} "macOS"))
(deps vpnkit.exe (:gen ./scripts/mac_package.exe))
(action (run %{gen} -out %{target} -in %{deps})))

Expand Down
3 changes: 2 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
(lang dune 2.0)
(lang dune 3.4)

(name vpnkit)
8 changes: 8 additions & 0 deletions dune-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(lang dune 3.4)
(env
(dev
(flags
(:standard -warn-error +A-67-69))) ; Disable some unused warnings.
(release
(flags
(:standard -warn-error +A-58))))
Loading