Skip to content
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
16 changes: 15 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
*.opam
!ocaml-solo5-cross-aarch64.opam
- name: Install ocaml-solo5 and dune
run: opam install ocaml-solo5 conf-libseccomp dune
run: opam install ocaml-solo5 conf-libseccomp dune fmt
- name: Show the toolchain configuration
run: |
set -x
Expand All @@ -35,3 +35,17 @@ jobs:
run: MODE=muen opam exec -- dune build --root example
- name: Compile examples with xen
run: MODE=xen opam exec -- dune build --root example
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
sudo apt-get update
sudo apt-get install -y libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils qemu-kvm qemu-system-x86
sudo usermod -a -G kvm,libvirt $USER
- name: Run a Solo5 unikernel (hvt)
run: |
opam exec -- dune describe location --root example --context solo5 --no-print-directory ./hello.exe &> unikernel.tmp
echo "UNIKERNEL=$(cat unikernel.tmp)" >> $GITHUB_ENV
- name: Run a simple Hello World!
run: opam exec -- solo5-hvt -- "example/$UNIKERNEL"
2 changes: 1 addition & 1 deletion example/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
; Force linking the manifest in
-cclib
"-u __solo5_mft1_note")
(libraries solo5os)
(libraries solo5os fmt)
(modes native))

(rule
Expand Down
2 changes: 1 addition & 1 deletion example/dune_gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ let print_rule test exitcode extraifs extralibs =
exitcode

let _ =
print_rule "hello" None [] [];
print_rule "hello" None [] ["fmt"];
print_rule "sysfail" (Some 2) [] [];
print_rule "config" None [] [];
print_rule "compilerlibsx86" None
Expand Down
2 changes: 1 addition & 1 deletion example/hello.ml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
let () = Printf.printf "Hello from OCaml on Solo5!\n%!";;
let () = Fmt.pr "Hello from OCaml on Solo5!\n%!";;
Loading