<commit_before>#!/bin/bash

echo "Setting up default XCode version"
if [ -z "${GH_YML_MATRIX_COMPILER}" ]
then
  echo "Error: GH_YML_MATRIX_COMPILER variable is not defined"
  exit 1
fi
XCODE_VER="$(echo ${GH_YML_MATRIX_COMPILER} | sed -e 's|_|.|g' -e 's|xcode||')"
if [ ! -d /Applications/Xcode_${XCODE_VER}.app ]
then
  echo "Error: XCode installation directory /Applications/Xcode_${XCODE_VER}.app does not exist"
  exit 2
fi
sudo xcode-select --switch /Applications/Xcode_${XCODE_VER}.app

echo "Installing CMake"
brew install cmake

echo "Installing Ninja"
brew install ninja

echo "Installing GCC"
brew install gcc
sudo ln -v -s $(which gfortran-11) /usr/local/bin/gfortran

echo "Installing blosc compression"
brew install c-blosc

echo "Installing python3"
brew install python numpy

if [[ "$GH_YML_JOBNAME" =~ -mpi ]]
then
  echo "Installing OpenMPI"
  brew install openmpi mpi4py
fi<commit_msg>ci: fix cmake@3.23.3 version in macos<commit_after>#!/bin/bash

set -e

echo "Setting up default XCode version"
if [ -z "${GH_YML_MATRIX_COMPILER}" ]
then
  echo "Error: GH_YML_MATRIX_COMPILER variable is not defined"
  exit 1
fi
XCODE_VER="$(echo ${GH_YML_MATRIX_COMPILER} | sed -e 's|_|.|g' -e 's|xcode||')"
if [ ! -d /Applications/Xcode_${XCODE_VER}.app ]
then
  echo "Error: XCode installation directory /Applications/Xcode_${XCODE_VER}.app does not exist"
  exit 2
fi
sudo xcode-select --switch /Applications/Xcode_${XCODE_VER}.app

echo "Installing CMake"

{
  readonly version="3.23.3"
  readonly checksum="45cda7b87cad41ac407fc150e4682b85c3eb45b1977d8e89319cb3a9a6f341f3"
  readonly pkg="cmake-${version}-macos-universal.tar.gz"
  echo "${checksum}  ${pkg}" > cmake.sha256sum

  curl -OL "https://github.com/Kitware/CMake/releases/download/v${version}/${pkg}"
  shasum -a 256 --check cmake.sha256sum

  sudo tar -xvzf ${pkg} --strip-components 1 -C /Applications/
}


echo "Installing Ninja"
brew install ninja

echo "Installing GCC"
brew install gcc
sudo ln -v -s $(which gfortran-11) /usr/local/bin/gfortran

echo "Installing blosc compression"
brew install c-blosc

echo "Installing python3"
brew install python numpy

if [[ "$GH_YML_JOBNAME" =~ -mpi ]]
then
  echo "Installing OpenMPI"
  brew install openmpi mpi4py
fi
{'fraction_non_alphanumeric': 0.12399283795881827, 'fraction_numerical': 0.03088630259623993, 'mean_word_length': 4.6725888324873095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7133132', 'n_tokens_mistral': 930, 'n_tokens_neox': 846, 'n_words': 227}