Skip to content

Commit

Permalink
another test
Browse files Browse the repository at this point in the history
Summary: test invoke `root//third-party/ocaml:ocamlopt-exe` (the ocaml native compiler)

Differential Revision: D54418954
  • Loading branch information
shayne-fletcher authored and facebook-github-bot committed Mar 1, 2024
1 parent c8994f3 commit 7ca0d79
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,27 @@ jobs:
with:
submodules: 'true'
- uses: facebook/install-dotslash@latest
- run: sudo apt-get update && sudo apt-get install opam
- name: Install packages (ubuntu)
run: sudo apt-get update && sudo apt-get install opam
if: matrix.os == 'ubuntu'
- run: brew install opam
- name: Install packages (macos)
run: brew install opam
if: matrix.os == 'macos'
- run: |-
- name: Install opam
run: |-
opam init --color=always --compiler=5.1.1 --disable-sandboxing -y
opam install --color=always ocamlfind
opam env | sed -e "s/ export .*//g" -e "s/'//g" -e "s/\;//g" >> $GITHUB_ENV
- run: |-
- name: Generate 'third-party/ocaml/BUCK.test'
run: |-
mkdir -p third-party/ocaml
(cd third-party/ocaml && ln -s "$OPAM_SWITCH_PREFIX" opam)
python3 dromedary.py -s "$(basename $OPAM_SWITCH_PREFIX)" -o third-party/ocaml/BUCK.test
cat third-party/ocaml/BUCK.test
- run: |-
PATH=$(pwd):$PATH; export PATH
buck2 run root//test:version -v 2
- run: echo "PATH=$(pwd):$PATH" >> $GITHUB_ENV
- name: Test 'third-party/ocaml/BUCK.test'
run: |-
# check for caml headers
buck2 run root//test:version
# print ocamlopt.opt configuration
cat $(buck2 build root//test:config --show-full-simple-output)
7 changes: 7 additions & 0 deletions test/BUCK.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ cxx_binary(
deps = ["root//third-party/ocaml:ocaml-dev"],
) if _SUPPORTED else None

# buildifier: disable=no-effect
genrule(
name = "config",
out = "config.txt",
bash = '$(exe_target root//third-party/ocaml:ocamlopt-exe) -config > $OUT',
) if _SUPPORTED else None

# buildifier: disable=no-effect
ocaml_binary(
name = "unix",
Expand Down

0 comments on commit 7ca0d79

Please sign in to comment.