Skip to content

Commit

Permalink
Use dune -x instead of a rule to compile the cosmopolitan example
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosaure committed Jan 7, 2023
1 parent e7bedc6 commit cd35189
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/esperanto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: opam install opam-monorepo
- name: Add opam-monorepo overlays
run: opam repo add dune-universe git+https://github.com/dune-universe/opam-overlays.git
- name: Example with LWT & Esperanto
- name: Example with lwt & esperanto
run: |
mkdir esperanto-example
cd esperanto-example
Expand Down Expand Up @@ -70,13 +70,6 @@ jobs:
(executable
(name cat)
(libraries lwt.unix))
(rule
(target cat.com)
(enabled_if (= %{context_name} esperanto))
(mode promote)
(deps cat.exe)
(action (run objcopy -S -O binary %{deps} %{target})))
EOF
cat >cat.opam <<EOF
opam-version: "2.0"
Expand Down Expand Up @@ -106,5 +99,6 @@ jobs:
EOF
opam monorepo lock --ocaml-version ${{ matrix.ocaml-version }}
opam monorepo pull
opam exec -- dune build ./cat.com
opam exec -- dune build -x esperanto ./cat.exe
objcopy -S -O binary _build/default.esperanto/cat.exe cat.com
./cat.com < cat.ml

0 comments on commit cd35189

Please sign in to comment.