config.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  # Source CI configuration and output variables needed by the workflow.
   8  
   9  export LC_ALL=C
  10  
  11  set -o errexit -o nounset -o pipefail -o xtrace
  12  
  13  readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
  14  
  15  source "${SCRIPT_DIR}/ci_helpers.sh"
  16  
  17  [ "${CI_CONFIG+x}" ] && source "$CI_CONFIG"
  18  
  19  # Resolve the nixpkgs channel to a specific revision for use in cache keys.
  20  if [[ -n "${NIXPKGS_CHANNEL:-}" ]]; then
  21    rev="$(curl --fail --location --silent --show-error "https://channels.nixos.org/${NIXPKGS_CHANNEL}/git-revision")"
  22    test -n "${rev}"
  23    write_output_var nixpkgs_rev "${rev}"
  24  fi
  25  
  26  write_output_var cache_nix_store "${CI_CACHE_NIX_STORE:-false}"
  27