Skip to content
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

Support build with Mirage 4.5.1 and OCaml 5.2 #838

Closed
wants to merge 3 commits into from
Closed
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
34 changes: 34 additions & 0 deletions .github/workflows/mirage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build the Mirage unikernel
on: [push, pull_request]

jobs:
mirage:
name: OCaml 5.2.0
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install OPAM and OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5.2.0

- name: Install dependencies
run: |
sudo apt-get install -y libseccomp-dev
opam pin add -n ocaml-solo5 'https://github.com/shym/ocaml-solo5.git#ocaml-5.2-reb'
opam install mirage ocaml-solo5

- name: Build
run: |
rm Makefile # To let mirage create its custom Makefile instead
opam exec -- mirage configure -t hvt -f mirage/config.ml
opam exec -- make depend
opam exec -- dune build mirage/

- name: Query the built unikernel
run: |
opam exec -- solo5-elftool query-abi mirage/dist/www.hvt
opam exec -- solo5-elftool query-manifest mirage/dist/www.hvt
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ opam install "mirage>=4.0.0"
Then, the unikernel can be _configured_:

```bash
rm Makefile # To let mirage create its custom Makefile instead
mirage configure -f mirage/config.ml -t <TARGET> ...
```

Expand Down
4 changes: 1 addition & 3 deletions mirage/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ let tls_key =
Key.(create "tls" Arg.(opt tls_conv No doc))

let packages = [ package "mirageio"; package ~build:true "yaml" ]

let packages_v =
Key.if_ Key.is_solo5 [ package ~scope:`Switch "solo5" ~max:"0.8.0" ] []
let packages_v = Key.if_ Key.is_solo5 [ package ~scope:`Switch "solo5" ] []

let https =
let runtime_args = [ runtime_arg ~pos:__POS__ "Unikernel_tls.setup" ] in
Expand Down