Skip to content

Commit

Permalink
Merge pull request #1549 from buildtesters/installation_workflow_with…
Browse files Browse the repository at this point in the history
…_csh

add csh shell test for installation workflow
  • Loading branch information
shahzebsiddiqui authored Jul 1, 2024
2 parents 46174be + 939a2e4 commit 333819c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,36 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: "Install Zsh and Tcsh"
- name: "Install zsh and tcsh"
run: |
if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then
sudo apt-get install -y tcsh zsh
else
brew install tcsh zsh
fi
- name: Buildtest Installation for os - ${{ matrix.os }}, python version - ${{ matrix.python-version }}, shell - bash

Check warning on line 34 in .github/workflows/installation.yml

View workflow job for this annotation

GitHub Actions / style_checks

34:81 [line-length] line too long (121 > 80 characters)
env:
OS: '${{ matrix.os }}'
shell: bash
run: |
echo "$SHELL"
run: |
echo $SHELL
pip install -U pip
source setup.sh
which buildtest
buildtest --help
- name: Buildtest Installation for os - ${{ matrix.os }}, python version - ${{ matrix.python-version }}, shell - zsh

Check warning on line 43 in .github/workflows/installation.yml

View workflow job for this annotation

GitHub Actions / style_checks

43:81 [line-length] line too long (120 > 80 characters)
env:
OS: '${{ matrix.os }}'
shell: zsh {0}
run: |
echo "$SHELL"
run: |
echo $SHELL
pip install -U pip
source setup.sh
which buildtest
buildtest --help
- uses: actions/checkout@v4
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 30
- name: Buildtest Installation for os - ${{ matrix.os }}, python version - ${{ matrix.python-version }}, shell - csh

Check warning on line 52 in .github/workflows/installation.yml

View workflow job for this annotation

GitHub Actions / style_checks

52:81 [line-length] line too long (120 > 80 characters)
shell: csh {0}
run: |
echo $shell
pip install -U pip
source setup.csh
which buildtest
buildtest --help
7 changes: 5 additions & 2 deletions setup.csh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Get the name of the current shell
set shell_name = `ps -p $$ -o comm=`

# if shell is not csh or tcsh exit
if (`basename "$SHELL"` != "csh" && `basename "$SHELL"` != "tcsh") then
if (`basename $shell_name` != "csh" && `basename $shell_name` != "tcsh") then
echo "Unsupported shell, please use 'csh' or 'tcsh' when sourcing this script"
exit 1
endif
Expand Down Expand Up @@ -68,7 +71,7 @@ curl https://bootstrap.pypa.io/get-pip.py | $python

set pip=pip3

if ( ! -x `command -v $pip` ) then
if ( ! -x `which $pip` ) then
# If not found in PATH, check $HOME/.local/bin
if ( -x "$HOME/.local/bin/$pip" ) then
echo "$pip found in $HOME/.local/bin"
Expand Down

0 comments on commit 333819c

Please sign in to comment.