Update deps #1291
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update deps | |
on: | |
schedule: | |
- cron: '5 5 * * *' | |
workflow_dispatch: | |
env: | |
NEOVIM_DIR: ${{ format('{0}/neovim', github.workspace) }} | |
NEOVIM_REPO: 'neovim/neovim' | |
jobs: | |
deps: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.NEOVIM_REPO }} | |
path: ${{ env.NEOVIM_DIR }} | |
- name: Setup git config | |
run: | | |
git config --global user.name 'marvim' | |
git config --global user.email '[email protected]' | |
- name: Install apt packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake gettext ninja-build locales rsync | |
- name: Build third-party | |
run: | | |
cd "$NEOVIM_DIR" | |
mkdir deps | |
cd deps | |
cmake -G Ninja -DUSE_BUNDLED_BUSTED=OFF "${NEOVIM_DIR}/cmake.deps/" | |
ninja | |
- name: Cleanup src/ | |
run: | | |
cd "${NEOVIM_DIR}/deps/build/src" | |
rm -rf ./*-build | |
rm -r ./*-stamp/*-{configure,build,install,done} | |
while read dir; do | |
cd "${NEOVIM_DIR}/deps/build/src/${dir}" | |
echo "Cleaning ${dir}." | |
rm -rf autom4te.cache | |
make clean || true | |
make distclean || true | |
done <<< "$(find . -maxdepth 1 -mindepth 1 -type d -printf '%f\n')" | |
- name: Update deps repo | |
run: | | |
rsync -av --delete "${NEOVIM_DIR}/deps/build/src/" "${GITHUB_WORKSPACE}/src/" | |
git add "${GITHUB_WORKSPACE}/src/" | |
git commit -m 'deps src: Automatic update' || true | |
git push https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} |