Skip to content

Commit

Permalink
WIP Test the compiler libs in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shym committed Nov 6, 2024
1 parent fbd7e0a commit 2368ee1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/build-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ env:
let _ =
Printf.printf "Version: %s\nOS: %s\nUnix: %b\nWin: %b\nCygwin: %b\n"
Sys.ocaml_version Sys.os_type Sys.unix Sys.win32 Sys.cygwin
COMPLIBS_PROG_X86_64: |
let _ =
Printf.printf "allow_unaligned_access = %b\n" Arch.allow_unaligned_access;
Printf.printf "win64 = %b\n" Arch.win64
COMPLIBS_PROG_AARCH64: |
let _ =
Printf.printf "allow_unaligned_access = %b\n" Arch.allow_unaligned_access;
Printf.printf "macosx = %b\n" Arch.macosx
jobs:
non-cross:
Expand Down Expand Up @@ -96,10 +104,10 @@ jobs:
$HOME/cross/bin/ocamlopt.opt.exe -config
- name: Cross compile a small program
run: |
printf %s "$EXAMPLE_PROGRAM" > example.ml
printf %s "$EXAMPLE_PROGRAM$COMPLIBS_PROG_X86_64" > example.ml
set -x
cat example.ml
$HOME/cross/bin/ocamlopt.opt.exe example.ml -o example.exe -verbose
$HOME/cross/bin/ocamlopt.opt.exe -I cross/lib/ocaml/compiler-libs/ ocamlcommon.cmxa ocamloptcomp.cmxa example.ml -o example.exe -verbose
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -190,10 +198,10 @@ jobs:
$HOME/cross/bin/ocamlopt.opt -config
- name: Cross compile a small program
run: |
printf %s "$EXAMPLE_PROGRAM" > example.ml
printf %s "$EXAMPLE_PROGRAM$COMPLIBS_PROG_AARCH64" > example.ml
set -x
cat example.ml
$HOME/cross/bin/ocamlopt.opt example.ml -o example -verbose
$HOME/cross/bin/ocamlopt.opt -I cross/lib/ocaml/compiler-libs/ ocamlcommon.cmxa ocamloptcomp.cmxa example.ml -o example -verbose
- name: Run the small example program
run: |
set -x
Expand Down

0 comments on commit 2368ee1

Please sign in to comment.