Set __Unikraft__ in the C compiler wrapper #23
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
name: Build and test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Compute dummy PATH | |
run: | | |
echo "DUMMYPATH=$PWD/.github/bin/:$PATH" >> "$GITHUB_ENV" | |
- name: Install OCaml compiler | |
uses: ocaml/setup-ocaml@v3 | |
env: | |
PATH: ${{ env.DUMMYPATH }} | |
OVERRIDE_APT_INSTALL: bubblewrap g++-multilib gcc-multilib | |
with: | |
ocaml-compiler: 5.2.0 | |
- name: Install extra packages | |
run: | | |
sudo apt-get install -y gcc-aarch64-linux-gnu \ | |
qemu-system-x86 qemu-system-arm | |
- name: Install arch-specific packages | |
run: | | |
opam install \ | |
ocaml-unikraft-x86_64 \ | |
ocaml-unikraft-backend-qemu-x86_64 \ | |
ocaml-unikraft-backend-fc-x86_64 \ | |
ocaml-unikraft-arm64 \ | |
ocaml-unikraft-backend-qemu-arm64 \ | |
ocaml-unikraft-backend-fc-arm64 | |
- name: Show configuration | |
run: | | |
opam exec -- ocamlc -config | |
opam config list | |
opam list | |
- name: Install default x86_64 packages | |
run: | | |
opam install \ | |
ocaml-unikraft \ | |
ocaml-unikraft-default-x86_64 \ | |
ocaml-unikraft-backend-qemu \ | |
ocaml-unikraft-backend-fc | |
- name: Show toolchain configuration | |
run: | | |
opam exec -- ocamlfind -toolchain unikraft ocamlc -config | |
- name: Test example | |
run: | | |
opam install dune | |
cd example | |
opam exec -- dune runtest | |
UNIKERNEL_CMDLINE=sleep opam exec -- dune runtest | |
- name: Install the other default packages | |
run: | | |
opam install ocaml-unikraft-default-arm64 | |
- name: Show configuration | |
run: | | |
opam exec -- ocamlfind -toolchain unikraft ocamlc -config | |
- name: Test example | |
run: | | |
opam install dune | |
cd example | |
opam exec -- dune runtest | |
UNIKERNEL_CMDLINE=sleep opam exec -- dune runtest | |
# Currently the ARM port is failing | |
continue-on-error: true |