diff --git a/.github/workflows/test_ubuntu_install.yml b/.github/workflows/test_ubuntu_install.yml new file mode 100644 index 0000000..e15931b --- /dev/null +++ b/.github/workflows/test_ubuntu_install.yml @@ -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 diff --git a/config/mamba/p311.yml b/config/mamba/p311.yml index e7d776e..8aa5ad9 100644 --- a/config/mamba/p311.yml +++ b/config/mamba/p311.yml @@ -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 diff --git a/config/setup/bootstrap.sh b/config/setup/bootstrap.sh new file mode 100755 index 0000000..6ce9ba6 --- /dev/null +++ b/config/setup/bootstrap.sh @@ -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 diff --git a/config/setup/bootstrap.zsh b/config/setup/bootstrap.zsh deleted file mode 100755 index f7658ae..0000000 --- a/config/setup/bootstrap.zsh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env zsh - -git clone https://github.com/jevandezande/dotfiles ~/.dotfiles - -if [ $(uname) = "Linux" ] -then - zsh ~/.dotfiles/config/setup/ubuntu_install.zsh -else - echo "Unable to setup $(uname)" -fi diff --git a/config/setup/github_install.zsh b/config/setup/github_install.zsh index 75ecb70..b0c7f85 100755 --- a/config/setup/github_install.zsh +++ b/config/setup/github_install.zsh @@ -10,7 +10,7 @@ then fi github_progs=( - pipenv-cookiecutter + poetry-cookiecutter qgrep reaction_web spectra diff --git a/config/setup/ubuntu_install.zsh b/config/setup/ubuntu_install.zsh index 63459d8..c741bf4 100755 --- a/config/setup/ubuntu_install.zsh +++ b/config/setup/ubuntu_install.zsh @@ -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) ############# @@ -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 @@ -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!"