Skip to content

Commit

Permalink
Upgrade bob with the last version of esperanto
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosaure committed Dec 18, 2023
1 parent 0014628 commit bc131e0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/esperanto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
ocaml-version: ["4.14.0"]
ocaml-version: ["4.14.1"]
runs-on: ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v2
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
opam-disable-sandboxing: true
# See jart/cosmopolitan#3
- name: Fix binfmt and Cosmopolitan
run: sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register"
- name: Pin & Install workflows
run: |
opam install esperanto.0.0.4
opam pin add -y https://github.com/dinosaure/esperanto.git
opam install ocamlfind opam-monorepo
opam repo add upstream git+https://github.com/ocaml/opam-repository.git
opam repo add dune-universe git+https://github.com/dune-universe/opam-overlays.git
Expand All @@ -26,9 +27,9 @@ jobs:
run: |
env OPAMVAR_monorepo='opam-monorepo' opam monorepo lock --require-cross-compile --build-only --ocaml-version ${{ matrix.ocaml-version }} com
env OPAMVAR_monorepo='opam-monorepo' opam monorepo pull
opam exec -- dune build -x esperanto -p bob bin/bob.exe
objcopy -S -O binary _build/default.esperanto/bin/bob.exe bob.com
strip bob.com
opam exec -- dune build -x x86_64_esperanto -p bob bin/bob.exe
opam exec -- dune build -x aarch64_esperanto -p bob bin/bob.exe
opam exec -- ./link.sh
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion com.opam
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ pin-depends: [
[ "mirage-crypto-pk.dev" "git+https://github.com/dinosaure/mirage-crypto.git#83b160823cc601ffb19f8be2e32d643ffcbea60d" ]
[ "mirage-crypto-ec.dev" "git+https://github.com/dinosaure/mirage-crypto.git#83b160823cc601ffb19f8be2e32d643ffcbea60d" ]
[ "mirage-crypto-rng.dev" "git+https://github.com/dinosaure/mirage-crypto.git#83b160823cc601ffb19f8be2e32d643ffcbea60d" ]
[ "mtime.dev" "git+https://github.com/dinosaure/mtime.git#d5d70f38c40da90e3e173eb60346df55b64a4a0a"]
[ "mtime.dev" "git+https://github.com/dinosaure/mtime.git#d5d70f38c40da90e3e173eb60346df55b64a4a0a" ]
[ "gmp.dev" "git+https://github.com/mirage/ocaml-gmp.git#dfc83c74a327d848074ecf0d33b009eaf5625250" ]
]

x-mirage-opam-lock-location: "com.opam.locked"
Expand Down
10 changes: 10 additions & 0 deletions link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

apelink \
-V "0b1111101" \
-o bob.com \
-l $(opam var bin)/ape-x86_64.elf \
-l $(opam var bin)/ape-aarch64.elf \
-M $(opam var bin)/ape-m1.c \
_build/default.x86_64_esperanto/bin/bob.exe.dbg \
_build/default.aarch64_esperanto/bin/bob.exe.dbg

0 comments on commit bc131e0

Please sign in to comment.