summaryrefslogtreecommitdiff
path: root/tools/ci/inria/launch
blob: 3de4eeb4471ef74fabd5cc915a7e1553dd471ca0 (plain)
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
#!/bin/sh
#**************************************************************************
#*                                                                        *
#*                                 OCaml                                  *
#*                                                                        *
#*              Xavier Leroy, projet Cambium, INRIA Paris                 *
#*                                                                        *
#*   Copyright 2021 Institut National de Recherche en Informatique et     *
#*     en Automatique.                                                    *
#*                                                                        *
#*   All rights reserved.  This file is distributed under the terms of    *
#*   the GNU Lesser General Public License version 2.1, with the          *
#*   special exception on linking described in the file LICENSE.          *
#*                                                                        *
#**************************************************************************

# Set up the execution environment before launching the CI script
# given as argument.

# Currently, the only setup performed is to make sure that ARM-based Macs
# run the script in ARM64 mode or in x86-64 mode, depending on what
# the OCAML_ARCH parameter requires.
# If OCAML_ARCH is just "macos", the default mode is used.

set -x

case "${OCAML_ARCH}" in
  macos-arm) OCAML_ARCH=macos exec /usr/bin/arch -arm64 "$@";;
  macos-x86) OCAML_ARCH=macos exec /usr/bin/arch -x86_64 "$@";;
  *) exec "$@";;
esac