run.sh raw

   1  #!/usr/bin/env bash
   2  #
   3  # Copyright (c) The Bitcoin Core developers
   4  # Distributed under the MIT software license, see the accompanying
   5  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
   6  
   7  export LC_ALL=C.UTF-8
   8  
   9  set -o errexit -o nounset -o pipefail -o xtrace
  10  
  11  [ "${CI_CONFIG+x}" ] && source "$CI_CONFIG"
  12  
  13  nix develop --ignore-environment --keep CI_CONFIG --keep CI_CLEAN "${NIX_ARGS[@]+"${NIX_ARGS[@]}"}" -f shell.nix --command ci/scripts/ci.sh
  14  
  15  # Create a GC root for the shell closure so the cache-nix-action save step
  16  # does not garbage-collect it.
  17  if [ -n "${CI_CACHE_NIX_STORE-}" ]; then
  18    nix-build shell.nix \
  19      -o "$CI_DIR/gcroot" \
  20      "${NIX_ARGS[@]+"${NIX_ARGS[@]}"}"
  21    # Verify the closure is complete so the cache-nix-action save step has
  22    # everything it needs.
  23    nix-store --query --requisites "$CI_DIR/gcroot" >/dev/null
  24  fi
  25