Skip to content

Commit

Permalink
chore: rewrite ci (nvim-telescope#1236)
Browse files Browse the repository at this point in the history
no appimage
ubuntu and mac os
release and nightly
  • Loading branch information
Conni2461 authored Sep 13, 2021
1 parent 4380e45 commit e7aa63d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 52 deletions.
77 changes: 35 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,45 @@ name: Tests
on: [push, pull_request]

jobs:
x64-ubuntu:
name: X64-ubuntu
runs-on: ubuntu-20.04
unit_tests:
name: unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
manager: sudo apt-get
packages: -y fd-find
- os: ubuntu-20.04
url: https://github.com/neovim/neovim/releases/download/v0.5.0/nvim-linux64.tar.gz
manager: sudo apt-get
packages: -y fd-find
- os: macos-10.15
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz
manager: brew
packages: fd
- os: macos-10.15
url: https://github.com/neovim/neovim/releases/download/v0.5.0/nvim-macos.tar.gz
manager: brew
packages: fd
steps:
- uses: actions/checkout@v2
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
- name: Restore from todays cache
uses: actions/cache@v2
with:
path: |
_neovim
key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}
path: _neovim
key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }}

- name: Prepare
run: |
sudo apt install fd-find
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
git clone --depth 1 https://github.com/kyazdani42/nvim-web-devicons ~/.local/share/nvim/site/pack/vendor/start/nvim-web-devicons
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
- name: Run tests
run: |
curl -OL https://raw.githubusercontent.com/norcalli/bot-ci/master/scripts/github-actions-setup.sh
source github-actions-setup.sh nightly-x64
make test
appimage-ubuntu:
name: Appimage-ubuntu
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
uses: actions/cache@v2
with:
path: |
build
key: ${{ runner.os }}-appimage-${{ hashFiles('todays-date') }}

- name: Prepare
run: |
sudo apt install fd-find
test -d build || {
mkdir -p build
wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod +x nvim.appimage
mv nvim.appimage ./build/nvim
${{ matrix.manager }} update
${{ matrix.manager }} install ${{ matrix.packages }}
test -d _neovim || {
mkdir -p _neovim
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
}
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
Expand All @@ -59,5 +50,7 @@ jobs:
- name: Run tests
run: |
export PATH="${PWD}/build/:${PATH}"
make test
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make test
24 changes: 15 additions & 9 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ on:
jobs:
build-sources:
name: Generate docs
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
steps:
- uses: actions/checkout@v2
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
uses: actions/cache@v2
with:
path: build
key: ${{ runner.os }}-appimage-${{ hashFiles('todays-date') }}
path: _neovim
key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }}

- name: Prepare
run: |
test -d build || {
mkdir -p build
wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod +x nvim.appimage
mv nvim.appimage ./build/nvim
test -d _neovim || {
mkdir -p _neovim
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
}
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
Expand All @@ -42,7 +46,9 @@ jobs:
- name: Generating docs
run: |
export PATH="${PWD}/build/:${PATH}"
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make docgen
# inspired by nvim-lspconfigs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install luarocks
sudo apt-get install -y luarocks
sudo luarocks install luacheck
- name: Lint
Expand Down

0 comments on commit e7aa63d

Please sign in to comment.