From 101ec138e1fdeffbf67cef231fa496441a8eb44b Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Tue, 2 Jul 2024 20:53:09 +0200 Subject: [PATCH] Initial commit --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ a.ml | 1 + 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 a.ml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3152c06 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Cache apt packages for setup-ocaml + uses: awalsh128/cache-apt-pkgs-action@v1.4.2 + with: + packages: bubblewrap darcs g++-multilib gcc-multilib mercurial musl-tools rsync + version: v2 + + - name: Setup OCaml + uses: ocaml/setup-ocaml@v3.0.0 + with: + # ocaml-compiler: ocaml.5.2.0,ocaml-option-static + ocaml-compiler: 5.2.0 + allow-prerelease-opam: true + opam-pin: false + + - name: Test compile + run: opam exec -- ocamlopt -ccopt -static a.ml + + - name: Check output + run: file a.out + + - name: Run output + run: ./a.out diff --git a/a.ml b/a.ml new file mode 100644 index 0000000..e396c6a --- /dev/null +++ b/a.ml @@ -0,0 +1 @@ +let () = print_endline "hello world"