From 70c96f76d6b75af48280bc0ddc5f25a638a025f2 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Tue, 27 Aug 2024 14:37:02 +0000 Subject: [PATCH] ci: install updated bash on macOS platforms via workflow Our shell script for installing dependencies uses a feature that is only available starting with bash 4. macOS ships with bash 3, so install bash from homebrew in the GitHub Actions workflow when runing on macOS. Previously we could install bash in our shell script for installing dependencies but this depedencies install script now needs the bash 4 feature. The feature in question is for bash to be able to match multiple patterns in a case statement. Signed-off-by: Vincent Fu --- .github/workflows/ci.yml | 3 +++ ci/actions-install.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1601aa9e..52df3712 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,6 +127,9 @@ jobs: mingw-w64-${{matrix.arch}}-python-statsmodels mingw-w64-${{matrix.arch}}-python-sphinx + - name: install bash 4 (macOS) + if: ${{ contains( matrix.build, 'macOS' ) }} + run: HOMEBREW_NO_AUTO_UPDATE=1 brew install bash - name: Install dependencies run: ${{matrix.shell}} ./ci/actions-install.sh if: ${{ !contains( matrix.build, 'msys2' ) }} diff --git a/ci/actions-install.sh b/ci/actions-install.sh index 38d39de9..db3aa0f3 100755 --- a/ci/actions-install.sh +++ b/ci/actions-install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script expects to be invoked from the base fio directory. set -eu @@ -145,7 +145,7 @@ install_macos() { #echo "Updating homebrew..." #brew update >/dev/null 2>&1 echo "Installing packages..." - HOMEBREW_NO_AUTO_UPDATE=1 brew install cunit libnfs bash + HOMEBREW_NO_AUTO_UPDATE=1 brew install cunit libnfs pip3 install scipy six statsmodels sphinx } -- 2.25.1