diff --git a/.github/workflows/load_vimrc.yml b/.github/workflows/load_vimrc.yml new file mode 100644 index 0000000..c582b72 --- /dev/null +++ b/.github/workflows/load_vimrc.yml @@ -0,0 +1,21 @@ +name: load_vimrc + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + load_vimrc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: single vimrc with vi + run: vim.tiny -E -s -u .vimrc -c "qa!" + - name: install vim + run: sudo ./install/build_vim_from_source.sh 7.4.1689 + - name: single vimrc + run: vim -E -s -u .vimrc -c "qa!" + - name: full vimrc + run: ln -s `pwd`/root/.vim ~/.vim && vim -E -s -c "qa!" diff --git a/install/build_vim_from_source.sh b/install/build_vim_from_source.sh index c7cc10f..50c509b 100755 --- a/install/build_vim_from_source.sh +++ b/install/build_vim_from_source.sh @@ -1,3 +1,4 @@ +#!/bin/bash set -e _uninstall_current_version() { @@ -59,12 +60,7 @@ _install_vim() { echo $vim_version > VIM_VERSION } -# init build dir -if [ ! -d ~/vimrc ]; then - echo "No vimrc dir found." - exit 1 -fi -build_dir=~/vimrc/build +build_dir=`pwd`/build mkdir -p $build_dir cd $build_dir touch VIM_VERSION