Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: reduce startup time #753

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 7 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
branches: [ main ]
workflow_dispatch:

env:
CC: clang

jobs:
commit_lint:
runs-on: ubuntu-latest
Expand All @@ -21,7 +18,7 @@ jobs:
strategy:
fail-fast: true
matrix:
neovim_branch: ['v0.7.2', 'v0.8.3', 'nightly']
neovim_branch: ['v0.8.3', 'nightly']
runs-on: ubuntu-latest
env:
NEOVIM_BRANCH: ${{ matrix.neovim_branch }}
Expand All @@ -30,14 +27,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install LuaJIT
uses: leafo/gh-actions-lua@v9
with:
luaVersion: "luajit-2.1.0-beta3"

- name: Install Luarocks
uses: leafo/gh-actions-luarocks@v4

- name: Get Neovim SHA
id: get-nvim-sha
run: |
Expand All @@ -50,12 +39,6 @@ jobs:
path: deps
key: ${{ steps.get-nvim-sha.outputs.sha }}-${{ hashFiles('.github/workflows/ci.yml, Makefile') }}

- name: Install Lua Deps
run: make lua_deps

- name: Check lua files are built from latest teal
run: make tl-ensure

- name: Install Neovim build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
Expand All @@ -78,5 +61,11 @@ jobs:
if: steps.cache-deps.outputs.cache-hit != 'true'
run: make test_deps

- name: Install Lua Deps
run: make lua_deps

- name: Check lua files are built from latest teal
run: make tl-ensure

- name: Run Test
run: make test
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

export PJ_ROOT=$(PWD)

# Suppress built in rules. This reduces clutter when running with -d
MAKEFLAGS += --no-builtin-rules

FILTER ?= .*

LUA_VERSION := 5.1
Expand All @@ -13,7 +10,7 @@ NEOVIM_BRANCH ?= master
DEPS_DIR := $(PWD)/deps/nvim-$(NEOVIM_BRANCH)
NVIM_DIR := $(DEPS_DIR)/neovim

LUAROCKS := luarocks --lua-version=$(LUA_VERSION)
LUAROCKS := $(DEPS_DIR)/luarocks/usr/bin/luarocks
LUAROCKS_TREE := $(DEPS_DIR)/luarocks/usr
LUAROCKS_LPATH := $(LUAROCKS_TREE)/share/lua/$(LUA_VERSION)
LUAROCKS_INIT := eval $$($(LUAROCKS) --tree $(LUAROCKS_TREE) path) &&
Expand All @@ -23,25 +20,27 @@ LUAROCKS_INIT := eval $$($(LUAROCKS) --tree $(LUAROCKS_TREE) path) &&
$(NVIM_DIR):
@mkdir -p $(DEPS_DIR)
git clone --depth 1 https://github.com/neovim/neovim --branch $(NEOVIM_BRANCH) $@
@# disable LTO to reduce compile time
make -C $@ \
DEPS_BUILD_DIR=$(dir $(LUAROCKS_TREE)) \
CMAKE_BUILD_TYPE=RelWithDebInfo
CMAKE_BUILD_TYPE=RelWithDebInfo \
CMAKE_EXTRA_FLAGS='-DCI_BUILD=OFF -DENABLE_LTO=OFF'

TL := $(LUAROCKS_TREE)/bin/tl

$(TL):
$(TL): $(NVIM_DIR)
@mkdir -p $$(dirname $@)
$(LUAROCKS) --tree $(LUAROCKS_TREE) install tl $(TL_VERSION)

INSPECT := $(LUAROCKS_LPATH)/inspect.lua

$(INSPECT):
$(INSPECT): $(NVIM_DIR)
@mkdir -p $$(dirname $@)
$(LUAROCKS) --tree $(LUAROCKS_TREE) install inspect

LUV := $(LUAROCKS_TREE)/lib/lua/$(LUA_VERSION)/luv.so

$(LUV):
$(LUV): $(NVIM_DIR)
@mkdir -p $$(dirname $@)
$(LUAROCKS) --tree $(LUAROCKS_TREE) install luv

Expand Down
1 change: 1 addition & 0 deletions gen_help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ local function get_marker_text(marker)
CONFIG = gen_config_doc,
FUNCTIONS = gen_functions_doc{
'teal/gitsigns.tl',
'teal/gitsigns/attach.tl',
'teal/gitsigns/actions.tl',
},
HIGHLIGHTS = gen_highlights_doc,
Expand Down
Loading