-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (40 loc) · 1.33 KB
/
main.yml
File metadata and controls
40 lines (40 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Compile
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
operating-system: [ubuntu-latest]
ocaml-version: ["5.3.0"]
runs-on: ${{ matrix.operating-system }}
steps:
- uses: nschloe/action-cached-lfs-checkout@v1
# - uses: actions/checkout@v4
# with:
# lfs: true
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
allow-prerelease-opam: true
# See jart/cosmopolitan#3
- name: Fix binfmt and Cosmopolitan
run: |
sudo wget -O /usr/bin/ape https://cosmo.zip/pub/cosmos/bin/ape-$(uname -m).elf
sudo chmod +x /usr/bin/ape
sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
- name: Use the upstream version of OCaml 5.3.0
run: opam switch create 5.3.0
- name: Pinning packages
run: opam pin add -t -yn -vvv --kind=path --with-version=dev .
- name: Install cosmopolitan/esperanto and dune
run: opam depext -iyt -v esperanto-cosmopolitan x86_64-esperanto aarch64-esperanto dune
- name: Compiling example project (cat.com)
run: |
cd example/
opam install ocamlfind
opam exec -- dune build ./cat.exe
opam exec -- ./link.sh
- name: Execute cat.com
run: |
cd example/
./cat.com < cat.ml