11name : test
22on :
33 push :
4- branches :
5- - ' master'
6- - ' release-[0-9]+.[0-9]+'
74 pull_request :
85 branches :
96 - ' master'
2724 # TEST_FILTER: foo
2825
2926jobs :
30- lint :
31- runs-on : ubuntu-24.04
32- timeout-minutes : 10
33- env :
34- CC : clang
35- steps :
36- - uses : actions/checkout@v4
37- - uses : ./.github/actions/setup
38-
39- - name : Install stylua
40- run : |
41- wget --directory-prefix="$BIN_DIR" https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux-x86_64.zip
42- (cd "$BIN_DIR"; unzip stylua*.zip)
43-
44- - name : Build third-party deps
45- run : |
46- cmake -S cmake.deps -B .deps -G Ninja
47- cmake --build .deps
48-
49- - run : cmake -B build -G Ninja -D CI_LINT=ON
50-
51- - if : " !cancelled()"
52- name : Determine if run should be aborted
53- id : abort_job
54- run : echo "status=${{ job.status }}" >> $GITHUB_OUTPUT
55-
56- - if : success() || failure() && steps.abort_job.outputs.status == 'success'
57- name : stylua
58- run : cmake --build build --target lintlua-stylua
59-
60- - if : success() || failure() && steps.abort_job.outputs.status == 'success'
61- name : luals
62- run : cmake --build build --target luals
63-
64- - if : success() || failure() && steps.abort_job.outputs.status == 'success'
65- name : luacheck
66- run : cmake --build build --target lintlua-luacheck
67-
68- - if : success() || failure() && steps.abort_job.outputs.status == 'success'
69- name : lintsh
70- run : cmake --build build --target lintsh
71-
72- - if : success() || failure() && steps.abort_job.outputs.status == 'success'
73- name : clint.py
74- run : cmake --build build --target lintc-clint
75-
76- - if : success() || failure() && steps.abort_job.outputs.status == 'success'
77- name : clang-tidy
78- run : cmake --build build --target lintc-clang-tidy
79-
80- - if : success() || failure() && steps.abort_job.outputs.status == 'success'
81- name : uncrustify
82- run : cmake --build build --target lintc-uncrustify
83-
84- clang-analyzer :
85- runs-on : ubuntu-24.04
86- timeout-minutes : 20
87- env :
88- CC : clang
89- steps :
90- - uses : actions/checkout@v4
91- - uses : ./.github/actions/setup
92- - name : Build third-party deps
93- run : |
94- cmake -S cmake.deps --preset ci
95- cmake --build .deps
96- cmake --preset ci
97- - run : cmake --build build --target clang-analyzer
98-
9927 posix :
100- name : ${{ matrix.build.os }} ${{ matrix.build.flavor }} ${{ matrix.build.cc }} ${{ matrix.test }}
28+ name : ${{ matrix.runner }} ${{ matrix.build.flavor }} ${{ matrix.build.cc }} ${{ matrix.test }}
10129 strategy :
10230 fail-fast : false
10331 matrix :
@@ -108,13 +36,8 @@ jobs:
10836 # or if github introduces a wildcard for required checks in the future.
10937 build :
11038 [
111- { runner: ubuntu-24.04, os: ubuntu, flavor: asan, cc: clang, flags: -D ENABLE_ASAN_UBSAN=ON },
112- { runner: ubuntu-24.04, os: ubuntu, flavor: tsan, cc: clang, flags: -D ENABLE_TSAN=ON },
113- { runner: ubuntu-24.04, os: ubuntu, flavor: release, cc: gcc, flags: -D CMAKE_BUILD_TYPE=Release },
39+ { runner: ubuntu-22.04-arm, os: ubuntu, flavor: arm, cc: gcc, flags: -D CMAKE_BUILD_TYPE=RelWithDebInfo },
11440 { runner: ubuntu-24.04-arm, os: ubuntu, flavor: arm, cc: gcc, flags: -D CMAKE_BUILD_TYPE=RelWithDebInfo },
115- { runner: macos-13, os: macos, flavor: intel, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER },
116- { runner: macos-15, os: macos, flavor: arm, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER },
117- { runner: ubuntu-24.04, os: ubuntu, flavor: puc-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON },
11841 ]
11942 test : [unittest, functionaltest, oldtest]
12043 exclude :
@@ -130,111 +53,3 @@ jobs:
13053 CC : ${{ matrix.build.cc }}
13154 steps :
13255 - uses : actions/checkout@v4
133- - uses : ./.github/actions/setup
134- with :
135- install_flags : " --test"
136-
137- - name : Create log dir
138- run : mkdir -p "$LOG_DIR"
139-
140- - if : ${{ matrix.test != 'unittest' }}
141- name : Set up interpreter packages
142- run : |
143- echo "Install neovim RubyGem."
144- gem install --no-document --bindir "$BIN_DIR" --user-install --pre neovim
145-
146- sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log"
147- perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
148-
149- - name : Remove .git directory
150- if : ${{ matrix.build.os == 'ubuntu' }}
151- run : cmake -E rm -rf -- .git
152-
153- - name : Build third-party deps
154- run : |
155- cmake -S cmake.deps --preset ci -D CMAKE_BUILD_TYPE=Debug ${{ matrix.build.deps_flags }}
156- cmake --build .deps
157-
158- - name : Build
159- run : |
160- cmake --preset ci -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.build.flags }}
161- cmake --build build
162-
163- - if : ${{ matrix.test == 'oldtest' }}
164- name : ${{ matrix.test }}
165- timeout-minutes : 20
166- run : make -C test/old/testdir NVIM_PRG=$(realpath build)/bin/nvim
167-
168- - if : ${{ matrix.test != 'oldtest' }}
169- name : ${{ matrix.test }}
170- timeout-minutes : 20
171- run : cmake --build build --target ${{ matrix.test }}
172-
173- - name : Install
174- run : |
175- cmake --install build
176- "$INSTALL_PREFIX/bin/nvim" --version
177- if ! "$INSTALL_PREFIX/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then
178- echo "Running ':help' in the installed nvim failed."
179- echo "Maybe the helptags have not been generated properly."
180- echo 'Failed running :help'
181- exit 1
182- fi
183-
184- # Check that all runtime files were installed
185- for file in $(git -C runtime ls-files '*.vim' '*.ps' '*.dict' '*.py' '*.tutor' '*.awk' '*.sh' '*.bat'); do
186- if ! test -e "$INSTALL_PREFIX/share/nvim/runtime/$file"; then
187- printf "It appears that %s is not installed." "$file"
188- exit 1
189- fi
190- done
191-
192- # Check that generated syntax file has function names, #5060.
193- genvimsynf=syntax/vim/generated.vim
194- gpat='syn keyword vimFuncName .*eval'
195- if ! grep -q "$gpat" "$INSTALL_PREFIX/share/nvim/runtime/$genvimsynf"; then
196- echo "It appears that $genvimsynf does not contain $gpat."
197- exit 1
198- fi
199-
200- - if : ' !cancelled()'
201- name : Show logs
202- run : cat $(find "$LOG_DIR" -type f)
203-
204- windows :
205- uses : ./.github/workflows/test_windows.yml
206-
207- with-external-deps :
208- runs-on : ubuntu-24.04
209- timeout-minutes : 10
210- env :
211- CC : gcc
212- steps :
213- - uses : actions/checkout@v4
214- - uses : ./.github/actions/setup
215-
216- - name : Install dependencies
217- run : |
218- sudo add-apt-repository ppa:neovim-ppa/stable
219- sudo apt-get install -y \
220- libluajit-5.1-dev \
221- libunibilium-dev \
222- libuv1-dev \
223- lua-filesystem \
224- lua-lpeg \
225- luajit \
226- lua-luv-dev
227- # libtree-sitter-dev \
228-
229- # Remove comments from packages once we start using these external
230- # dependencies.
231-
232- - name : Build third-party deps
233- run : |
234- cmake -S cmake.deps --preset external_deps
235- cmake --build .deps
236-
237- - name : Build
238- run : |
239- cmake --preset ci
240- cmake --build build
0 commit comments