Skip to content

Commit

Permalink
Adds automated testing of bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jevandezande committed Nov 23, 2022
1 parent e887b3c commit 81d7868
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 34 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test_ubuntu_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test Ubuntu Install

on:
pull_request: {}
push:
branches: master

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]

name: Test Bootstrap ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Run Bootstrap
run: |
cd config/setup/
sh ./bootstrap.sh
7 changes: 0 additions & 7 deletions config/mamba/p311.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
name: p311
channels:
- conda-forge
- py311_bs
dependencies:
- python=3.11
- pip
- psi4
- dftd3
- gcp
- xtb
- pip:
- cclib
- geomeTRIC
- matplotlib
- more-itertools
- natsort
- pandas
- pipx
- pyscf
- scipy
# Tools
- black
Expand Down
23 changes: 23 additions & 0 deletions config/setup/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env sh

# Run script as root if not already.
if [ $EUID -ne 0 ];
then
exec sudo REAL_USER=${LOCAL_USER} /usr/bin/env bash "$0" "$@"
fi

if [ $(uname) = "Linux" ]
then
sudo apt update
sudo apt install git zsh -y

git clone https://github.com/jevandezande/dotfiles ~/.dotfiles
ln -s ~/.dotfiles/zsh ~/.zsh
ln -s ~/.dotfiles/zshrc ~/.zshrc

export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin

zsh ~/.dotfiles/config/setup/ubuntu_install.zsh
else
echo "Unable to setup $(uname)"
fi
10 changes: 0 additions & 10 deletions config/setup/bootstrap.zsh

This file was deleted.

2 changes: 1 addition & 1 deletion config/setup/github_install.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ then
fi

github_progs=(
pipenv-cookiecutter
poetry-cookiecutter
qgrep
reaction_web
spectra
Expand Down
33 changes: 17 additions & 16 deletions config/setup/ubuntu_install.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,22 @@ if [[ $EUID -ne 0 ]]; then
exec sudo REAL_USER=${LOCAL_USER} /usr/bin/env bash "$0" "$@"
fi


echo "SSH keys setup!"
zsh ssh_setup.zsh
echo "Directories setup!"
zsh helpers/setup_dirs.zsh


# Pre-install these programs to allow parallel installs
apt install curl ssnapd


echo "Apt!"
zsh apt_install.zsh &
zsh apt_install.zsh

echo "Snaps!"
zsh snap_install.zsh &
zsh snap_install.zsh

echo "Brew!"
zsh brew_install.zsh

echo "Changing to ZSH!"
chsh zsh
chsh -s $(which zsh)


#############
Expand All @@ -42,7 +38,7 @@ echo "Vim-Plug!"
if [ ! -f ~/.vim/autoload/plug.vim ]
then
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim &
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi


Expand All @@ -51,25 +47,30 @@ echo "Zplug!"
if [ ! -d ~/.zplug ]
then
curl -sL --proto-redir -all,https \
https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh &
https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
fi


# Starship
sh -c "$(curl -fsSL https://starship.rs/install.sh)" --yes &
sh -c "$(curl -fsSL https://starship.rs/install.sh)" --yes


pwd
echo "Mamba!"
zsh ~/.dotfiles/config/mamba_install.zsh &
zsh mamba_install.zsh
pwd


# Relies on brew to install gh
echo "Github programs!"
zsh github_install.zsh &
zsh github_install.zsh


echo "Miscellaneous!"
zsh miscellaneous.zsh

echo "Miscellaneous"
zsh miscellaneous.zsh &

echo "rcup!"
rcup

echo "Finished Installing Programs for Ubuntu!"

0 comments on commit 81d7868

Please sign in to comment.