Skip to content

Commit c04f7b0

Browse files
committed
Use dune -x instead of a rule to compile the cosmopolitan example
1 parent bc33114 commit c04f7b0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

.github/workflows/esperanto.yml

+3-9
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: opam install opam-monorepo
2828
- name: Add opam-monorepo overlays
2929
run: opam repo add dune-universe git+https://github.com/dune-universe/opam-overlays.git
30-
- name: Example with LWT & Esperanto
30+
- name: Example with lwt & esperanto
3131
run: |
3232
mkdir esperanto-example
3333
cd esperanto-example
@@ -70,13 +70,6 @@ jobs:
7070
(executable
7171
(name cat)
7272
(libraries lwt.unix))
73-
74-
(rule
75-
(target cat.com)
76-
(enabled_if (= %{context_name} esperanto))
77-
(mode promote)
78-
(deps cat.exe)
79-
(action (run objcopy -S -O binary %{deps} %{target})))
8073
EOF
8174
cat >cat.opam <<EOF
8275
opam-version: "2.0"
@@ -106,5 +99,6 @@ jobs:
10699
EOF
107100
opam monorepo lock --ocaml-version ${{ matrix.ocaml-version }}
108101
opam monorepo pull
109-
opam exec -- dune build ./cat.com
102+
opam exec -- dune build -x esperanto ./cat.exe
103+
objcopy -S -O binary _build/default.esperanto/cat.exe cat.com
110104
./cat.com < cat.ml

0 commit comments

Comments
 (0)