Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test ARM64 with Drone Cloud #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
kind: pipeline
name: ARM64 Tests

platform:
os: linux
arch: arm64

steps:
- name: build
image: ocaml/opam:debian-ocaml-4.11
commands:
- sudo chown -R opam .
- opam pin add libmacaroons.dev . --no-action
- opam pin add bakery-macaroons.dev . --no-action
- opam depext libmacaroons bakery-macaroons --with-doc --with-test
- opam install -y -t --deps-only .
- opam exec -- dune build @runtest
10 changes: 9 additions & 1 deletion libmacaroons/config/discover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,20 @@ let define_constants c =
| false, false, false -> raise (Invalid_argument "Cannot find libutil implementation") in
C.C_define.gen_header_file c ~fname:"config.h" configs

let arch_flags c =
let arch = C.ocaml_config_var_exn c "architecture" in
let flags = match arch with
| "arm64" -> []
| _ -> ["-msse4.1"]
in
String.concat " " flags


let ocamlopt_lines c =
let cflags =
try C.ocaml_config_var_exn c "ocamlopt_cflags"
with _ -> "-O3 -fno-strict-aliasing -fwrapv" in
let cflags = cflags ^ " -msse4.1" in
let cflags = cflags ^ (arch_flags c) in
C.Flags.extract_blank_separated_words cflags

let link_flags c =
Expand Down