Skip to content

Commit

Permalink
ci: create load_vimrc.yml, update build_vim_from_source.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Feb 4, 2024
1 parent c3cc248 commit e625721
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/load_vimrc.yml
Original file line number Diff line number Diff line change
@@ -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!"
8 changes: 2 additions & 6 deletions install/build_vim_from_source.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
set -e

_uninstall_current_version() {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e625721

Please sign in to comment.