From 15394b6855c3b17be06bf2bfbac7797d9c3ebf1d Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 25 Jan 2023 20:33:18 +0100 Subject: ci: fix lintc to use external dependencies instead of bundled (#21995) Use the bundled libvterm dependency as the external package is outdated, with the hopes of being able to use the external package once its version meets our required version. Co-authored-by: Christian Clason --- .github/workflows/ci.yml | 11 +++++++---- .github/workflows/env.sh | 12 +++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b158d966e1..83ee4f0358 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup common environment variables - run: ./.github/workflows/env.sh lint + run: ./.github/workflows/env.sh lintc - name: Install apt packages run: | @@ -141,14 +141,17 @@ jobs: libtree-sitter-dev \ libunibilium-dev \ libuv1-dev \ - libvterm-dev \ lua-busted \ lua-filesystem \ lua-inspect \ lua-lpeg \ - lua-luv-dev \ lua-nvim \ luajit + # libvterm-dev \ + # lua-luv-dev + + # Remove comments from packages once we start using these external + # dependencies. See env.sh for more context. - uses: ./.github/actions/cache @@ -156,7 +159,7 @@ jobs: run: ./ci/before_script.sh - name: Build nvim - run: ./ci/run_tests.sh build_nvim + run: make - if: "!cancelled()" name: Determine if run should be aborted diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index d93552fed3..2c3fbf9ef2 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -44,13 +44,15 @@ EOF BUILD_UCHAR=1 EOF ;; - lint) + lintc) # Re-enable once system deps are available # BUILD_FLAGS="$BUILD_FLAGS -DLIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -DLIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1" - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUV=ON" - cat <> "$GITHUB_ENV" -USE_BUNDLED=OFF -EOF + + # Ideally all dependencies should external for this job, but some + # dependencies don't have the required version available. We use the + # bundled versions for these with the hopes of being able to remove them + # later on. + DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON" ;; functionaltest-lua) BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON" -- cgit From 9cb3b276bdb39f28fad51ce2a61cd5db6fb9a03b Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 29 Jan 2023 17:03:53 +0100 Subject: ci(news): mention that ignoring news.txt is fine (#22043) news.txt is only meant as a reminder, but contributors have no way of knowing this automatically without such a message. --- .github/workflows/news.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml index 46ac0ec02d..11807e9b42 100644 --- a/.github/workflows/news.yml +++ b/.github/workflows/news.yml @@ -22,9 +22,10 @@ jobs: { echo " Pull request includes a new feature or a breaking change, but - news.txt hasn't been updated yet. news.txt is our primary way of - communicating changes to users so it's important to keep it up to - date." + news.txt hasn't been updated yet. This is just a reminder + that news.txt may need to be updated. You can ignore this CI + failure if you think the change won't be of interest to + users." exit 1 } fi -- cgit From 13aa23b62af4df3e7f10687b76fe8c04efa2a598 Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 30 Jan 2023 20:36:49 +0100 Subject: refactor(tests): run unittests using main nvim binary in interpreter mode This allows us to get rid of the separate "nvim-test" target --- .github/workflows/env.sh | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index 2c3fbf9ef2..42a355da44 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -26,7 +26,6 @@ BUILD_FLAGS="CMAKE_FLAGS=-DCI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_ case "$FLAVOR" in asan) - BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON" cat <> "$GITHUB_ENV" CLANG_SANITIZER=ASAN_UBSAN ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan:intercept_tls_get_addr=0 -- cgit From c1d76363ac72a7a17b657eaa99df4533d169a40b Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Feb 2023 14:43:45 +0100 Subject: ci: simplify how environment variables are used (#22067) Having a clear separation between when we manipulate variables and when we export them to GITHUB_ENV makes it less error-prone. --- .github/workflows/ci.yml | 10 +++---- .github/workflows/env.sh | 78 +++++++++++++++++++++++++++--------------------- 2 files changed, 49 insertions(+), 39 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83ee4f0358..aa2708332c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,12 @@ on: paths-ignore: - 'contrib/**' -# Cancel any in-progress CI runs for a PR if it is updated concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true env: + CI_BUILD_DIR: ${{ github.workspace }} UNCRUSTIFY_VERSION: uncrustify-0.75.0 # TEST_FILE: test/functional/core/startup_spec.lua # TEST_FILTER: foo @@ -59,9 +59,9 @@ jobs: run: | source_dir=uncrustify build_dir=uncrustify/build - cmake -S $source_dir -B $build_dir -G Ninja -DCMAKE_BUILD_TYPE=Release + cmake -S $source_dir -B $build_dir -G Ninja -D CMAKE_BUILD_TYPE=Release cmake --build $build_dir - mkdir -p $HOME/.cache + mkdir -p $CACHE_DIR cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }} - uses: ./.github/actions/cache @@ -302,12 +302,12 @@ jobs: - name: Build deps run: | - cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' + cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' cmake --build $env:DEPS_BUILD_DIR - name: Build nvim run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX" -DCI_BUILD=ON + cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D DEPS_PREFIX="$env:DEPS_PREFIX" -D CI_BUILD=ON cmake --build build - name: Install test deps diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index 42a355da44..24d85fc23c 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -3,67 +3,77 @@ set -e -u FLAVOR=${1:-} -cat <> "$GITHUB_PATH" -$HOME/.local/bin -EOF - -cat <> "$GITHUB_ENV" -CI_BUILD_DIR=$GITHUB_WORKSPACE -BUILD_DIR=$GITHUB_WORKSPACE/build +BUILD_DIR=$CI_BUILD_DIR/build +BIN_DIR=$HOME/.local/bin DEPS_BUILD_DIR=$HOME/nvim-deps INSTALL_PREFIX=$HOME/nvim-install -LOG_DIR=$GITHUB_WORKSPACE/build/log -NVIM_LOG_FILE=$GITHUB_WORKSPACE/build/.nvimlog -VALGRIND_LOG=$GITHUB_WORKSPACE/build/log/valgrind-%p.log -CACHE_NVIM_DEPS_DIR=$HOME/.cache/nvim-deps -CACHE_MARKER=$HOME/.cache/nvim-deps/.ci_cache_marker -CACHE_UNCRUSTIFY=$HOME/.cache/uncrustify -EOF - +LOG_DIR=$BUILD_DIR/log +NVIM_LOG_FILE=$BUILD_DIR/.nvimlog +VALGRIND_LOG=$LOG_DIR/valgrind-%p.log +CACHE_DIR=$HOME/.cache +CACHE_NVIM_DEPS_DIR=$CACHE_DIR/nvim-deps +CACHE_MARKER=$CACHE_NVIM_DEPS_DIR/.ci_cache_marker +CACHE_UNCRUSTIFY=$CACHE_DIR/uncrustify DEPS_CMAKE_FLAGS= FUNCTIONALTEST=functionaltest -BUILD_FLAGS="CMAKE_FLAGS=-DCI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=$HOME/nvim-install -DBUSTED_OUTPUT_TYPE=nvim -DDEPS_PREFIX=$HOME/nvim-deps/usr -DMIN_LOG_LEVEL=3" +CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D BUSTED_OUTPUT_TYPE=nvim -D DEPS_PREFIX=$DEPS_BUILD_DIR/usr -D MIN_LOG_LEVEL=3" +CLANG_SANITIZER= +ASAN_OPTIONS= +UBSAN_OPTIONS= +TSAN_OPTIONS= case "$FLAVOR" in asan) - cat <> "$GITHUB_ENV" -CLANG_SANITIZER=ASAN_UBSAN -ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan:intercept_tls_get_addr=0 -UBSAN_OPTIONS=print_stacktrace=1 log_path=$GITHUB_WORKSPACE/build/log/ubsan -EOF + CLANG_SANITIZER=ASAN_UBSAN + ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan:intercept_tls_get_addr=0" + UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" ;; tsan) - cat <> "$GITHUB_ENV" -TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan -CLANG_SANITIZER=TSAN -EOF + TSAN_OPTIONS=log_path=$LOG_DIR/tsan + CLANG_SANITIZER=TSAN ;; uchar) - cat <> "$GITHUB_ENV" -BUILD_UCHAR=1 -EOF + CMAKE_FLAGS+=" -D UNSIGNED_CHAR=ON" ;; lintc) -# Re-enable once system deps are available -# BUILD_FLAGS="$BUILD_FLAGS -DLIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -DLIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1" + # Re-enable once system deps are available + # CMAKE_FLAGS+=" -D LIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -D LIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1" # Ideally all dependencies should external for this job, but some # dependencies don't have the required version available. We use the # bundled versions for these with the hopes of being able to remove them # later on. - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON" + DEPS_CMAKE_FLAGS+=" -D USE_BUNDLED=OFF -D USE_BUNDLED_LUV=ON -D USE_BUNDLED_LIBVTERM=ON" ;; functionaltest-lua) - BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON" + CMAKE_FLAGS+=" -D PREFER_LUA=ON" FUNCTIONALTEST=functionaltest-lua - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF" + DEPS_CMAKE_FLAGS+=" -D USE_BUNDLED_LUAJIT=OFF" ;; *) ;; esac cat <> "$GITHUB_ENV" -$BUILD_FLAGS +CMAKE_FLAGS=$CMAKE_FLAGS +BUILD_DIR=$BUILD_DIR +DEPS_BUILD_DIR=$DEPS_BUILD_DIR DEPS_CMAKE_FLAGS=$DEPS_CMAKE_FLAGS FUNCTIONALTEST=$FUNCTIONALTEST +INSTALL_PREFIX=$INSTALL_PREFIX +LOG_DIR=$LOG_DIR +NVIM_LOG_FILE=$NVIM_LOG_FILE +VALGRIND_LOG=$VALGRIND_LOG +CACHE_DIR=$HOME/.cache +CACHE_NVIM_DEPS_DIR=$CACHE_NVIM_DEPS_DIR +CACHE_MARKER=$CACHE_MARKER +CACHE_UNCRUSTIFY=$CACHE_UNCRUSTIFY +CLANG_SANITIZER=$CLANG_SANITIZER +ASAN_OPTIONS=$ASAN_OPTIONS +UBSAN_OPTIONS=$UBSAN_OPTIONS +TSAN_OPTIONS=$TSAN_OPTIONS +EOF + +cat <> "$GITHUB_PATH" +$BIN_DIR EOF -- cgit From 81c5483dcb6a5504911b54227923da5028023a7c Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Feb 2023 23:09:08 +0100 Subject: ci: add universal macos job (#22156) The universal macos release is particularly sensitive to build system changes. Adding a job that builds a universal binary whenever a cmake file is changed will help prevent future release breaks. --- .github/workflows/release.yml | 36 ++--------------------------------- .github/workflows/universal_macos.yml | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/universal_macos.yml (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1df33962e5..f547e27b3b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,40 +101,8 @@ jobs: run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV - - name: Provision universal `libintl` - run: | - GETTEXT_PREFIX="$(brew --prefix gettext)" - printf 'GETTEXT_PREFIX=%s\n' "$GETTEXT_PREFIX" >> $GITHUB_ENV - bottle_tag="arm64_big_sur" - brew fetch --bottle-tag="$bottle_tag" gettext - cd "$(mktemp -d)" - tar xf "$(brew --cache)"/**/*gettext*${bottle_tag}*.tar.gz - lipo gettext/*/lib/libintl.a "${GETTEXT_PREFIX}/lib/libintl.a" -create -output libintl.a - mv -f libintl.a /usr/local/lib/ - - name: Ensure static linkage to `libintl` - run: | - # We're about to mangle `gettext`, so let's remove any potentially broken - # installs (e.g. curl, git) as those could interfere with our build. - brew uninstall $(brew uses --installed --recursive gettext) - brew unlink gettext - ln -sf "$(brew --prefix)/opt/$(readlink "${GETTEXT_PREFIX}")/bin"/* /usr/local/bin/ - ln -sf "$(brew --prefix)/opt/$(readlink "${GETTEXT_PREFIX}")/include"/* /usr/local/include/ - rm -f "$GETTEXT_PREFIX" - - name: Build release - run: | - export MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)" - OSX_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_ARCHITECTURES=arm64\;x86_64" - make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \ - CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH= $OSX_FLAGS" \ - DEPS_CMAKE_FLAGS="$OSX_FLAGS" - make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-macos" install - cd "$GITHUB_WORKSPACE/build/" - # Make sure we build everything for M1 as well - for macho in bin/* lib/nvim/parser/*.so - do - lipo -info "$macho" | grep -q arm64 || exit 1 - done - cpack -C "$NVIM_BUILD_TYPE" + - name: Build universal binary + run: ./.github/scripts/build_universal_macos.sh - uses: actions/upload-artifact@v3 with: name: nvim-macos diff --git a/.github/workflows/universal_macos.yml b/.github/workflows/universal_macos.yml new file mode 100644 index 0000000000..7ce66ea5fb --- /dev/null +++ b/.github/workflows/universal_macos.yml @@ -0,0 +1,34 @@ +name: macos-universal +on: + pull_request: + branches: + - 'master' + - 'release-[0-9]+.[0-9]+' + paths: + - '**.cmake' + - '**/CMakeLists.txt' + - '**/CMakePresets.json' + - 'cmake.*/**' + - '.github/scripts/build_universal_macos.sh' + - '.github/workflow/universal_macos.yml' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + macos-universal: + runs-on: macos-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + brew update --quiet + brew install automake ninja + + - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV + + - name: Build universal binary + run: ./.github/scripts/build_universal_macos.sh -- cgit From d6d3a9201302c5c728d2bdd1c50678e18645e7eb Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:16:48 +0100 Subject: build: replace check-single-includes with clang-tidy (#22061) Clang-tidy already does what check-single-includes does automatically on top of its regular linting. It is also generator independent, so it doesn't take an eternity to run on slower generators such as Visual Studio. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa2708332c..d3974e8c85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -171,8 +171,7 @@ jobs: run: cmake --build build --target lintc-clint - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: check-single-includes - run: make check-single-includes + run: cmake --build build --target clang-tidy - name: Cache dependencies run: ./ci/before_cache.sh -- cgit From 05d3bef8364c93b205fd47398420dcd705df2714 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 9 Feb 2023 20:13:05 +0100 Subject: ci: add individual timeout limits for all tests (#22193) The CI somtimes freezes on a specific test, wasting 45 minutes for the entire job. Adding a timeout of 15 minutes to functionaltest and 5 minutes to unittests will mitigate the problem. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3974e8c85..d1a6b5dcaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -266,10 +266,12 @@ jobs: - if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') name: Unittests + timeout-minutes: 5 run: ./ci/run_tests.sh unittests - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Functionaltests + timeout-minutes: 15 run: ./ci/run_tests.sh functionaltests - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success') @@ -340,6 +342,7 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Run functionaltests + timeout-minutes: 15 run: cmake --build build --target functionaltest - if: success() || failure() && steps.abort_job.outputs.status == 'success' -- cgit From ec932961cc5596009f3179edd620bc778a1503d7 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 9 Feb 2023 21:13:03 +0100 Subject: ci: inline internal caching script to Github actions (#22192) I don't think it's possible to meaningfully abstract away caching on multiple providers, as each provider has different mechanisms on how they work. --- .github/workflows/ci.yml | 9 --------- .github/workflows/env.sh | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1a6b5dcaa..f80c34fe96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,9 +110,6 @@ jobs: run: | git diff --color --exit-code - - name: Cache dependencies - run: ./ci/before_cache.sh - lintc: # This job tests two things: it lints the code but also builds neovim using # system dependencies instead of bundled dependencies. This is to make sure @@ -173,9 +170,6 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' run: cmake --build build --target clang-tidy - - name: Cache dependencies - run: ./ci/before_cache.sh - posix: name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) strategy: @@ -282,9 +276,6 @@ jobs: name: Install nvim run: ./ci/run_tests.sh install_nvim - - name: Cache dependencies - run: ./ci/before_cache.sh - windows: runs-on: windows-2019 timeout-minutes: 45 diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index 24d85fc23c..08e5ad97ab 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -11,7 +11,7 @@ LOG_DIR=$BUILD_DIR/log NVIM_LOG_FILE=$BUILD_DIR/.nvimlog VALGRIND_LOG=$LOG_DIR/valgrind-%p.log CACHE_DIR=$HOME/.cache -CACHE_NVIM_DEPS_DIR=$CACHE_DIR/nvim-deps +CACHE_NVIM_DEPS_DIR=$DEPS_BUILD_DIR CACHE_MARKER=$CACHE_NVIM_DEPS_DIR/.ci_cache_marker CACHE_UNCRUSTIFY=$CACHE_DIR/uncrustify DEPS_CMAKE_FLAGS= -- cgit From eb3f8989a01cce538150700f7bfe75b1af23bd4d Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 9 Feb 2023 23:23:48 +0100 Subject: ci(lintcommit): turn off debug tracing (#22196) The default output is too verbose and messy for someone not already familiar with lintcommit, which defeats it purpose. --- .github/workflows/lintcommit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index a7a227865d..9941a01a9b 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -20,4 +20,4 @@ jobs: with: neovim: true - run: wget https://raw.githubusercontent.com/neovim/neovim/master/scripts/lintcommit.lua - - run: nvim --clean -es +"cd pr_nvim" +"lua dofile('../lintcommit.lua').main({trace=true})" + - run: nvim --clean -es +"cd pr_nvim" +"lua dofile('../lintcommit.lua').main({trace=false})" -- cgit From 827947447e4d084e30850ff6530023c9db6d317f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 10 Feb 2023 12:04:00 +0100 Subject: ci: split functionaltest-lua into two separate jobs (#22201) More specifically, move the job testing the oldest supported cmake into its own job. This opens the way for other jobs to use powerful and advanced cmake features such as choosing which files to use with the -S flag. Removed testing from this job as this probably won't reveal anything that other jobs already doesn't already show, since the only difference is the cmake version. --- .github/workflows/ci.yml | 65 +++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 23 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f80c34fe96..c171920d4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -194,15 +194,11 @@ jobs: # functionaltest-lua is our dumping ground for non-mainline configurations. # 1. Check that the tests pass with PUC Lua instead of LuaJIT. - # 2. Use as oldest/minimum versions of dependencies/build tools we - # still explicitly support so we don't accidentally rely on - # features that is only available on later versions. - # 3. No treesitter parsers installed. + # 2. No treesitter parsers installed. - flavor: functionaltest-lua cc: gcc runner: ubuntu-22.04 os: linux - cmake: minimum_required runs-on: ${{ matrix.runner }} timeout-minutes: 45 env: @@ -218,24 +214,6 @@ jobs: if: matrix.os == 'linux' run: ./.github/scripts/install_deps_ubuntu.sh - - name: Install minimum required version of cmake - if: matrix.cmake == 'minimum_required' - env: - CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh' - CMAKE_VERSION: '3.10.0' - shell: bash - run: | - curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL" - mkdir -p "$HOME/.local/bin" /opt/cmake-custom - chmod a+x /tmp/cmake-installer.sh - /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license - ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake" - cmake_version="$(cmake --version | head -1)" - echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || { - echo "Unexpected CMake version: $cmake_version" - exit 1 - } - - name: Install brew packages if: matrix.os == 'osx' run: | @@ -276,6 +254,47 @@ jobs: name: Install nvim run: ./ci/run_tests.sh install_nvim + old_cmake: + name: Test oldest supported cmake + runs-on: ubuntu-22.04 + timeout-minutes: 15 + env: + CI_OS_NAME: linux + CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh' + CMAKE_VERSION: '3.10.0' + steps: + - uses: actions/checkout@v3 + + - name: Setup common environment variables + run: ./.github/workflows/env.sh old_cmake + + - name: Install apt packages + run: ./.github/scripts/install_deps_ubuntu.sh + + - name: Install minimum required version of cmake + run: | + curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL" + mkdir -p "$HOME/.local/bin" /opt/cmake-custom + chmod a+x /tmp/cmake-installer.sh + /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license + ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake" + cmake_version="$(cmake --version | head -1)" + echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || { + echo "Unexpected CMake version: $cmake_version" + exit 1 + } + + - uses: ./.github/actions/cache + + - name: Build dependencies + run: make deps + + - name: Build + run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D MIN_LOG_LEVEL=3" + + - name: Install + run: make install + windows: runs-on: windows-2019 timeout-minutes: 45 -- cgit From d5b1712dc4ced82e15a9a736626d4e2e3370c9b4 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 10 Feb 2023 13:56:07 +0100 Subject: ci: remove unnecessary environment variables (#22175) --- .github/workflows/ci.yml | 12 +++++------- .github/workflows/env.sh | 15 ++++++--------- .github/workflows/release.yml | 5 ++--- .github/workflows/vim-patches.yml | 2 +- 4 files changed, 14 insertions(+), 20 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c171920d4f..c27100072f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,8 +85,8 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: luacheck run: | - cmake -B $BUILD_DIR -G Ninja - cmake --build $BUILD_DIR --target lintlua-luacheck + cmake -B build -G Ninja + cmake --build build --target lintlua-luacheck - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: lintsh @@ -274,10 +274,10 @@ jobs: - name: Install minimum required version of cmake run: | curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL" - mkdir -p "$HOME/.local/bin" /opt/cmake-custom + mkdir -p "$BIN_DIR" /opt/cmake-custom chmod a+x /tmp/cmake-installer.sh /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license - ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake" + ln -sfn /opt/cmake-custom/bin/cmake "$BIN_DIR/cmake" cmake_version="$(cmake --version | head -1)" echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || { echo "Unexpected CMake version: $cmake_version" @@ -300,8 +300,6 @@ jobs: timeout-minutes: 45 env: DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps - CACHE_NVIM_DEPS_DIR: ${{ github.workspace }}/nvim-deps - DEPS_PREFIX: ${{ github.workspace }}/nvim-deps/usr name: windows (MSVC_64) steps: - uses: actions/checkout@v3 @@ -318,7 +316,7 @@ jobs: - name: Build nvim run: | - cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D DEPS_PREFIX="$env:DEPS_PREFIX" -D CI_BUILD=ON + cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON cmake --build build - name: Install test deps diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index 08e5ad97ab..7be26e1a72 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -4,19 +4,17 @@ set -e -u FLAVOR=${1:-} BUILD_DIR=$CI_BUILD_DIR/build -BIN_DIR=$HOME/.local/bin +BIN_DIR=$CI_BUILD_DIR/bin DEPS_BUILD_DIR=$HOME/nvim-deps -INSTALL_PREFIX=$HOME/nvim-install +INSTALL_PREFIX=$CI_BUILD_DIR/nvim-install LOG_DIR=$BUILD_DIR/log NVIM_LOG_FILE=$BUILD_DIR/.nvimlog VALGRIND_LOG=$LOG_DIR/valgrind-%p.log -CACHE_DIR=$HOME/.cache -CACHE_NVIM_DEPS_DIR=$DEPS_BUILD_DIR -CACHE_MARKER=$CACHE_NVIM_DEPS_DIR/.ci_cache_marker +CACHE_DIR=$CI_BUILD_DIR/.cache CACHE_UNCRUSTIFY=$CACHE_DIR/uncrustify DEPS_CMAKE_FLAGS= FUNCTIONALTEST=functionaltest -CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D BUSTED_OUTPUT_TYPE=nvim -D DEPS_PREFIX=$DEPS_BUILD_DIR/usr -D MIN_LOG_LEVEL=3" +CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D MIN_LOG_LEVEL=3" CLANG_SANITIZER= ASAN_OPTIONS= UBSAN_OPTIONS= @@ -57,6 +55,7 @@ esac cat <> "$GITHUB_ENV" CMAKE_FLAGS=$CMAKE_FLAGS BUILD_DIR=$BUILD_DIR +BIN_DIR=$BIN_DIR DEPS_BUILD_DIR=$DEPS_BUILD_DIR DEPS_CMAKE_FLAGS=$DEPS_CMAKE_FLAGS FUNCTIONALTEST=$FUNCTIONALTEST @@ -64,9 +63,7 @@ INSTALL_PREFIX=$INSTALL_PREFIX LOG_DIR=$LOG_DIR NVIM_LOG_FILE=$NVIM_LOG_FILE VALGRIND_LOG=$VALGRIND_LOG -CACHE_DIR=$HOME/.cache -CACHE_NVIM_DEPS_DIR=$CACHE_NVIM_DEPS_DIR -CACHE_MARKER=$CACHE_MARKER +CACHE_DIR=$CACHE_DIR CACHE_UNCRUSTIFY=$CACHE_UNCRUSTIFY CLANG_SANITIZER=$CLANG_SANITIZER ASAN_OPTIONS=$ASAN_OPTIONS diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f547e27b3b..838caf3fca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,8 +112,7 @@ jobs: windows: runs-on: windows-2019 env: - DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }} - DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }} + DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps CMAKE_BUILD_TYPE: "RelWithDebInfo" name: windows (MSVC_64) steps: @@ -128,7 +127,7 @@ jobs: cmake --build $env:DEPS_BUILD_DIR - name: build package run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX" + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' cmake --build build --target package - uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/vim-patches.yml b/.github/workflows/vim-patches.yml index 159eb09e7c..305f8019f1 100644 --- a/.github/workflows/vim-patches.yml +++ b/.github/workflows/vim-patches.yml @@ -11,7 +11,7 @@ jobs: contents: write pull-requests: write env: - VIM_SOURCE_DIR: ${{ format('{0}/vim-src', github.workspace) }} + VIM_SOURCE_DIR: ${{ github.workspace }}/vim-src VERSION_BRANCH: marvim/ci-version-update GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: -- cgit From 87d08095451d8d34030ddc62df093394f247740f Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 18 Jan 2023 15:42:30 +0100 Subject: build(ci): let ASAN print tracebacks for more errors (SIGABORT, SIGILL) --- .github/workflows/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index 7be26e1a72..b4cdb3a8d9 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -23,7 +23,7 @@ TSAN_OPTIONS= case "$FLAVOR" in asan) CLANG_SANITIZER=ASAN_UBSAN - ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan:intercept_tls_get_addr=0" + ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=$LOG_DIR/asan:intercept_tls_get_addr=0" UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" ;; tsan) -- cgit From b0d156c00b3900c8e40cf7f0e76c34b734d50598 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Feb 2023 13:22:54 +0100 Subject: ci: run lintcommit file from PR branch (#22219) As the trigger type is no longer pull_request_target there is no longer any risk of using the lintcommit script directly from the user PR. --- .github/workflows/lintcommit.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index 9941a01a9b..afedbe0b12 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -15,9 +15,7 @@ jobs: with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - path: pr_nvim - uses: rhysd/action-setup-vim@v1 with: neovim: true - - run: wget https://raw.githubusercontent.com/neovim/neovim/master/scripts/lintcommit.lua - - run: nvim --clean -es +"cd pr_nvim" +"lua dofile('../lintcommit.lua').main({trace=false})" + - run: nvim --clean -es +"lua require('scripts.lintcommit').main({trace=false})" -- cgit From 883ec20d9f91bde9c348bfcc0e1fcc3e3533cd89 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Feb 2023 13:27:43 +0100 Subject: ci: inline build commands and remove before_script.sh (#22202) Abstracting the build commands to a separate script makes it more difficult to reason about it and more error-prone. --- .github/workflows/ci.yml | 48 +++++++++++++++++++++++++++++++++--------------- .github/workflows/env.sh | 8 ++++---- 2 files changed, 37 insertions(+), 19 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c27100072f..205a8e1615 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ concurrency: cancel-in-progress: true env: - CI_BUILD_DIR: ${{ github.workspace }} UNCRUSTIFY_VERSION: uncrustify-0.75.0 # TEST_FILE: test/functional/core/startup_spec.lua # TEST_FILTER: foo @@ -26,8 +25,6 @@ jobs: if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') runs-on: ubuntu-22.04 timeout-minutes: 10 - env: - CC: gcc steps: - uses: actions/checkout@v3 @@ -67,7 +64,9 @@ jobs: - uses: ./.github/actions/cache - name: Build third-party deps - run: ./ci/before_script.sh + run: | + cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS} + cmake --build "${DEPS_BUILD_DIR}" - if: "!cancelled()" name: Determine if run should be aborted @@ -90,7 +89,7 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: lintsh - run: make lintsh + run: cmake --build build --target lintsh - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: uncrustify @@ -119,8 +118,6 @@ jobs: if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') runs-on: ubuntu-22.04 timeout-minutes: 10 - env: - CC: gcc steps: - uses: actions/checkout@v3 @@ -153,10 +150,14 @@ jobs: - uses: ./.github/actions/cache - name: Build third-party deps - run: ./ci/before_script.sh + run: | + cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS} + cmake --build "${DEPS_BUILD_DIR}" - - name: Build nvim - run: make + - name: Build + run: | + cmake -B build -G Ninja + cmake --build build - if: "!cancelled()" name: Determine if run should be aborted @@ -226,10 +227,23 @@ jobs: - uses: ./.github/actions/cache - name: Build third-party deps - run: ./ci/before_script.sh + run: | + if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then + DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -D USE_BUNDLED_LUA=ON" + fi + cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS} + cmake --build "${DEPS_BUILD_DIR}" - name: Build - run: ./ci/run_tests.sh build_nvim + run: | + if test -n "${CLANG_SANITIZER}" ; then + CMAKE_FLAGS="${CMAKE_FLAGS} -D CLANG_${CLANG_SANITIZER}=ON" + fi + cmake -B build -G Ninja ${CMAKE_FLAGS} + cmake --build build + + - name: Prepare sanitizer + run: ./ci/run_tests.sh prepare_sanitizer - if: "!cancelled()" name: Determine if run should be aborted @@ -251,8 +265,12 @@ jobs: run: ./ci/run_tests.sh oldtests - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Install nvim - run: ./ci/run_tests.sh install_nvim + name: Install + run: cmake --install build + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Installtests + run: ./ci/run_tests.sh installtests old_cmake: name: Test oldest supported cmake @@ -314,7 +332,7 @@ jobs: cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' cmake --build $env:DEPS_BUILD_DIR - - name: Build nvim + - name: Build run: | cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON cmake --build build diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index b4cdb3a8d9..4a22c796b4 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -3,14 +3,14 @@ set -e -u FLAVOR=${1:-} -BUILD_DIR=$CI_BUILD_DIR/build -BIN_DIR=$CI_BUILD_DIR/bin +BUILD_DIR=$GITHUB_WORKSPACE/build +BIN_DIR=$GITHUB_WORKSPACE/bin DEPS_BUILD_DIR=$HOME/nvim-deps -INSTALL_PREFIX=$CI_BUILD_DIR/nvim-install +INSTALL_PREFIX=$GITHUB_WORKSPACE/nvim-install LOG_DIR=$BUILD_DIR/log NVIM_LOG_FILE=$BUILD_DIR/.nvimlog VALGRIND_LOG=$LOG_DIR/valgrind-%p.log -CACHE_DIR=$CI_BUILD_DIR/.cache +CACHE_DIR=$GITHUB_WORKSPACE/.cache CACHE_UNCRUSTIFY=$CACHE_DIR/uncrustify DEPS_CMAKE_FLAGS= FUNCTIONALTEST=functionaltest -- cgit From 3a5dddf24f9d4d8959194b0cd3c6a7dd0cbd73ae Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Feb 2023 18:16:04 +0100 Subject: ci: show all logs at the end of a run (#22226) * ci: show all logs at the end of a run The current CI won't show the logs on error due to early exit. This will at least show the logs, although for all tests at once. --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 205a8e1615..082d0babb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -211,6 +211,9 @@ jobs: - name: Setup common environment variables run: ./.github/workflows/env.sh ${{ matrix.flavor }} + - name: Create log dir + run: mkdir -p "${LOG_DIR}" + - name: Install apt packages if: matrix.os == 'linux' run: ./.github/scripts/install_deps_ubuntu.sh @@ -242,9 +245,6 @@ jobs: cmake -B build -G Ninja ${CMAKE_FLAGS} cmake --build build - - name: Prepare sanitizer - run: ./ci/run_tests.sh prepare_sanitizer - - if: "!cancelled()" name: Determine if run should be aborted id: abort_job @@ -272,6 +272,10 @@ jobs: name: Installtests run: ./ci/run_tests.sh installtests + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Show logs + run: cat $(find "$LOG_DIR" -type f) + old_cmake: name: Test oldest supported cmake runs-on: ubuntu-22.04 -- cgit From e81b4274fc18de4be753c07db642111129ff84ee Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 12 Feb 2023 11:50:08 +0100 Subject: ci: delete ci/ (#22227) Having CI scripts that is separate from the build system causes tremendous amounts of problems, headaches and bugs. Testing the validity of the scripts locally become near impossible as time goes on as they're only vetted if it works on whatever CI provider we happened to have at the time, with their own quirks and behavior. The extra indirection between "cmake <-> general CI scripts <-> GHA" is also a frequent source of problems, as the orchestration needs to be done with environment variables, cmake flags and github actions matrix strategy. This combination has turned out to be exceptionally fragile. Examples: https://github.com/neovim/neovim/commit/15394b6855c3b17be06bf2bfbac7797d9c3ebf1d https://github.com/neovim/neovim/commit/13aa23b62af4df3e7f10687b76fe8c04efa2a598 https://github.com/neovim/neovim/pull/22072#discussion_r1094390713 A lot of the code was inlined to .github/workflows/ci.yml without further modifications. While this in itself doesn't integrate with our build system any more than the current situation, it does 1. remove a level of indirection, and more importantly 2. allow us to slowly start integrating the CI into our build system now that all the relevant code is in one place. --- .github/workflows/ci.yml | 104 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 14 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 082d0babb3..3135bba571 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -208,8 +208,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup common environment variables - run: ./.github/workflows/env.sh ${{ matrix.flavor }} + - name: Set up environment + run: | + ./.github/workflows/env.sh ${{ matrix.flavor }} + ulimit -c unlimited - name: Create log dir run: mkdir -p "${LOG_DIR}" @@ -225,7 +227,22 @@ jobs: brew install automake cpanminus ninja - name: Setup interpreter packages - run: ./ci/install.sh + run: | + # Use default CC to avoid compilation problems when installing Python modules. + echo "Install neovim module for Python." + CC=cc python3 -m pip -q install --user --upgrade pynvim + + echo "Install neovim RubyGem." + gem install --no-document --bindir "$BIN_DIR" --user-install --pre neovim + + echo "Install neovim npm package" + npm install -g neovim + npm link neovim + + if [[ $CI_OS_NAME != osx ]]; then + sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log" + perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' + fi - uses: ./.github/actions/cache @@ -251,18 +268,23 @@ jobs: run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT - if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Unittests + name: Unittest timeout-minutes: 5 - run: ./ci/run_tests.sh unittests + run: cmake --build build --target unittest - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Functionaltests + - if: matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') + name: Functionaltest + timeout-minutes: 15 + run: cmake --build build --target functionaltest + + - if: matrix.flavor == 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') + name: Functionaltest with PUC Lua timeout-minutes: 15 - run: ./ci/run_tests.sh functionaltests + run: cmake --build build --target functionaltest-lua - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Oldtests - run: ./ci/run_tests.sh oldtests + name: Oldtest + run: make oldtest - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Install @@ -270,12 +292,66 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Installtests - run: ./ci/run_tests.sh installtests + run: | + "${INSTALL_PREFIX}/bin/nvim" --version + if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then + echo "Running ':help' in the installed nvim failed." + echo "Maybe the helptags have not been generated properly." + echo 'Failed running :help' + exit 1 + fi + + # Check that all runtime files were installed + for file in $(git -C runtime ls-files '*.vim' '*.ps' '*.dict' '*.py' '*.tutor'); do + if ! test -e "$INSTALL_PREFIX/share/nvim/runtime/$file"; then + printf "%s%s" 'It appears that %s is not installed.' "$file" + exit 1 + fi + done + + # Check that some runtime files are installed and are executables + for file in $(git -C runtime ls-files '*.awk' '*.sh' '*.bat'); do + if ! test -x "$INSTALL_PREFIX/share/nvim/runtime/$file"; then + printf "%s%s" 'It appears that %s is not installed or is not executable.' "$file" + exit 1 + fi + done + + # Check that generated syntax file has function names, #5060. + genvimsynf=syntax/vim/generated.vim + gpat='syn keyword vimFuncName .*eval' + if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf"; then + echo "It appears that $genvimsynf does not contain $gpat." + exit 1 + fi - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Show logs run: cat $(find "$LOG_DIR" -type f) + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Show core dumps + run: | + app="${1:-${BUILD_DIR}/bin/nvim}" + if test "${CI_OS_NAME}" = osx; then + cores="$(find /cores/ -type f -print)" + else + cores="$(find ./ -type f \( -name 'core.*' -o -name core -o -name nvim.core \) -print)" + fi + + if test -z "${cores}"; then + exit 0 + fi + for core in $cores; do + if test "${CI_OS_NAME}" = osx; then + lldb -Q -o "bt all" -f "${app}" -c "${core}" + else + gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}" + fi + done + echo 'Core dumps found' + exit 1 + old_cmake: name: Test oldest supported cmake runs-on: ubuntu-22.04 @@ -371,15 +447,15 @@ jobs: "status=${{ job.status }}" >> $env:GITHUB_OUTPUT - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Run functionaltests + name: Run functionaltest timeout-minutes: 15 run: cmake --build build --target functionaltest - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Run oldtests + name: Run oldtest run: | # Add MSYS to path, required for e.g. `find` used in test scripts. - # But would break functionaltests, where its `more` would be used then. + # But would break functionaltest, where its `more` would be used then. $OldPath = $env:PATH $env:PATH = "C:\msys64\usr\bin;$env:PATH" & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path src\nvim\testdir) VERBOSE=1 -- cgit From c099836168fd669372895bb9bfa16522b5972134 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 12 Feb 2023 13:09:46 +0100 Subject: ci: convert environment variables to matrix variables (#22224) Having as few indirections as possible makes it easier to understand the code. --- .github/workflows/ci.yml | 66 ++++++++++++++++++++++-------------------------- .github/workflows/env.sh | 20 --------------- 2 files changed, 30 insertions(+), 56 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3135bba571..b80220b2c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,8 +65,8 @@ jobs: - name: Build third-party deps run: | - cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS} - cmake --build "${DEPS_BUILD_DIR}" + cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja + cmake --build $DEPS_BUILD_DIR - if: "!cancelled()" name: Determine if run should be aborted @@ -106,8 +106,7 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: check uncrustify - run: | - git diff --color --exit-code + run: git diff --color --exit-code lintc: # This job tests two things: it lints the code but also builds neovim using @@ -145,14 +144,18 @@ jobs: # lua-luv-dev # Remove comments from packages once we start using these external - # dependencies. See env.sh for more context. + # dependencies. - uses: ./.github/actions/cache - name: Build third-party deps run: | - cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS} - cmake --build "${DEPS_BUILD_DIR}" + # Ideally all dependencies should external for this job, but some + # dependencies don't have the required version available. We use the + # bundled versions for these with the hopes of being able to remove them + # later on. + cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja -D USE_BUNDLED=OFF -D USE_BUNDLED_LUV=ON -D USE_BUNDLED_LIBVTERM=ON + cmake --build $DEPS_BUILD_DIR - name: Build run: | @@ -180,18 +183,16 @@ jobs: - flavor: asan cc: clang runner: ubuntu-22.04 - os: linux + sanitizer_flags: -D CLANG_ASAN_UBSAN=ON - flavor: tsan cc: clang runner: ubuntu-22.04 - os: linux + sanitizer_flags: -D CLANG_TSAN=ON - flavor: uchar cc: gcc runner: ubuntu-22.04 - os: linux - cc: clang runner: macos-12 - os: osx # functionaltest-lua is our dumping ground for non-mainline configurations. # 1. Check that the tests pass with PUC Lua instead of LuaJIT. @@ -199,12 +200,11 @@ jobs: - flavor: functionaltest-lua cc: gcc runner: ubuntu-22.04 - os: linux + deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON runs-on: ${{ matrix.runner }} timeout-minutes: 45 env: CC: ${{ matrix.cc }} - CI_OS_NAME: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -214,14 +214,14 @@ jobs: ulimit -c unlimited - name: Create log dir - run: mkdir -p "${LOG_DIR}" + run: mkdir -p "$LOG_DIR" - name: Install apt packages - if: matrix.os == 'linux' + if: runner.os == 'Linux' run: ./.github/scripts/install_deps_ubuntu.sh - name: Install brew packages - if: matrix.os == 'osx' + if: runner.os == 'macOS' run: | brew update --quiet brew install automake cpanminus ninja @@ -239,7 +239,7 @@ jobs: npm install -g neovim npm link neovim - if [[ $CI_OS_NAME != osx ]]; then + if [[ $RUNNER_OS != macOS ]]; then sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log" perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' fi @@ -248,18 +248,12 @@ jobs: - name: Build third-party deps run: | - if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then - DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -D USE_BUNDLED_LUA=ON" - fi - cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS} - cmake --build "${DEPS_BUILD_DIR}" + cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja ${{ matrix.deps_flags }} + cmake --build $DEPS_BUILD_DIR - name: Build run: | - if test -n "${CLANG_SANITIZER}" ; then - CMAKE_FLAGS="${CMAKE_FLAGS} -D CLANG_${CLANG_SANITIZER}=ON" - fi - cmake -B build -G Ninja ${CMAKE_FLAGS} + cmake -B build -G Ninja $CMAKE_FLAGS ${{ matrix.sanitizer_flags }} cmake --build build - if: "!cancelled()" @@ -293,8 +287,8 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Installtests run: | - "${INSTALL_PREFIX}/bin/nvim" --version - if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then + "$INSTALL_PREFIX/bin/nvim" --version + if ! "$INSTALL_PREFIX/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then echo "Running ':help' in the installed nvim failed." echo "Maybe the helptags have not been generated properly." echo 'Failed running :help' @@ -320,7 +314,7 @@ jobs: # Check that generated syntax file has function names, #5060. genvimsynf=syntax/vim/generated.vim gpat='syn keyword vimFuncName .*eval' - if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf"; then + if ! grep -q "$gpat" "$INSTALL_PREFIX/share/nvim/runtime/$genvimsynf"; then echo "It appears that $genvimsynf does not contain $gpat." exit 1 fi @@ -332,21 +326,22 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Show core dumps run: | - app="${1:-${BUILD_DIR}/bin/nvim}" - if test "${CI_OS_NAME}" = osx; then + # TODO(dundargoc): app should be luajit for unittests + app="build/bin/nvim" + if test "$RUNNER_OS" = macOS; then cores="$(find /cores/ -type f -print)" else cores="$(find ./ -type f \( -name 'core.*' -o -name core -o -name nvim.core \) -print)" fi - if test -z "${cores}"; then + if test -z "$cores"; then exit 0 fi for core in $cores; do - if test "${CI_OS_NAME}" = osx; then - lldb -Q -o "bt all" -f "${app}" -c "${core}" + if test "$RUNNER_OS" = macOS; then + lldb -Q -o "bt all" -f "$app" -c "$core" else - gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}" + gdb -n -batch -ex 'thread apply all bt full' "$app" -c "$core" fi done echo 'Core dumps found' @@ -357,7 +352,6 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 15 env: - CI_OS_NAME: linux CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh' CMAKE_VERSION: '3.10.0' steps: diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index 4a22c796b4..a93e9bdd97 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -12,41 +12,24 @@ NVIM_LOG_FILE=$BUILD_DIR/.nvimlog VALGRIND_LOG=$LOG_DIR/valgrind-%p.log CACHE_DIR=$GITHUB_WORKSPACE/.cache CACHE_UNCRUSTIFY=$CACHE_DIR/uncrustify -DEPS_CMAKE_FLAGS= -FUNCTIONALTEST=functionaltest CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D MIN_LOG_LEVEL=3" -CLANG_SANITIZER= ASAN_OPTIONS= UBSAN_OPTIONS= TSAN_OPTIONS= case "$FLAVOR" in asan) - CLANG_SANITIZER=ASAN_UBSAN ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=$LOG_DIR/asan:intercept_tls_get_addr=0" UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" ;; tsan) TSAN_OPTIONS=log_path=$LOG_DIR/tsan - CLANG_SANITIZER=TSAN ;; uchar) CMAKE_FLAGS+=" -D UNSIGNED_CHAR=ON" ;; - lintc) - # Re-enable once system deps are available - # CMAKE_FLAGS+=" -D LIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -D LIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1" - - # Ideally all dependencies should external for this job, but some - # dependencies don't have the required version available. We use the - # bundled versions for these with the hopes of being able to remove them - # later on. - DEPS_CMAKE_FLAGS+=" -D USE_BUNDLED=OFF -D USE_BUNDLED_LUV=ON -D USE_BUNDLED_LIBVTERM=ON" - ;; functionaltest-lua) CMAKE_FLAGS+=" -D PREFER_LUA=ON" - FUNCTIONALTEST=functionaltest-lua - DEPS_CMAKE_FLAGS+=" -D USE_BUNDLED_LUAJIT=OFF" ;; *) ;; @@ -57,15 +40,12 @@ CMAKE_FLAGS=$CMAKE_FLAGS BUILD_DIR=$BUILD_DIR BIN_DIR=$BIN_DIR DEPS_BUILD_DIR=$DEPS_BUILD_DIR -DEPS_CMAKE_FLAGS=$DEPS_CMAKE_FLAGS -FUNCTIONALTEST=$FUNCTIONALTEST INSTALL_PREFIX=$INSTALL_PREFIX LOG_DIR=$LOG_DIR NVIM_LOG_FILE=$NVIM_LOG_FILE VALGRIND_LOG=$VALGRIND_LOG CACHE_DIR=$CACHE_DIR CACHE_UNCRUSTIFY=$CACHE_UNCRUSTIFY -CLANG_SANITIZER=$CLANG_SANITIZER ASAN_OPTIONS=$ASAN_OPTIONS UBSAN_OPTIONS=$UBSAN_OPTIONS TSAN_OPTIONS=$TSAN_OPTIONS -- cgit From 477d4bbf5f01e5c001a887ed6842e56b5341e976 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 12 Feb 2023 18:08:37 +0100 Subject: ci: inline external environment scripts (#22237) Scripts that define the build itself shouldn't be external as they lead to hard to find bugs. --- .github/workflows/ci.yml | 51 +++++++++++++++++++++++++-------------- .github/workflows/codeql.yml | 3 --- .github/workflows/env.ps1 | 7 ------ .github/workflows/env.sh | 56 ------------------------------------------- .github/workflows/release.yml | 16 ++++++++----- 5 files changed, 43 insertions(+), 90 deletions(-) delete mode 100644 .github/workflows/env.ps1 delete mode 100755 .github/workflows/env.sh (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b80220b2c0..f49b54216d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,16 @@ concurrency: cancel-in-progress: true env: - UNCRUSTIFY_VERSION: uncrustify-0.75.0 + ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0 + BIN_DIR: ${{ github.workspace }}/bin + BUILD_DIR: ${{ github.workspace }}/build + DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps + INSTALL_PREFIX: ${{ github.workspace }}/nvim-install + LOG_DIR: ${{ github.workspace }}/build/log + NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog + TSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/tsan + UBSAN_OPTIONS: "print_stacktrace=1 log_path=${{ github.workspace }}/build/log/ubsan" + VALGRIND_LOG: ${{ github.workspace }}/build/log/valgrind-%p.log # TEST_FILE: test/functional/core/startup_spec.lua # TEST_FILTER: foo @@ -25,12 +34,12 @@ jobs: if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') runs-on: ubuntu-22.04 timeout-minutes: 10 + env: + CACHE_UNCRUSTIFY: ${{ github.workspace }}/.cache/uncrustify + UNCRUSTIFY_VERSION: uncrustify-0.75.0 steps: - uses: actions/checkout@v3 - - name: Setup common environment variables - run: ./.github/workflows/env.sh lint - - name: Install apt packages run: | ./.github/scripts/install_deps_ubuntu.sh @@ -58,7 +67,7 @@ jobs: build_dir=uncrustify/build cmake -S $source_dir -B $build_dir -G Ninja -D CMAKE_BUILD_TYPE=Release cmake --build $build_dir - mkdir -p $CACHE_DIR + mkdir -p .cache cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }} - uses: ./.github/actions/cache @@ -120,9 +129,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup common environment variables - run: ./.github/workflows/env.sh lintc - - name: Install apt packages run: | sudo add-apt-repository ppa:neovim-ppa/stable @@ -183,14 +189,15 @@ jobs: - flavor: asan cc: clang runner: ubuntu-22.04 - sanitizer_flags: -D CLANG_ASAN_UBSAN=ON + flags: -D CLANG_ASAN_UBSAN=ON - flavor: tsan cc: clang runner: ubuntu-22.04 - sanitizer_flags: -D CLANG_TSAN=ON + flags: -D CLANG_TSAN=ON - flavor: uchar cc: gcc runner: ubuntu-22.04 + flags: -D UNSIGNED_CHAR=ON - cc: clang runner: macos-12 @@ -201,6 +208,7 @@ jobs: cc: gcc runner: ubuntu-22.04 deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON + flags: -D PREFER_LUA=ON runs-on: ${{ matrix.runner }} timeout-minutes: 45 env: @@ -210,8 +218,8 @@ jobs: - name: Set up environment run: | - ./.github/workflows/env.sh ${{ matrix.flavor }} ulimit -c unlimited + echo "$BIN_DIR" >> $GITHUB_PATH - name: Create log dir run: mkdir -p "$LOG_DIR" @@ -244,6 +252,8 @@ jobs: perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' fi + - run: echo "DEPS_BUILD_DIR=$HOME/nvim-deps" >> $GITHUB_ENV + - uses: ./.github/actions/cache - name: Build third-party deps @@ -253,7 +263,7 @@ jobs: - name: Build run: | - cmake -B build -G Ninja $CMAKE_FLAGS ${{ matrix.sanitizer_flags }} + cmake -B build -G Ninja -D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D MIN_LOG_LEVEL=3 ${{ matrix.flags }} cmake --build build - if: "!cancelled()" @@ -357,8 +367,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup common environment variables - run: ./.github/workflows/env.sh old_cmake + - name: Set up environment + run: echo "$BIN_DIR" >> $GITHUB_PATH - name: Install apt packages run: ./.github/scripts/install_deps_ubuntu.sh @@ -390,16 +400,21 @@ jobs: windows: runs-on: windows-2019 timeout-minutes: 45 - env: - DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps - name: windows (MSVC_64) + name: windows steps: - uses: actions/checkout@v3 - uses: ./.github/actions/cache - name: Set env - run: ./.github/workflows/env.ps1 + run: | + $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { + & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { + $name, $value = $_ -split '=', 2 + "$name=$value" >> $env:GITHUB_ENV + } + } - name: Build deps run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a11a87f93a..7cdaab4f11 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -22,9 +22,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Setup common environment variables - run: ./.github/workflows/env.sh - - name: Install apt packages run: ./.github/scripts/install_deps_ubuntu.sh diff --git a/.github/workflows/env.ps1 b/.github/workflows/env.ps1 deleted file mode 100644 index 8ac267f2f9..0000000000 --- a/.github/workflows/env.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { - & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { - $name, $value = $_ -split '=', 2 - "$name=$value" >> $env:GITHUB_ENV - } -} diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh deleted file mode 100755 index a93e9bdd97..0000000000 --- a/.github/workflows/env.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -set -e -u - -FLAVOR=${1:-} - -BUILD_DIR=$GITHUB_WORKSPACE/build -BIN_DIR=$GITHUB_WORKSPACE/bin -DEPS_BUILD_DIR=$HOME/nvim-deps -INSTALL_PREFIX=$GITHUB_WORKSPACE/nvim-install -LOG_DIR=$BUILD_DIR/log -NVIM_LOG_FILE=$BUILD_DIR/.nvimlog -VALGRIND_LOG=$LOG_DIR/valgrind-%p.log -CACHE_DIR=$GITHUB_WORKSPACE/.cache -CACHE_UNCRUSTIFY=$CACHE_DIR/uncrustify -CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D MIN_LOG_LEVEL=3" -ASAN_OPTIONS= -UBSAN_OPTIONS= -TSAN_OPTIONS= - -case "$FLAVOR" in - asan) - ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=$LOG_DIR/asan:intercept_tls_get_addr=0" - UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" - ;; - tsan) - TSAN_OPTIONS=log_path=$LOG_DIR/tsan - ;; - uchar) - CMAKE_FLAGS+=" -D UNSIGNED_CHAR=ON" - ;; - functionaltest-lua) - CMAKE_FLAGS+=" -D PREFER_LUA=ON" - ;; - *) - ;; -esac - -cat <> "$GITHUB_ENV" -CMAKE_FLAGS=$CMAKE_FLAGS -BUILD_DIR=$BUILD_DIR -BIN_DIR=$BIN_DIR -DEPS_BUILD_DIR=$DEPS_BUILD_DIR -INSTALL_PREFIX=$INSTALL_PREFIX -LOG_DIR=$LOG_DIR -NVIM_LOG_FILE=$NVIM_LOG_FILE -VALGRIND_LOG=$VALGRIND_LOG -CACHE_DIR=$CACHE_DIR -CACHE_UNCRUSTIFY=$CACHE_UNCRUSTIFY -ASAN_OPTIONS=$ASAN_OPTIONS -UBSAN_OPTIONS=$UBSAN_OPTIONS -TSAN_OPTIONS=$TSAN_OPTIONS -EOF - -cat <> "$GITHUB_PATH" -$BIN_DIR -EOF diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 838caf3fca..a05038f32a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -111,20 +111,24 @@ jobs: windows: runs-on: windows-2019 - env: - DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps - CMAKE_BUILD_TYPE: "RelWithDebInfo" name: windows (MSVC_64) steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set env - run: ./.github/workflows/env.ps1 + run: | + $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { + & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { + $name, $value = $_ -split '=', 2 + "$name=$value" >> $env:GITHUB_ENV + } + } - name: Build deps run: | - cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' - cmake --build $env:DEPS_BUILD_DIR + cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' + cmake --build .deps - name: build package run: | cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -- cgit From 2b1c07a1d435b541c295afad13227ebb10def57e Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 12 Feb 2023 18:12:17 +0100 Subject: ci: remove unnecessary matrix from codeql workflow (#22239) --- .github/workflows/codeql.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7cdaab4f11..657ace20fd 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,11 +13,6 @@ jobs: contents: read security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'cpp' ] - steps: - name: Checkout repository uses: actions/checkout@v3 @@ -28,10 +23,9 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: - languages: ${{ matrix.language }} + languages: cpp - - if: matrix.language == 'cpp' - run: make + - run: make - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 -- cgit From 5d3769ea2343a30c60963011bef85346320bd97c Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:09:10 +0100 Subject: ci: install dependencies with a single script (#22241) It's easier if the os-specific installations are done by the script itself --- .github/workflows/ci.yml | 23 ++++++++--------------- .github/workflows/codeql.yml | 4 ++-- .github/workflows/coverity.yml | 4 +--- 3 files changed, 11 insertions(+), 20 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f49b54216d..717362963c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,9 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install apt packages + - name: Install dependencies run: | - ./.github/scripts/install_deps_ubuntu.sh + cmake -P ./.github/scripts/install_dependencies.cmake sudo apt-get install -y lua-check - name: Cache uncrustify @@ -129,10 +129,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install apt packages + - name: Install dependencies run: | sudo add-apt-repository ppa:neovim-ppa/stable - ./.github/scripts/install_deps_ubuntu.sh + cmake -P ./.github/scripts/install_dependencies.cmake sudo apt-get install -y \ libluajit-5.1-dev \ libmsgpack-dev \ @@ -224,15 +224,8 @@ jobs: - name: Create log dir run: mkdir -p "$LOG_DIR" - - name: Install apt packages - if: runner.os == 'Linux' - run: ./.github/scripts/install_deps_ubuntu.sh - - - name: Install brew packages - if: runner.os == 'macOS' - run: | - brew update --quiet - brew install automake cpanminus ninja + - name: Install dependencies + run: cmake -D TEST_DEPS=ON -P ./.github/scripts/install_dependencies.cmake - name: Setup interpreter packages run: | @@ -370,8 +363,8 @@ jobs: - name: Set up environment run: echo "$BIN_DIR" >> $GITHUB_PATH - - name: Install apt packages - run: ./.github/scripts/install_deps_ubuntu.sh + - name: Install dependencies + run: cmake -P ./.github/scripts/install_dependencies.cmake - name: Install minimum required version of cmake run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 657ace20fd..c4f4346de1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,8 +17,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Install apt packages - run: ./.github/scripts/install_deps_ubuntu.sh + - name: Install dependencies + run: cmake -P ./.github/scripts/install_dependencies.cmake - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 87e2cb1453..15c494dc93 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -11,9 +11,7 @@ jobs: - uses: actions/checkout@v3 - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip + run: cmake -P ./.github/scripts/install_dependencies.cmake - name: Download Coverity run: | -- cgit From 9de9bd4bedde734e6b795e899e78b5417bc82fe4 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:26:01 +0100 Subject: ci: replace cmake script with bash script (#22246) Bash has better error handling than cmake, and seem overall slightly more suited to scripting than cmake. --- .github/workflows/ci.yml | 10 ++++------ .github/workflows/codeql.yml | 2 +- .github/workflows/coverity.yml | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 717362963c..da4bcc6ad4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,9 +41,7 @@ jobs: - uses: actions/checkout@v3 - name: Install dependencies - run: | - cmake -P ./.github/scripts/install_dependencies.cmake - sudo apt-get install -y lua-check + run: ./.github/scripts/install_deps.sh lua-check - name: Cache uncrustify id: cache-uncrustify @@ -132,7 +130,7 @@ jobs: - name: Install dependencies run: | sudo add-apt-repository ppa:neovim-ppa/stable - cmake -P ./.github/scripts/install_dependencies.cmake + ./.github/scripts/install_deps.sh sudo apt-get install -y \ libluajit-5.1-dev \ libmsgpack-dev \ @@ -225,7 +223,7 @@ jobs: run: mkdir -p "$LOG_DIR" - name: Install dependencies - run: cmake -D TEST_DEPS=ON -P ./.github/scripts/install_dependencies.cmake + run: ./.github/scripts/install_deps.sh cpanminus - name: Setup interpreter packages run: | @@ -364,7 +362,7 @@ jobs: run: echo "$BIN_DIR" >> $GITHUB_PATH - name: Install dependencies - run: cmake -P ./.github/scripts/install_dependencies.cmake + run: ./.github/scripts/install_deps.sh - name: Install minimum required version of cmake run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c4f4346de1..497a79d2d1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v3 - name: Install dependencies - run: cmake -P ./.github/scripts/install_dependencies.cmake + run: ./.github/scripts/install_deps.sh - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 15c494dc93..e63f119958 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - name: Install dependencies - run: cmake -P ./.github/scripts/install_dependencies.cmake + run: ./.github/scripts/install_deps.sh - name: Download Coverity run: | -- cgit From bb9c673d2cf022e75d1d34d2b2dd12a1e41dc6ac Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 13 Feb 2023 20:04:54 +0100 Subject: ci: automatically maximize MIN_LOG_LEVEL if CI detected (#22248) Detect if on CI by checking that the CI environment variable is set to "true". This is a common pattern among CI providers, including github actions and cirrus. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da4bcc6ad4..4814e89a69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -254,7 +254,7 @@ jobs: - name: Build run: | - cmake -B build -G Ninja -D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D MIN_LOG_LEVEL=3 ${{ matrix.flags }} + cmake -B build -G Ninja -D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} cmake --build build - if: "!cancelled()" @@ -383,7 +383,7 @@ jobs: run: make deps - name: Build - run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D MIN_LOG_LEVEL=3" + run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX" - name: Install run: make install -- cgit From f1c5887377c9ae547a7564ec4fc52d72656a974f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 16 Feb 2023 00:15:09 +0100 Subject: ci: add GCC Release testing (#22274) ci: add GCC release testing We currently have no release testing, so it's good to check for any unwanted behavior on release builds as well. Prefer GCC over clang, as GCC release builds seem to create more warnings on release compared to debug. --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4814e89a69..c227fa5460 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -196,6 +196,10 @@ jobs: cc: gcc runner: ubuntu-22.04 flags: -D UNSIGNED_CHAR=ON + - flavor: release + cc: gcc + runner: ubuntu-22.04 + flags: -D CMAKE_BUILD_TYPE=Release - cc: clang runner: macos-12 @@ -262,7 +266,7 @@ jobs: id: abort_job run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT - - if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') + - if: matrix.flavor != 'tsan' && matrix.flavor != 'release' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') name: Unittest timeout-minutes: 5 run: cmake --build build --target unittest -- cgit From d079c8cc5d2f15742fbda4040ac2e11a9cba615b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 17 Feb 2023 11:06:56 +0800 Subject: ci: change functionaltest timeout to 20 minutes (#22294) 15 minutes is too short for TSAN. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c227fa5460..455c712948 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -273,12 +273,12 @@ jobs: - if: matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') name: Functionaltest - timeout-minutes: 15 + timeout-minutes: 20 run: cmake --build build --target functionaltest - if: matrix.flavor == 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') name: Functionaltest with PUC Lua - timeout-minutes: 15 + timeout-minutes: 20 run: cmake --build build --target functionaltest-lua - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success') @@ -452,7 +452,7 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Run functionaltest - timeout-minutes: 15 + timeout-minutes: 20 run: cmake --build build --target functionaltest - if: success() || failure() && steps.abort_job.outputs.status == 'success' -- cgit From fbb27a101f4fec14dec2f508be86d8688a8bd2d9 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 18 Feb 2023 00:09:51 +0100 Subject: ci: remove former dependencies that are no longer needed (#22301) libtool, autoconf, automake and perl are no longer dependencies of neovim and doesn't need to be installed in CI anymore. The dependencies and the commit that removed them as dependencies are the following: libtool: b05100a9eaad5980ea7652137bc4a1c2d15d752f perl: 20a932cb72cf077d54e3498ef93341ffe3d4cdbb autoconf+automake: e23c5fda0a3fe385af615372c474d4dad3b74464 --- .github/workflows/release.yml | 12 ++++-------- .github/workflows/universal_macos.yml | 4 +--- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a05038f32a..ee2845dd17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,9 +25,7 @@ jobs: with: fetch-depth: 0 - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip + run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') @@ -74,7 +72,7 @@ jobs: - name: Install dependencies run: | apt-get update - apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip + apt-get install -y build-essential cmake gettext locales ninja-build pkg-config unzip - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') run: CC=gcc-10 make appimage-latest - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') @@ -93,10 +91,8 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Install brew packages - run: | - brew update --quiet - brew install automake ninja + - name: Install dependencies + run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') diff --git a/.github/workflows/universal_macos.yml b/.github/workflows/universal_macos.yml index 7ce66ea5fb..765cea63c1 100644 --- a/.github/workflows/universal_macos.yml +++ b/.github/workflows/universal_macos.yml @@ -24,9 +24,7 @@ jobs: - uses: actions/checkout@v3 - name: Install dependencies - run: | - brew update --quiet - brew install automake ninja + run: ./.github/scripts/install_deps.sh - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV -- cgit From fc8c77a69f01eb1eac0a1b4373ae1bb7f81d1629 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 18 Feb 2023 10:47:22 +0100 Subject: ci: split ci.yml into a test workflow and a build test workflow (#22302) Having a workflow that only builds neovim without running all of the tests is a cheap way to test the build still works without burning too much CI time. --- .github/workflows/build.yml | 118 +++++++++ .github/workflows/ci.yml | 466 ---------------------------------- .github/workflows/test.yml | 370 +++++++++++++++++++++++++++ .github/workflows/universal_macos.yml | 32 --- 4 files changed, 488 insertions(+), 498 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/universal_macos.yml (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..43e91d9ed4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,118 @@ +name: build +on: + pull_request: + branches: + - 'master' + - 'release-[0-9]+.[0-9]+' + paths: + - '**.cmake' + - '**/CMakeLists.txt' + - '**/CMakePresets.json' + - 'cmake.*/**' + - '.github/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + + +env: + BIN_DIR: ${{ github.workspace }}/bin + INSTALL_PREFIX: ${{ github.workspace }}/nvim-install + +jobs: + macos-universal: + runs-on: macos-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: ./.github/scripts/install_deps.sh + + - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV + + - name: Build universal binary + run: ./.github/scripts/build_universal_macos.sh + + old-cmake: + name: Test oldest supported cmake + runs-on: ubuntu-22.04 + timeout-minutes: 15 + env: + CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh' + CMAKE_VERSION: '3.10.0' + steps: + - uses: actions/checkout@v3 + + - name: Set up environment + run: echo "$BIN_DIR" >> $GITHUB_PATH + + - name: Install dependencies + run: ./.github/scripts/install_deps.sh + + - name: Install minimum required version of cmake + run: | + curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL" + mkdir -p "$BIN_DIR" /opt/cmake-custom + chmod a+x /tmp/cmake-installer.sh + /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license + ln -sfn /opt/cmake-custom/bin/cmake "$BIN_DIR/cmake" + cmake_version="$(cmake --version | head -1)" + echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || { + echo "Unexpected CMake version: $cmake_version" + exit 1 + } + + - name: Build dependencies + run: make deps + + - name: Build + run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX" + + - name: Install + run: make install + + with-external-deps: + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo add-apt-repository ppa:neovim-ppa/stable + ./.github/scripts/install_deps.sh + sudo apt-get install -y \ + libluajit-5.1-dev \ + libmsgpack-dev \ + libtermkey-dev \ + libtree-sitter-dev \ + libunibilium-dev \ + libuv1-dev \ + lua-busted \ + lua-filesystem \ + lua-inspect \ + lua-lpeg \ + lua-nvim \ + luajit + # libvterm-dev \ + # lua-luv-dev + + # Remove comments from packages once we start using these external + # dependencies. + + - name: Build third-party deps + run: | + # Ideally all dependencies should external for this job, but some + # dependencies don't have the required version available. We use the + # bundled versions for these with the hopes of being able to remove them + # later on. + cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED=OFF -D USE_BUNDLED_LUV=ON -D USE_BUNDLED_LIBVTERM=ON + cmake --build .deps + + - name: Build + run: | + cmake -B build -G Ninja + cmake --build build + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 455c712948..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,466 +0,0 @@ -name: CI -on: - push: - branches: - - 'master' - - 'release-[0-9]+.[0-9]+' - pull_request: - branches: - - 'master' - - 'release-[0-9]+.[0-9]+' - paths-ignore: - - 'contrib/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true - -env: - ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0 - BIN_DIR: ${{ github.workspace }}/bin - BUILD_DIR: ${{ github.workspace }}/build - DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps - INSTALL_PREFIX: ${{ github.workspace }}/nvim-install - LOG_DIR: ${{ github.workspace }}/build/log - NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog - TSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/tsan - UBSAN_OPTIONS: "print_stacktrace=1 log_path=${{ github.workspace }}/build/log/ubsan" - VALGRIND_LOG: ${{ github.workspace }}/build/log/valgrind-%p.log - # TEST_FILE: test/functional/core/startup_spec.lua - # TEST_FILTER: foo - -jobs: - lint: - if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') - runs-on: ubuntu-22.04 - timeout-minutes: 10 - env: - CACHE_UNCRUSTIFY: ${{ github.workspace }}/.cache/uncrustify - UNCRUSTIFY_VERSION: uncrustify-0.75.0 - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh lua-check - - - name: Cache uncrustify - id: cache-uncrustify - uses: actions/cache@v3 - with: - path: ${{ env.CACHE_UNCRUSTIFY }} - key: ${{ env.UNCRUSTIFY_VERSION }} - - - name: Clone uncrustify - if: steps.cache-uncrustify.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: uncrustify/uncrustify - ref: ${{ env.UNCRUSTIFY_VERSION }} - path: uncrustify - - - name: Install uncrustify - if: steps.cache-uncrustify.outputs.cache-hit != 'true' - run: | - source_dir=uncrustify - build_dir=uncrustify/build - cmake -S $source_dir -B $build_dir -G Ninja -D CMAKE_BUILD_TYPE=Release - cmake --build $build_dir - mkdir -p .cache - cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }} - - - uses: ./.github/actions/cache - - - name: Build third-party deps - run: | - cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja - cmake --build $DEPS_BUILD_DIR - - - if: "!cancelled()" - name: Determine if run should be aborted - id: abort_job - run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: lintstylua - uses: JohnnyMorganz/stylua-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: latest - args: --check runtime/ - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: luacheck - run: | - cmake -B build -G Ninja - cmake --build build --target lintlua-luacheck - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: lintsh - run: cmake --build build --target lintsh - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: uncrustify - run: | - ${{ env.CACHE_UNCRUSTIFY }} -c ./src/uncrustify.cfg -q --replace --no-backup $(find ./src/nvim -name "*.[ch]") - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: suggester / uncrustify - uses: reviewdog/action-suggester@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tool_name: uncrustify - cleanup: false - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: check uncrustify - run: git diff --color --exit-code - - lintc: - # This job tests two things: it lints the code but also builds neovim using - # system dependencies instead of bundled dependencies. This is to make sure - # we are able to build neovim without pigeonholing ourselves into specifics - # of the bundled dependencies. - - if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - sudo add-apt-repository ppa:neovim-ppa/stable - ./.github/scripts/install_deps.sh - sudo apt-get install -y \ - libluajit-5.1-dev \ - libmsgpack-dev \ - libtermkey-dev \ - libtree-sitter-dev \ - libunibilium-dev \ - libuv1-dev \ - lua-busted \ - lua-filesystem \ - lua-inspect \ - lua-lpeg \ - lua-nvim \ - luajit - # libvterm-dev \ - # lua-luv-dev - - # Remove comments from packages once we start using these external - # dependencies. - - - uses: ./.github/actions/cache - - - name: Build third-party deps - run: | - # Ideally all dependencies should external for this job, but some - # dependencies don't have the required version available. We use the - # bundled versions for these with the hopes of being able to remove them - # later on. - cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja -D USE_BUNDLED=OFF -D USE_BUNDLED_LUV=ON -D USE_BUNDLED_LIBVTERM=ON - cmake --build $DEPS_BUILD_DIR - - - name: Build - run: | - cmake -B build -G Ninja - cmake --build build - - - if: "!cancelled()" - name: Determine if run should be aborted - id: abort_job - run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: clint.py - run: cmake --build build --target lintc-clint - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - run: cmake --build build --target clang-tidy - - posix: - name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) - strategy: - fail-fast: false - matrix: - include: - - flavor: asan - cc: clang - runner: ubuntu-22.04 - flags: -D CLANG_ASAN_UBSAN=ON - - flavor: tsan - cc: clang - runner: ubuntu-22.04 - flags: -D CLANG_TSAN=ON - - flavor: uchar - cc: gcc - runner: ubuntu-22.04 - flags: -D UNSIGNED_CHAR=ON - - flavor: release - cc: gcc - runner: ubuntu-22.04 - flags: -D CMAKE_BUILD_TYPE=Release - - cc: clang - runner: macos-12 - - # functionaltest-lua is our dumping ground for non-mainline configurations. - # 1. Check that the tests pass with PUC Lua instead of LuaJIT. - # 2. No treesitter parsers installed. - - flavor: functionaltest-lua - cc: gcc - runner: ubuntu-22.04 - deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON - flags: -D PREFER_LUA=ON - runs-on: ${{ matrix.runner }} - timeout-minutes: 45 - env: - CC: ${{ matrix.cc }} - steps: - - uses: actions/checkout@v3 - - - name: Set up environment - run: | - ulimit -c unlimited - echo "$BIN_DIR" >> $GITHUB_PATH - - - name: Create log dir - run: mkdir -p "$LOG_DIR" - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh cpanminus - - - name: Setup interpreter packages - run: | - # Use default CC to avoid compilation problems when installing Python modules. - echo "Install neovim module for Python." - CC=cc python3 -m pip -q install --user --upgrade pynvim - - echo "Install neovim RubyGem." - gem install --no-document --bindir "$BIN_DIR" --user-install --pre neovim - - echo "Install neovim npm package" - npm install -g neovim - npm link neovim - - if [[ $RUNNER_OS != macOS ]]; then - sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log" - perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' - fi - - - run: echo "DEPS_BUILD_DIR=$HOME/nvim-deps" >> $GITHUB_ENV - - - uses: ./.github/actions/cache - - - name: Build third-party deps - run: | - cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja ${{ matrix.deps_flags }} - cmake --build $DEPS_BUILD_DIR - - - name: Build - run: | - cmake -B build -G Ninja -D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} - cmake --build build - - - if: "!cancelled()" - name: Determine if run should be aborted - id: abort_job - run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT - - - if: matrix.flavor != 'tsan' && matrix.flavor != 'release' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Unittest - timeout-minutes: 5 - run: cmake --build build --target unittest - - - if: matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Functionaltest - timeout-minutes: 20 - run: cmake --build build --target functionaltest - - - if: matrix.flavor == 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Functionaltest with PUC Lua - timeout-minutes: 20 - run: cmake --build build --target functionaltest-lua - - - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Oldtest - run: make oldtest - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Install - run: cmake --install build - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Installtests - run: | - "$INSTALL_PREFIX/bin/nvim" --version - if ! "$INSTALL_PREFIX/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then - echo "Running ':help' in the installed nvim failed." - echo "Maybe the helptags have not been generated properly." - echo 'Failed running :help' - exit 1 - fi - - # Check that all runtime files were installed - for file in $(git -C runtime ls-files '*.vim' '*.ps' '*.dict' '*.py' '*.tutor'); do - if ! test -e "$INSTALL_PREFIX/share/nvim/runtime/$file"; then - printf "%s%s" 'It appears that %s is not installed.' "$file" - exit 1 - fi - done - - # Check that some runtime files are installed and are executables - for file in $(git -C runtime ls-files '*.awk' '*.sh' '*.bat'); do - if ! test -x "$INSTALL_PREFIX/share/nvim/runtime/$file"; then - printf "%s%s" 'It appears that %s is not installed or is not executable.' "$file" - exit 1 - fi - done - - # Check that generated syntax file has function names, #5060. - genvimsynf=syntax/vim/generated.vim - gpat='syn keyword vimFuncName .*eval' - if ! grep -q "$gpat" "$INSTALL_PREFIX/share/nvim/runtime/$genvimsynf"; then - echo "It appears that $genvimsynf does not contain $gpat." - exit 1 - fi - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Show logs - run: cat $(find "$LOG_DIR" -type f) - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Show core dumps - run: | - # TODO(dundargoc): app should be luajit for unittests - app="build/bin/nvim" - if test "$RUNNER_OS" = macOS; then - cores="$(find /cores/ -type f -print)" - else - cores="$(find ./ -type f \( -name 'core.*' -o -name core -o -name nvim.core \) -print)" - fi - - if test -z "$cores"; then - exit 0 - fi - for core in $cores; do - if test "$RUNNER_OS" = macOS; then - lldb -Q -o "bt all" -f "$app" -c "$core" - else - gdb -n -batch -ex 'thread apply all bt full' "$app" -c "$core" - fi - done - echo 'Core dumps found' - exit 1 - - old_cmake: - name: Test oldest supported cmake - runs-on: ubuntu-22.04 - timeout-minutes: 15 - env: - CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh' - CMAKE_VERSION: '3.10.0' - steps: - - uses: actions/checkout@v3 - - - name: Set up environment - run: echo "$BIN_DIR" >> $GITHUB_PATH - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh - - - name: Install minimum required version of cmake - run: | - curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL" - mkdir -p "$BIN_DIR" /opt/cmake-custom - chmod a+x /tmp/cmake-installer.sh - /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license - ln -sfn /opt/cmake-custom/bin/cmake "$BIN_DIR/cmake" - cmake_version="$(cmake --version | head -1)" - echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || { - echo "Unexpected CMake version: $cmake_version" - exit 1 - } - - - uses: ./.github/actions/cache - - - name: Build dependencies - run: make deps - - - name: Build - run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX" - - - name: Install - run: make install - - windows: - runs-on: windows-2019 - timeout-minutes: 45 - name: windows - steps: - - uses: actions/checkout@v3 - - - uses: ./.github/actions/cache - - - name: Set env - run: | - $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath - if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { - & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { - $name, $value = $_ -split '=', 2 - "$name=$value" >> $env:GITHUB_ENV - } - } - - - name: Build deps - run: | - cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' - cmake --build $env:DEPS_BUILD_DIR - - - name: Build - run: | - cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON - cmake --build build - - - name: Install test deps - run: | - $PSNativeCommandArgumentPassing = 'Legacy' - - & build\bin\nvim.exe "--version" - - # Ensure that the "win32" feature is set. - & build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' - - python -m pip install pynvim - # Sanity check - python -c "import pynvim; print(str(pynvim))" - - gem.cmd install --pre neovim - Get-Command -CommandType Application neovim-ruby-host.bat - - node --version - npm.cmd --version - - npm.cmd install -g neovim - Get-Command -CommandType Application neovim-node-host.cmd - npm.cmd link neovim - - - if: "!cancelled()" - name: Determine if run should be aborted - id: abort_job - run: | - "status=${{ job.status }}" >> $env:GITHUB_OUTPUT - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Run functionaltest - timeout-minutes: 20 - run: cmake --build build --target functionaltest - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Run oldtest - run: | - # Add MSYS to path, required for e.g. `find` used in test scripts. - # But would break functionaltest, where its `more` would be used then. - $OldPath = $env:PATH - $env:PATH = "C:\msys64\usr\bin;$env:PATH" - & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path src\nvim\testdir) VERBOSE=1 - $env:PATH = $OldPath diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..bfe6a22390 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,370 @@ +name: test +on: + push: + branches: + - 'master' + - 'release-[0-9]+.[0-9]+' + pull_request: + branches: + - 'master' + - 'release-[0-9]+.[0-9]+' + paths-ignore: + - 'contrib/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +env: + ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0 + BIN_DIR: ${{ github.workspace }}/bin + BUILD_DIR: ${{ github.workspace }}/build + DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps + INSTALL_PREFIX: ${{ github.workspace }}/nvim-install + LOG_DIR: ${{ github.workspace }}/build/log + NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog + TSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/tsan + UBSAN_OPTIONS: "print_stacktrace=1 log_path=${{ github.workspace }}/build/log/ubsan" + VALGRIND_LOG: ${{ github.workspace }}/build/log/valgrind-%p.log + # TEST_FILE: test/functional/core/startup_spec.lua + # TEST_FILTER: foo + +jobs: + lint: + if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') + runs-on: ubuntu-22.04 + timeout-minutes: 10 + env: + CACHE_UNCRUSTIFY: ${{ github.workspace }}/.cache/uncrustify + UNCRUSTIFY_VERSION: uncrustify-0.75.0 + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: ./.github/scripts/install_deps.sh lua-check + + - name: Cache uncrustify + id: cache-uncrustify + uses: actions/cache@v3 + with: + path: ${{ env.CACHE_UNCRUSTIFY }} + key: ${{ env.UNCRUSTIFY_VERSION }} + + - name: Clone uncrustify + if: steps.cache-uncrustify.outputs.cache-hit != 'true' + uses: actions/checkout@v3 + with: + repository: uncrustify/uncrustify + ref: ${{ env.UNCRUSTIFY_VERSION }} + path: uncrustify + + - name: Install uncrustify + if: steps.cache-uncrustify.outputs.cache-hit != 'true' + run: | + source_dir=uncrustify + build_dir=uncrustify/build + cmake -S $source_dir -B $build_dir -G Ninja -D CMAKE_BUILD_TYPE=Release + cmake --build $build_dir + mkdir -p .cache + cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }} + + - uses: ./.github/actions/cache + + - name: Build third-party deps + run: | + cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja + cmake --build $DEPS_BUILD_DIR + + - if: "!cancelled()" + name: Determine if run should be aborted + id: abort_job + run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: lintstylua + uses: JohnnyMorganz/stylua-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: latest + args: --check runtime/ + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: luacheck + run: | + cmake -B build -G Ninja + cmake --build build --target lintlua-luacheck + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: lintsh + run: cmake --build build --target lintsh + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: clint.py + run: cmake --build build --target lintc-clint + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + run: cmake --build build --target clang-tidy + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: uncrustify + run: | + ${{ env.CACHE_UNCRUSTIFY }} -c ./src/uncrustify.cfg -q --replace --no-backup $(find ./src/nvim -name "*.[ch]") + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: suggester / uncrustify + uses: reviewdog/action-suggester@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + tool_name: uncrustify + cleanup: false + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: check uncrustify + run: git diff --color --exit-code + + posix: + name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) + strategy: + fail-fast: false + matrix: + include: + - flavor: asan + cc: clang + runner: ubuntu-22.04 + flags: -D CLANG_ASAN_UBSAN=ON + - flavor: tsan + cc: clang + runner: ubuntu-22.04 + flags: -D CLANG_TSAN=ON + - flavor: uchar + cc: gcc + runner: ubuntu-22.04 + flags: -D UNSIGNED_CHAR=ON + - flavor: release + cc: gcc + runner: ubuntu-22.04 + flags: -D CMAKE_BUILD_TYPE=Release + - cc: clang + runner: macos-12 + + # functionaltest-lua is our dumping ground for non-mainline configurations. + # 1. Check that the tests pass with PUC Lua instead of LuaJIT. + # 2. No treesitter parsers installed. + - flavor: functionaltest-lua + cc: gcc + runner: ubuntu-22.04 + deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON + flags: -D PREFER_LUA=ON + runs-on: ${{ matrix.runner }} + timeout-minutes: 45 + env: + CC: ${{ matrix.cc }} + steps: + - uses: actions/checkout@v3 + + - name: Set up environment + run: | + ulimit -c unlimited + echo "$BIN_DIR" >> $GITHUB_PATH + + - name: Create log dir + run: mkdir -p "$LOG_DIR" + + - name: Install dependencies + run: ./.github/scripts/install_deps.sh cpanminus + + - name: Setup interpreter packages + run: | + # Use default CC to avoid compilation problems when installing Python modules. + echo "Install neovim module for Python." + CC=cc python3 -m pip -q install --user --upgrade pynvim + + echo "Install neovim RubyGem." + gem install --no-document --bindir "$BIN_DIR" --user-install --pre neovim + + echo "Install neovim npm package" + npm install -g neovim + npm link neovim + + if [[ $RUNNER_OS != macOS ]]; then + sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log" + perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' + fi + + - run: echo "DEPS_BUILD_DIR=$HOME/nvim-deps" >> $GITHUB_ENV + + - uses: ./.github/actions/cache + + - name: Build third-party deps + run: | + cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja ${{ matrix.deps_flags }} + cmake --build $DEPS_BUILD_DIR + + - name: Build + run: | + cmake -B build -G Ninja -D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} + cmake --build build + + - if: "!cancelled()" + name: Determine if run should be aborted + id: abort_job + run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT + + - if: matrix.flavor != 'tsan' && matrix.flavor != 'release' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') + name: Unittest + timeout-minutes: 5 + run: cmake --build build --target unittest + + - if: matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') + name: Functionaltest + timeout-minutes: 20 + run: cmake --build build --target functionaltest + + - if: matrix.flavor == 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') + name: Functionaltest with PUC Lua + timeout-minutes: 20 + run: cmake --build build --target functionaltest-lua + + - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success') + name: Oldtest + run: make oldtest + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Install + run: cmake --install build + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Installtests + run: | + "$INSTALL_PREFIX/bin/nvim" --version + if ! "$INSTALL_PREFIX/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then + echo "Running ':help' in the installed nvim failed." + echo "Maybe the helptags have not been generated properly." + echo 'Failed running :help' + exit 1 + fi + + # Check that all runtime files were installed + for file in $(git -C runtime ls-files '*.vim' '*.ps' '*.dict' '*.py' '*.tutor'); do + if ! test -e "$INSTALL_PREFIX/share/nvim/runtime/$file"; then + printf "%s%s" 'It appears that %s is not installed.' "$file" + exit 1 + fi + done + + # Check that some runtime files are installed and are executables + for file in $(git -C runtime ls-files '*.awk' '*.sh' '*.bat'); do + if ! test -x "$INSTALL_PREFIX/share/nvim/runtime/$file"; then + printf "%s%s" 'It appears that %s is not installed or is not executable.' "$file" + exit 1 + fi + done + + # Check that generated syntax file has function names, #5060. + genvimsynf=syntax/vim/generated.vim + gpat='syn keyword vimFuncName .*eval' + if ! grep -q "$gpat" "$INSTALL_PREFIX/share/nvim/runtime/$genvimsynf"; then + echo "It appears that $genvimsynf does not contain $gpat." + exit 1 + fi + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Show logs + run: cat $(find "$LOG_DIR" -type f) + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Show core dumps + run: | + # TODO(dundargoc): app should be luajit for unittests + app="build/bin/nvim" + if test "$RUNNER_OS" = macOS; then + cores="$(find /cores/ -type f -print)" + else + cores="$(find ./ -type f \( -name 'core.*' -o -name core -o -name nvim.core \) -print)" + fi + + if test -z "$cores"; then + exit 0 + fi + for core in $cores; do + if test "$RUNNER_OS" = macOS; then + lldb -Q -o "bt all" -f "$app" -c "$core" + else + gdb -n -batch -ex 'thread apply all bt full' "$app" -c "$core" + fi + done + echo 'Core dumps found' + exit 1 + + windows: + runs-on: windows-2019 + timeout-minutes: 45 + name: windows + steps: + - uses: actions/checkout@v3 + + - uses: ./.github/actions/cache + + - name: Set env + run: | + $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { + & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { + $name, $value = $_ -split '=', 2 + "$name=$value" >> $env:GITHUB_ENV + } + } + + - name: Build deps + run: | + cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' + cmake --build $env:DEPS_BUILD_DIR + + - name: Build + run: | + cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON + cmake --build build + + - name: Install test deps + run: | + $PSNativeCommandArgumentPassing = 'Legacy' + + & build\bin\nvim.exe "--version" + + # Ensure that the "win32" feature is set. + & build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' + + python -m pip install pynvim + # Sanity check + python -c "import pynvim; print(str(pynvim))" + + gem.cmd install --pre neovim + Get-Command -CommandType Application neovim-ruby-host.bat + + node --version + npm.cmd --version + + npm.cmd install -g neovim + Get-Command -CommandType Application neovim-node-host.cmd + npm.cmd link neovim + + - if: "!cancelled()" + name: Determine if run should be aborted + id: abort_job + run: | + "status=${{ job.status }}" >> $env:GITHUB_OUTPUT + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Run functionaltest + timeout-minutes: 20 + run: cmake --build build --target functionaltest + + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: Run oldtest + run: | + # Add MSYS to path, required for e.g. `find` used in test scripts. + # But would break functionaltest, where its `more` would be used then. + $OldPath = $env:PATH + $env:PATH = "C:\msys64\usr\bin;$env:PATH" + & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path src\nvim\testdir) VERBOSE=1 + $env:PATH = $OldPath diff --git a/.github/workflows/universal_macos.yml b/.github/workflows/universal_macos.yml deleted file mode 100644 index 765cea63c1..0000000000 --- a/.github/workflows/universal_macos.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: macos-universal -on: - pull_request: - branches: - - 'master' - - 'release-[0-9]+.[0-9]+' - paths: - - '**.cmake' - - '**/CMakeLists.txt' - - '**/CMakePresets.json' - - 'cmake.*/**' - - '.github/scripts/build_universal_macos.sh' - - '.github/workflow/universal_macos.yml' - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} - cancel-in-progress: true - -jobs: - macos-universal: - runs-on: macos-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh - - - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV - - - name: Build universal binary - run: ./.github/scripts/build_universal_macos.sh -- cgit From 6ed5a9ab8c1908e49565acabe94121e79139a050 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 18 Feb 2023 16:54:19 +0100 Subject: build: test multi-config generator (#22310) Multi-config generators can be tricky so testing them would be good. Also test GCC release and MinSizeRel build types as they're prone to unusual warnings. Remove release testing from test.yml as this is a sufficient replacement. --- .github/workflows/build.yml | 23 ++++++++++++++++++++++- .github/workflows/test.yml | 6 +----- 2 files changed, 23 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43e91d9ed4..6b9c63b2d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true - env: BIN_DIR: ${{ github.workspace }}/bin INSTALL_PREFIX: ${{ github.workspace }}/nvim-install @@ -116,3 +115,25 @@ jobs: cmake -B build -G Ninja cmake --build build + multi-config: + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: ./.github/scripts/install_deps.sh + + - name: Build third-party deps + run: | + cmake -S cmake.deps -B .deps -G "Ninja Multi-Config" + cmake --build .deps + + - name: Configure + run: cmake -B build -G Ninja -D CMAKE_C_COMPILER=gcc + + - name: Release + run: cmake --build build --config Release + + - name: MinSizeRel + run: cmake --build build --config MinSizeRel diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfe6a22390..d9fdeaec9b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -140,10 +140,6 @@ jobs: cc: gcc runner: ubuntu-22.04 flags: -D UNSIGNED_CHAR=ON - - flavor: release - cc: gcc - runner: ubuntu-22.04 - flags: -D CMAKE_BUILD_TYPE=Release - cc: clang runner: macos-12 @@ -210,7 +206,7 @@ jobs: id: abort_job run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT - - if: matrix.flavor != 'tsan' && matrix.flavor != 'release' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') + - if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') name: Unittest timeout-minutes: 5 run: cmake --build build --target unittest -- cgit From 9301abdf748b54fa3d41375cc4659ca9f4b57dd8 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 18 Feb 2023 17:43:39 +0100 Subject: ci: enable CI_BUILD automatically if environment variable CI is true (#22312) Having to specify CI_BUILD for every CI job requires boilerplate. More importantly, it's easy to forget to enable CI_BUILD, as seen by 8a20f9f98a90a7a43aea08fcde2c40a5356b4f7b. It's simpler to remember to turn CI_BUILD off when a job errors instead of remembering that every new job should have CI_BUILD on. --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 12 +++++++----- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b9c63b2d8..23ced47c6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,7 @@ jobs: run: make deps - name: Build - run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX" + run: make CMAKE_FLAGS="-D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX" - name: Install run: make install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee2845dd17..4447beab2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: - name: Build release id: build run: | - CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=" + CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCI_BUILD=OFF -DCMAKE_INSTALL_PREFIX:PATH=" printf 'version<> $GITHUB_OUTPUT ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT printf 'END\n' >> $GITHUB_OUTPUT @@ -127,7 +127,7 @@ jobs: cmake --build .deps - name: build package run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=OFF cmake --build build --target package - uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9fdeaec9b..3bd982477a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,11 +88,13 @@ jobs: version: latest args: --check runtime/ + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: configure + run: cmake -B build -G Ninja -D CI_BUILD=OFF + - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: luacheck - run: | - cmake -B build -G Ninja - cmake --build build --target lintlua-luacheck + run: cmake --build build --target lintlua-luacheck - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: lintsh @@ -198,7 +200,7 @@ jobs: - name: Build run: | - cmake -B build -G Ninja -D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} + cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} cmake --build build - if: "!cancelled()" @@ -318,7 +320,7 @@ jobs: - name: Build run: | - cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON + cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' cmake --build build - name: Install test deps -- cgit From b62c0c8d9c22ae7fc9ee200733f8312efa6dbced Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 20 Feb 2023 08:12:59 +0100 Subject: docs: fix typos (#21961) Co-authored-by: Ben Morgan --- .github/workflows/api-docs.yml | 2 +- .github/workflows/vim-patches.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index fa8a7dbca0..af0397c7cb 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -44,7 +44,7 @@ jobs: sudo apt-get update sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack - - name: Setup git config + - name: Set up git config run: | git config --global user.name 'marvim' git config --global user.email 'marvim@users.noreply.github.com' diff --git a/.github/workflows/vim-patches.yml b/.github/workflows/vim-patches.yml index 305f8019f1..60a5775497 100644 --- a/.github/workflows/vim-patches.yml +++ b/.github/workflows/vim-patches.yml @@ -34,7 +34,7 @@ jobs: mv nvim.appimage $HOME/.local/bin/nvim printf '%s\n' "$HOME/.local/bin" >> $GITHUB_PATH - - name: Setup git config + - name: Set up git config run: | git config --global user.name 'marvim' git config --global user.email 'marvim@users.noreply.github.com' -- cgit From 3264cb294ebb74e7f37cd5c6f10c4beefdecc394 Mon Sep 17 00:00:00 2001 From: Vedant <83997633+vedantmgoyal2009@users.noreply.github.com> Date: Tue, 21 Feb 2023 01:53:08 +0530 Subject: fix(ci/release/winget): bump action version --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4447beab2e..b3a32600dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -223,7 +223,7 @@ jobs: steps: - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') name: Publish stable - uses: vedantmgoyal2009/winget-releaser@v1 + uses: vedantmgoyal2009/winget-releaser@v2 with: identifier: Neovim.Neovim release-tag: ${{ github.event.inputs.tag_name || github.ref_name }} @@ -238,7 +238,7 @@ jobs: "version=$VERSION" >> $env:GITHUB_OUTPUT - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') name: Publish nightly - uses: vedantmgoyal2009/winget-releaser@v1 + uses: vedantmgoyal2009/winget-releaser@v2 with: identifier: Neovim.Neovim.Nightly version: ${{ steps.get-version.outputs.version }} -- cgit From f0ee548137263a67e3d163b674f48e6e004210fb Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 21 Feb 2023 07:43:17 +0100 Subject: ci(backport): bump zeebe-io/backport-action from 0 to 1 (#22348) Notable changes are performance increases for fetching repositories and simpler workflow file. --- .github/workflows/backport.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 019fb20689..414fe1f1d6 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -17,11 +17,6 @@ jobs: steps: - uses: actions/checkout@v3 with: - # required to find all branches - fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - name: Create backport PRs - uses: zeebe-io/backport-action@v0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - github_workspace: ${{ github.workspace }} + uses: korthout/backport-action@v1 -- cgit From d18f8d5c2d82b209093b2feaa8921a4792b71d59 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:01:49 +0100 Subject: ci: use multi-config generator on the multi-config test (#22352) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23ced47c6d..ef0a17ce1d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: cmake --build .deps - name: Configure - run: cmake -B build -G Ninja -D CMAKE_C_COMPILER=gcc + run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc - name: Release run: cmake --build build --config Release -- cgit From 521034edef342f440f3e4bfc759159acc55d3cef Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 27 Feb 2023 22:47:34 +0100 Subject: ci: build all build types on each PR (#22441) Building with Release and RelWithDebInfo build types only on build system changes is too optimistic, as shown by https://github.com/neovim/neovim/pull/22436 and 659234c95a23307486a4b7496f3f4391a4bdbe58. --- .github/workflows/build.yml | 23 ----------------------- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 23 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef0a17ce1d..10e3e2bdeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,26 +114,3 @@ jobs: run: | cmake -B build -G Ninja cmake --build build - - multi-config: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh - - - name: Build third-party deps - run: | - cmake -S cmake.deps -B .deps -G "Ninja Multi-Config" - cmake --build .deps - - - name: Configure - run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc - - - name: Release - run: cmake --build build --config Release - - - name: MinSizeRel - run: cmake --build build --config MinSizeRel diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3bd982477a..c6b8291458 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -294,6 +294,34 @@ jobs: echo 'Core dumps found' exit 1 + build-types: + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: ./.github/scripts/install_deps.sh + + - uses: ./.github/actions/cache + + - name: Build third-party deps + run: | + cmake -S cmake.deps -B $DEPS_BUILD_DIR -G "Ninja Multi-Config" + cmake --build $DEPS_BUILD_DIR + + - name: Configure + run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc + + - name: Release + run: cmake --build build --config Release + + - name: RelWithDebInfo + run: cmake --build build --config RelWithDebInfo + + - name: MinSizeRel + run: cmake --build build --config MinSizeRel + windows: runs-on: windows-2019 timeout-minutes: 45 -- cgit From 3683d6b7a85c97d067c18fc283bf1c490087a8a9 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 4 Mar 2023 17:55:42 +0100 Subject: ci: move configuring cmake to the build part of the CI If the configuration fails then lints shouldn't be run, as most lint steps depends on a successful configuration. --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c6b8291458..a702bce71f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,6 +75,10 @@ jobs: cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja cmake --build $DEPS_BUILD_DIR + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: configure + run: cmake -B build -G Ninja -D CI_BUILD=OFF + - if: "!cancelled()" name: Determine if run should be aborted id: abort_job @@ -88,10 +92,6 @@ jobs: version: latest args: --check runtime/ - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: configure - run: cmake -B build -G Ninja -D CI_BUILD=OFF - - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: luacheck run: cmake --build build --target lintlua-luacheck -- cgit From 98876db1559c99109dc37812adb5ebccb25d9499 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 2 Mar 2023 23:15:26 +0100 Subject: ci: use the same deps directory location for all jobs Having separate directory location causes failures to be inconsistent and ultimately confusing. A common problem is a file with a particular name is searched for the entire repository, which gives different results if the dependency directory is inside the neovim directory or outside of it. --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a702bce71f..8503eb6620 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -189,8 +189,6 @@ jobs: perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' fi - - run: echo "DEPS_BUILD_DIR=$HOME/nvim-deps" >> $GITHUB_ENV - - uses: ./.github/actions/cache - name: Build third-party deps -- cgit From d877aa32f289a71062941eacab5f8950936d3089 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 5 Mar 2023 14:46:17 +0100 Subject: ci: remove core dump checking from test.yml There is already a superior core dump check in test/helpers.lua, which makes this obsolete. --- .github/workflows/test.yml | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8503eb6620..16bbca7050 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -268,30 +268,6 @@ jobs: name: Show logs run: cat $(find "$LOG_DIR" -type f) - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Show core dumps - run: | - # TODO(dundargoc): app should be luajit for unittests - app="build/bin/nvim" - if test "$RUNNER_OS" = macOS; then - cores="$(find /cores/ -type f -print)" - else - cores="$(find ./ -type f \( -name 'core.*' -o -name core -o -name nvim.core \) -print)" - fi - - if test -z "$cores"; then - exit 0 - fi - for core in $cores; do - if test "$RUNNER_OS" = macOS; then - lldb -Q -o "bt all" -f "$app" -c "$core" - else - gdb -n -batch -ex 'thread apply all bt full' "$app" -c "$core" - fi - done - echo 'Core dumps found' - exit 1 - build-types: runs-on: ubuntu-22.04 timeout-minutes: 10 -- cgit From af23d173883f47fd02a9a380c719e4428370b484 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Mar 2023 04:13:04 +0100 Subject: test: move oldtests to test directory (#22536) The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16bbca7050..e6c134b583 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -366,5 +366,5 @@ jobs: # But would break functionaltest, where its `more` would be used then. $OldPath = $env:PATH $env:PATH = "C:\msys64\usr\bin;$env:PATH" - & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path src\nvim\testdir) VERBOSE=1 + & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path test\old\testdir) VERBOSE=1 $env:PATH = $OldPath -- cgit From 30632dd21ab243bb2c4eb115819a32fdfd9155dc Mon Sep 17 00:00:00 2001 From: bfredl Date: Tue, 7 Mar 2023 15:00:51 +0100 Subject: refactor(build): make installation of runtime/ more effective Currently files to install in runtime/ is detected by recursive glob pattern which has two problems: - cmake needs to do a of work at config time and build/runtime/cmake_install.cmake becomes HUGE (2.5MB, biggest config file) - we need to explicitly specify each file suffix used in the entire runtime, which is duplication of information. These globs specify every single file in a subdirectory. Thus, we can just install every runtime/ subdirectory as a single install command. Furthermore, at the top-level, only .vim and .lua files need to be installed. Further possible refactor: we could move files which does not belong in $PREFIX/runtime out of $REPO/runtime. Then runtime could be installed with a single install_helper(DIRECTORY ...) command. --- .github/workflows/test.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6c134b583..22be9bf719 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -241,17 +241,9 @@ jobs: fi # Check that all runtime files were installed - for file in $(git -C runtime ls-files '*.vim' '*.ps' '*.dict' '*.py' '*.tutor'); do + for file in $(git -C runtime ls-files '*.vim' '*.ps' '*.dict' '*.py' '*.tutor' '*.awk' '*.sh' '*.bat'); do if ! test -e "$INSTALL_PREFIX/share/nvim/runtime/$file"; then - printf "%s%s" 'It appears that %s is not installed.' "$file" - exit 1 - fi - done - - # Check that some runtime files are installed and are executables - for file in $(git -C runtime ls-files '*.awk' '*.sh' '*.bat'); do - if ! test -x "$INSTALL_PREFIX/share/nvim/runtime/$file"; then - printf "%s%s" 'It appears that %s is not installed or is not executable.' "$file" + printf "It appears that %s is not installed." "$file" exit 1 fi done -- cgit From 898f902e0051de0347394cfef0af23fe1013c84b Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 8 Mar 2023 18:18:03 +0100 Subject: ci(news): don't run on draft (#22574) --- .github/workflows/news.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml index 11807e9b42..c715bf1031 100644 --- a/.github/workflows/news.yml +++ b/.github/workflows/news.yml @@ -1,11 +1,13 @@ name: "news.txt check" on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - 'master' jobs: check: runs-on: ubuntu-latest + if: github.event.pull_request.draft == false steps: - uses: actions/checkout@v3 with: -- cgit From 6cd7b5eeef6728a66b73865f39e29688920a5960 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 9 Mar 2023 12:27:20 +0100 Subject: ci: remove environment variable DEPS_BUILD_DIR from CI If one uses .deps when DEPS_BUILD_DIR is defined in another location it leads to very surprising behaviors, as it looks for libraries in other places other than .deps. --- .github/workflows/test.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22be9bf719..a43c84d6bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,6 @@ env: ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0 BIN_DIR: ${{ github.workspace }}/bin BUILD_DIR: ${{ github.workspace }}/build - DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps INSTALL_PREFIX: ${{ github.workspace }}/nvim-install LOG_DIR: ${{ github.workspace }}/build/log NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog @@ -72,8 +71,8 @@ jobs: - name: Build third-party deps run: | - cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja - cmake --build $DEPS_BUILD_DIR + cmake -S cmake.deps -B .deps -G Ninja + cmake --build .deps - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: configure @@ -193,8 +192,8 @@ jobs: - name: Build third-party deps run: | - cmake -S cmake.deps -B $DEPS_BUILD_DIR -G Ninja ${{ matrix.deps_flags }} - cmake --build $DEPS_BUILD_DIR + cmake -S cmake.deps -B .deps -G Ninja ${{ matrix.deps_flags }} + cmake --build .deps - name: Build run: | @@ -273,8 +272,8 @@ jobs: - name: Build third-party deps run: | - cmake -S cmake.deps -B $DEPS_BUILD_DIR -G "Ninja Multi-Config" - cmake --build $DEPS_BUILD_DIR + cmake -S cmake.deps -B .deps -G "Ninja Multi-Config" + cmake --build .deps - name: Configure run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc @@ -309,8 +308,8 @@ jobs: - name: Build deps run: | - cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' - cmake --build $env:DEPS_BUILD_DIR + cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' + cmake --build .deps - name: Build run: | -- cgit From 5aaed9cbfccec009ac91f6a576d72584a061d63c Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 9 Mar 2023 12:27:30 +0100 Subject: ci: test build with external dependencies on every pull request Only testing the build with external dependencies on build system changes is too naive, as demonstrated by b9f19d3e286d95d9209afbc479fa2eb908067fb1. --- .github/workflows/build.yml | 43 ------------------------------------------- .github/workflows/test.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 43 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10e3e2bdeb..fa1f74e4d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,46 +71,3 @@ jobs: - name: Install run: make install - - with-external-deps: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - sudo add-apt-repository ppa:neovim-ppa/stable - ./.github/scripts/install_deps.sh - sudo apt-get install -y \ - libluajit-5.1-dev \ - libmsgpack-dev \ - libtermkey-dev \ - libtree-sitter-dev \ - libunibilium-dev \ - libuv1-dev \ - lua-busted \ - lua-filesystem \ - lua-inspect \ - lua-lpeg \ - lua-nvim \ - luajit - # libvterm-dev \ - # lua-luv-dev - - # Remove comments from packages once we start using these external - # dependencies. - - - name: Build third-party deps - run: | - # Ideally all dependencies should external for this job, but some - # dependencies don't have the required version available. We use the - # bundled versions for these with the hopes of being able to remove them - # later on. - cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED=OFF -D USE_BUNDLED_LUV=ON -D USE_BUNDLED_LIBVTERM=ON - cmake --build .deps - - - name: Build - run: | - cmake -B build -G Ninja - cmake --build build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a43c84d6bf..69da867012 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -359,3 +359,48 @@ jobs: $env:PATH = "C:\msys64\usr\bin;$env:PATH" & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path test\old\testdir) VERBOSE=1 $env:PATH = $OldPath + + with-external-deps: + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo add-apt-repository ppa:neovim-ppa/stable + ./.github/scripts/install_deps.sh + sudo apt-get install -y \ + libluajit-5.1-dev \ + libmsgpack-dev \ + libtermkey-dev \ + libtree-sitter-dev \ + libunibilium-dev \ + libuv1-dev \ + lua-busted \ + lua-filesystem \ + lua-inspect \ + lua-lpeg \ + lua-nvim \ + luajit + # libvterm-dev \ + # lua-luv-dev + + # Remove comments from packages once we start using these external + # dependencies. + + - uses: ./.github/actions/cache + + - name: Build third-party deps + run: | + # Ideally all dependencies should external for this job, but some + # dependencies don't have the required version available. We use the + # bundled versions for these with the hopes of being able to remove them + # later on. + cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED=OFF -D USE_BUNDLED_LUV=ON -D USE_BUNDLED_LIBVTERM=ON + cmake --build .deps + + - name: Build + run: | + cmake -B build -G Ninja + cmake --build build -- cgit From 1a71e5c3623c890e25f331a7404792f714c90417 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 9 Mar 2023 11:41:54 +0100 Subject: ci: don't install unused packages The lua client is no longer needed after d6279f9392073cb1422d76c57baf3fd283ed954e. One of its dependencies, mpack, is still needed however. Remove lua-nvim and replace it with lua-mpack. The other packages are most likely not needed as we no longer run tests for external dependencies. --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69da867012..2f2ace522b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -377,11 +377,9 @@ jobs: libtree-sitter-dev \ libunibilium-dev \ libuv1-dev \ - lua-busted \ lua-filesystem \ - lua-inspect \ lua-lpeg \ - lua-nvim \ + lua-mpack \ luajit # libvterm-dev \ # lua-luv-dev -- cgit From a1edbd3564b40cc2a07963d0efaa85b8ab32ca16 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Mar 2023 09:41:58 +0100 Subject: ci: skip ruby provider tests on Windows Installing the ruby provider takes anything between 1 and 1.5 minutes on Windows, which is a big drain on our CI. Remove it until we find a more sustainable solution. --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f2ace522b..e6ff09d351 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -329,9 +329,6 @@ jobs: # Sanity check python -c "import pynvim; print(str(pynvim))" - gem.cmd install --pre neovim - Get-Command -CommandType Application neovim-ruby-host.bat - node --version npm.cmd --version -- cgit From 9d574f8dd7248a4cf8dcbe615f3058d34efb7ac3 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Mar 2023 22:56:16 +0100 Subject: ci: bump to windows 2022 Skip failing funcitonaltests. Use jobstart() instead termopen() for oldtests to prevent CI freezing. --- .github/workflows/test.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6ff09d351..5e6f05d973 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -288,7 +288,7 @@ jobs: run: cmake --build build --config MinSizeRel windows: - runs-on: windows-2019 + runs-on: windows-2022 timeout-minutes: 45 name: windows steps: @@ -347,15 +347,20 @@ jobs: timeout-minutes: 20 run: cmake --build build --target functionaltest + - if: success() || failure() && steps.abort_job.outputs.status == 'success' + uses: msys2/setup-msys2@v2 + with: + update: true + pacboy: >- + make:p gcc:p + release: false + - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Run oldtest + shell: msys2 {0} run: | - # Add MSYS to path, required for e.g. `find` used in test scripts. - # But would break functionaltest, where its `more` would be used then. - $OldPath = $env:PATH - $env:PATH = "C:\msys64\usr\bin;$env:PATH" - & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path test\old\testdir) VERBOSE=1 - $env:PATH = $OldPath + cd test/old/testdir + mingw32-make VERBOSE=1 with-external-deps: runs-on: ubuntu-22.04 -- cgit From 17ce634b8f44e218270ee472599edf4cf3ba0fac Mon Sep 17 00:00:00 2001 From: ii14 Date: Thu, 16 Mar 2023 19:24:04 +0100 Subject: build!: rename sanitizer options from CLANG_* to ENABLE_* --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e6f05d973..0d18f874c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -132,11 +132,11 @@ jobs: - flavor: asan cc: clang runner: ubuntu-22.04 - flags: -D CLANG_ASAN_UBSAN=ON + flags: -D ENABLE_ASAN_UBSAN=ON - flavor: tsan cc: clang runner: ubuntu-22.04 - flags: -D CLANG_TSAN=ON + flags: -D ENABLE_TSAN=ON - flavor: uchar cc: gcc runner: ubuntu-22.04 -- cgit From b2253cd000b2eaf1e7df298ced2e65c40c30e780 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 23:32:45 +0700 Subject: build(deps): bump actions/stale from 7 to 8 Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v7...v8) --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index c1d3ee3ff3..74661e686e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@v7 + - uses: actions/stale@v8 with: days-before-close: 30 days-before-stale: -1 -- cgit From 090ade4af6344a7bc4ee56a8052c0739c0428c04 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 4 Apr 2023 12:58:16 +0100 Subject: refactor(treesitter): delegate region calculation to treesitter (#22576) --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d18f874c4..7794e07077 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -376,13 +376,13 @@ jobs: libluajit-5.1-dev \ libmsgpack-dev \ libtermkey-dev \ - libtree-sitter-dev \ libunibilium-dev \ libuv1-dev \ lua-filesystem \ lua-lpeg \ lua-mpack \ luajit + # libtree-sitter-dev \ # libvterm-dev \ # lua-luv-dev @@ -397,7 +397,10 @@ jobs: # dependencies don't have the required version available. We use the # bundled versions for these with the hopes of being able to remove them # later on. - cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED=OFF -D USE_BUNDLED_LUV=ON -D USE_BUNDLED_LIBVTERM=ON + cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED=OFF \ + -D USE_BUNDLED_LUV=ON \ + -D USE_BUNDLED_LIBVTERM=ON \ + -D USE_BUNDLED_TS=ON cmake --build .deps - name: Build -- cgit From 9d5cbd1b15e9e4da50a7295f6d104fcdbe477f88 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 5 Apr 2023 09:22:29 +0200 Subject: ci!: remove the .deb release (#22773) Having multiple release artifacts per platform is a maintenance burden. Furthermore, it is a maintenance burden that doesn't directly improve the Nvim editor itself. The releases are meant to be a quick way for users to try out and use neovim on their platform and was never intended to be a buffet of releases for every conceivable setup. Users are encouraged to the following replacements: - Github action `action-setup-vim` to have neovim installed on their PATH for their CI jobs. See https://github.com/rhysd/action-setup-vim. - Use the appimage, either as is or by extracting it - To use as is, run `chmod u+x nvim.appimage && ./nvim.appimage` - If your system does not have FUSE you can extract the appimage with `./nvim.appimage --appimage-extract && ./squashfs-root/usr/bin/nvim` - Build it manually. See https://github.com/neovim/neovim/wiki/Building-Neovim. Work on https://github.com/neovim/neovim/issues/22684 --- .github/workflows/notes.md | 7 ------- .github/workflows/release.yml | 3 --- 2 files changed, 10 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index d752f10609..0f8c67da48 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -33,12 +33,6 @@ ${NVIM_VERSION} 2. Extract: `tar xzvf nvim-linux64.tar.gz` 3. Run `./nvim-linux64/bin/nvim` -#### Debian Package - -1. Download **nvim-linux64.deb** -2. Install the package using `sudo apt install ./nvim-linux64.deb` -3. Run `nvim` - #### AppImage 1. Download **nvim.appimage** 2. Run `chmod u+x nvim.appimage && ./nvim.appimage` @@ -56,7 +50,6 @@ ${NVIM_VERSION} ``` ${SHA_LINUX_64_TAR} -${SHA_LINUX_64_DEB} ${SHA_APP_IMAGE} ${SHA_APP_IMAGE_ZSYNC} ${SHA_MACOS} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3a32600dd..17737dcb36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,6 @@ jobs: name: nvim-linux64 path: | build/nvim-linux64.tar.gz - build/nvim-linux64.deb retention-days: 1 appimage: @@ -182,8 +181,6 @@ jobs: cd ./nvim-linux64 sha256sum nvim-linux64.tar.gz > nvim-linux64.tar.gz.sha256sum echo "SHA_LINUX_64_TAR=$(cat nvim-linux64.tar.gz.sha256sum)" >> $GITHUB_ENV - sha256sum nvim-linux64.deb > nvim-linux64.deb.sha256sum - echo "SHA_LINUX_64_DEB=$(cat nvim-linux64.deb.sha256sum)" >> $GITHUB_ENV - name: Generate App Image SHA256 checksums run: | cd ./appimage -- cgit From fbee2e4d9c627889abd597f2383cf77f96c3d825 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 6 Apr 2023 11:09:33 +0200 Subject: ci(release): promote appimage over tar.gz (#22908) --- .github/workflows/notes.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 0f8c67da48..2b34c72ffa 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -27,12 +27,6 @@ ${NVIM_VERSION} ### Linux (x64) -#### Tarball - -1. Download **nvim-linux64.tar.gz** -2. Extract: `tar xzvf nvim-linux64.tar.gz` -3. Run `./nvim-linux64/bin/nvim` - #### AppImage 1. Download **nvim.appimage** 2. Run `chmod u+x nvim.appimage && ./nvim.appimage` @@ -42,6 +36,14 @@ ${NVIM_VERSION} ./squashfs-root/usr/bin/nvim ``` +#### Tarball + +*(deprecated)* + +1. Download **nvim-linux64.tar.gz** +2. Extract: `tar xzvf nvim-linux64.tar.gz` +3. Run `./nvim-linux64/bin/nvim` + ### Other - Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim) -- cgit From d4398f40214fb6175e2bff4c5823e0e6ca13fbda Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:31:04 +0200 Subject: ci: don't automatically enable -Werror on CI environments This catches downstream consumers of neovim off guard when using neovim in an esoteric environment not tested in our own CI. Closes https://github.com/neovim/neovim/issues/22932 --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa1f74e4d1..be0f2f812c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,7 @@ jobs: run: make deps - name: Build - run: make CMAKE_FLAGS="-D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX" + run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX" - name: Install run: make install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17737dcb36..219ad0288f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: - name: Build release id: build run: | - CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCI_BUILD=OFF -DCMAKE_INSTALL_PREFIX:PATH=" + CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=" printf 'version<> $GITHUB_OUTPUT ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT printf 'END\n' >> $GITHUB_OUTPUT @@ -126,7 +126,7 @@ jobs: cmake --build .deps - name: build package run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=OFF + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' cmake --build build --target package - uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7794e07077..86561e468b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,7 +76,7 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: configure - run: cmake -B build -G Ninja -D CI_BUILD=OFF + run: cmake -B build -G Ninja - if: "!cancelled()" name: Determine if run should be aborted @@ -197,7 +197,7 @@ jobs: - name: Build run: | - cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} + cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} -D CI_BUILD=ON cmake --build build - if: "!cancelled()" @@ -276,7 +276,7 @@ jobs: cmake --build .deps - name: Configure - run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc + run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc -D CI_BUILD=ON - name: Release run: cmake --build build --config Release @@ -313,7 +313,7 @@ jobs: - name: Build run: | - cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' + cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON cmake --build build - name: Install test deps @@ -405,5 +405,5 @@ jobs: - name: Build run: | - cmake -B build -G Ninja + cmake -B build -G Ninja -D CI_BUILD=ON cmake --build build -- cgit From 5d01d2338943ef535fdb40c9639269208e720d74 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 8 Apr 2023 13:14:13 +0200 Subject: ci: simplify backport workflow --- .github/workflows/backport.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 414fe1f1d6..020cbd51bd 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -8,15 +8,9 @@ jobs: contents: write pull-requests: write name: Backport Pull Request - if: > - github.repository_owner == 'neovim' && ( - github.event_name == 'pull_request_target' && - github.event.pull_request.merged - ) + if: github.event.pull_request.merged runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - name: Create backport PRs uses: korthout/backport-action@v1 -- cgit From 5d387c338828d176f335f2a9cec8882ecc4ba954 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 10 Apr 2023 02:31:13 +0800 Subject: build(ci): ensure correct headers are used on macOS Currently, the release build picks up headers in `/Library/Frameworks/Mono.framework/Headers`. You can verify this by downloading the latest nightly build and checking the output of `nvim --version`. These headers are likely to be from a different version of `libintl` than the one we link to. Let's avoid usage of them by setting `CMAKE_FIND_FRAMEWORK` to `NEVER`. --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 86561e468b..8215a79b35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -143,6 +143,8 @@ jobs: flags: -D UNSIGNED_CHAR=ON - cc: clang runner: macos-12 + flags: -D CMAKE_FIND_FRAMEWORK=NEVER + deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER # functionaltest-lua is our dumping ground for non-mainline configurations. # 1. Check that the tests pass with PUC Lua instead of LuaJIT. -- cgit From 58433285b964beb66317877d492fdf5ad113426b Mon Sep 17 00:00:00 2001 From: Vedant <83997633+vedantmgoyal2009@users.noreply.github.com> Date: Mon, 10 Apr 2023 17:20:39 +0530 Subject: ci(release/winget): get msi from previous job instead of downloading --- .github/workflows/release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 219ad0288f..c6d0c39402 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -225,13 +225,15 @@ jobs: identifier: Neovim.Neovim release-tag: ${{ github.event.inputs.tag_name || github.ref_name }} token: ${{ secrets.WINGET_TOKEN }} + - name: Fetch nightly build msi from previous job + if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') + uses: actions/download-artifact@v3 - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') - name: Get nightly version + name: Get version from nightly build msi id: get-version run: | - Invoke-WebRequest https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.msi -OutFile setup.msi Install-Module -Name 'Carbon.Windows.Installer' -Force - $VERSION = (Get-CMsi (Resolve-Path .\setup.msi).Path).ProductVersion + $VERSION = (Get-CMsi (Resolve-Path .\nvim-win64\nvim-win64.msi).Path).ProductVersion "version=$VERSION" >> $env:GITHUB_OUTPUT - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') name: Publish nightly -- cgit From 55d346fc2683a18256320eaae75eb4f3137dcced Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 16 Apr 2023 14:16:19 +0200 Subject: ci: remove unnecessary token usage --- .github/workflows/labeler.yml | 2 -- .github/workflows/lintcommit.yml | 2 -- 2 files changed, 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 60689029a3..7646bfa6eb 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -12,7 +12,6 @@ jobs: steps: - uses: actions/labeler@v4 with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: "" type-scope: @@ -21,7 +20,6 @@ jobs: contents: write pull-requests: write env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} PR_TITLE: ${{ github.event.pull_request.title }} diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index afedbe0b12..77c75fbd76 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -8,8 +8,6 @@ jobs: lint-commits: runs-on: ubuntu-latest if: github.event.pull_request.draft == false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v3 with: -- cgit From b98d195c550ca60d34c0c64dd67bbc1cc233bb71 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 17 Apr 2023 19:11:29 +0800 Subject: ci(labeler): add back GitHub token for type-scope It is required by `gh pr edit`. --- .github/workflows/labeler.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 7646bfa6eb..bf1d148be7 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -20,6 +20,7 @@ jobs: contents: write pull-requests: write env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} PR_TITLE: ${{ github.event.pull_request.title }} -- cgit From 0a3645a72307afa563683a6e06c544810e0b65eb Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 19 Apr 2023 00:47:15 +0200 Subject: build: find system luv on ubuntu Also use the system luv in CI for the with-external-deps job. --- .github/workflows/test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8215a79b35..7e2b981690 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -383,10 +383,10 @@ jobs: lua-filesystem \ lua-lpeg \ lua-mpack \ - luajit + luajit \ + lua-luv-dev # libtree-sitter-dev \ - # libvterm-dev \ - # lua-luv-dev + # libvterm-dev # Remove comments from packages once we start using these external # dependencies. @@ -400,7 +400,6 @@ jobs: # bundled versions for these with the hopes of being able to remove them # later on. cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED=OFF \ - -D USE_BUNDLED_LUV=ON \ -D USE_BUNDLED_LIBVTERM=ON \ -D USE_BUNDLED_TS=ON cmake --build .deps -- cgit From 1e60e8c0406f6b4b51c51abb5f53e25bd52fee5e Mon Sep 17 00:00:00 2001 From: bfredl Date: Sat, 15 Apr 2023 12:23:45 +0200 Subject: refactor(build): use vendored versions of mpack and luabitop --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e2b981690..fc400fb346 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -382,7 +382,6 @@ jobs: libuv1-dev \ lua-filesystem \ lua-lpeg \ - lua-mpack \ luajit \ lua-luv-dev # libtree-sitter-dev \ -- cgit From 706f871014b46300180156590ff269ee38473989 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 19 Apr 2023 17:04:00 +0100 Subject: build: update uncrustify to 0.76 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e2b981690..3cb07b0da7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: timeout-minutes: 10 env: CACHE_UNCRUSTIFY: ${{ github.workspace }}/.cache/uncrustify - UNCRUSTIFY_VERSION: uncrustify-0.75.0 + UNCRUSTIFY_VERSION: uncrustify-0.76.0 steps: - uses: actions/checkout@v3 -- cgit From 669030ec08042e41d57f74adb4abb836c387930a Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 22 Apr 2023 13:50:27 +0200 Subject: ci: remove team reviewers Team reviewers is a nice feature that comes with a severe drawback: it makes testing the workflows incredibly difficult as they won't work without a similar token by the tester. --- .github/workflows/add-reviewers.yml | 1 - .github/workflows/labeler.yml | 1 - .github/workflows/remove-reviewers.yml | 1 - 3 files changed, 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/add-reviewers.yml b/.github/workflows/add-reviewers.yml index f1abab5c53..6c8c7ff8ed 100644 --- a/.github/workflows/add-reviewers.yml +++ b/.github/workflows/add-reviewers.yml @@ -13,7 +13,6 @@ jobs: - name: 'Request reviewers' uses: actions/github-script@v6 with: - github-token: ${{ secrets.TEAM_REVIEW }} script: | const script = require('./.github/scripts/reviews.js') await script({github, context}) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index bf1d148be7..a825aeaab1 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -43,7 +43,6 @@ jobs: - name: 'Request reviewers' uses: actions/github-script@v6 with: - github-token: ${{ secrets.TEAM_REVIEW }} script: | const script = require('./.github/scripts/reviews.js') await script({github, context}) diff --git a/.github/workflows/remove-reviewers.yml b/.github/workflows/remove-reviewers.yml index 7ab3ef568c..f707f79737 100644 --- a/.github/workflows/remove-reviewers.yml +++ b/.github/workflows/remove-reviewers.yml @@ -12,7 +12,6 @@ jobs: - name: 'Remove reviewers' uses: actions/github-script@v6 with: - github-token: ${{ secrets.TEAM_REVIEW }} script: | const script = require('./.github/scripts/remove-reviewers.js') await script({github, context}) -- cgit From 732cb9e1e0a90f40d9189bffe009bbb7f8456eeb Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sat, 22 Apr 2023 14:10:35 +0100 Subject: ci(lintcommit): use nvim -l --- .github/workflows/lintcommit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index 77c75fbd76..71a7ad1462 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -16,4 +16,4 @@ jobs: - uses: rhysd/action-setup-vim@v1 with: neovim: true - - run: nvim --clean -es +"lua require('scripts.lintcommit').main({trace=false})" + - run: nvim --clean -l scripts/lintcommit.lua main --notrace -- cgit From ccce200cde296aa65a720e028a5eacf715f29e4f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 22 Apr 2023 17:37:45 +0200 Subject: ci(lintcommit): fix error output Using print() alone doesn't work properly, toggling the verbose option is still required. --- .github/workflows/lintcommit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index 71a7ad1462..0bd92c05ec 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -16,4 +16,4 @@ jobs: - uses: rhysd/action-setup-vim@v1 with: neovim: true - - run: nvim --clean -l scripts/lintcommit.lua main --notrace + - run: nvim --clean -l scripts/lintcommit.lua main -- cgit From 801ac2accb6a88a58b2d8f486751782921bf689f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 22 Apr 2023 18:36:33 +0200 Subject: build: drop diff.exe from windows builds The shipped versions of xdiff already does everything diff does, so this duplication of tools isn't necessary. Furthermore, this setup is more consistent overall, as the 'diffopt=external' option should be for external programs rather than programs we bundle neovim with. Install diffutils for oldtests in CI to avoid needing to modify tests. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93bf5c4d79..5f8e445f36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -354,7 +354,7 @@ jobs: with: update: true pacboy: >- - make:p gcc:p + make:p gcc:p diffutils:p release: false - if: success() || failure() && steps.abort_job.outputs.status == 'success' -- cgit From 8994389845ae4ca5e6a797b8f957dea76320ff94 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 22 Apr 2023 22:58:14 +0200 Subject: ci: make all linux releases work with same glibc version --- .github/workflows/release.yml | 61 ++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 35 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6d0c39402..90702dc0a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,39 +17,10 @@ on: jobs: linux: runs-on: ubuntu-20.04 + env: + CC: gcc-10 outputs: version: ${{ steps.build.outputs.version }} - release: ${{ steps.build.outputs.release }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Install dependencies - run: ./.github/scripts/install_deps.sh - - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV - - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') - run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV - - name: Build release - id: build - run: | - CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=" - printf 'version<> $GITHUB_OUTPUT - ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT - printf 'END\n' >> $GITHUB_OUTPUT - printf 'release=%s\n' "$(./build/bin/nvim --version | head -n 1)" >> $GITHUB_OUTPUT - make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-linux64" install - cd "$GITHUB_WORKSPACE/build/" - cpack -C $NVIM_BUILD_TYPE - - uses: actions/upload-artifact@v3 - with: - name: nvim-linux64 - path: | - build/nvim-linux64.tar.gz - retention-days: 1 - - appimage: - runs-on: ubuntu-20.04 container: image: ubuntu:18.04 options: --privileged # Privileged mode is needed to load fuse module. @@ -71,11 +42,19 @@ jobs: - name: Install dependencies run: | apt-get update - apt-get install -y build-essential cmake gettext locales ninja-build pkg-config unzip + apt-get install -y build-essential cmake gettext ninja-build unzip - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') - run: CC=gcc-10 make appimage-latest + run: | + echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV + echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') - run: CC=gcc-10 make appimage-nightly + run: | + echo 'NVIM_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV + echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV + - name: appimage + run: ./scripts/genappimage.sh ${APPIMAGE_TAG} + - name: tar.gz + run: cpack --config build/CPackConfig.cmake -G TGZ - uses: actions/upload-artifact@v3 with: name: appimage @@ -83,6 +62,18 @@ jobs: build/bin/nvim.appimage build/bin/nvim.appimage.zsync retention-days: 1 + - uses: actions/upload-artifact@v3 + with: + name: nvim-linux64 + path: | + build/nvim-linux64.tar.gz + retention-days: 1 + - name: Export version + id: build + run: | + printf 'version<> $GITHUB_OUTPUT + ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT + printf 'END\n' >> $GITHUB_OUTPUT macOS: runs-on: macos-11 @@ -137,7 +128,7 @@ jobs: retention-days: 1 publish: - needs: [linux, appimage, macOS, windows] + needs: [linux, macOS, windows] runs-on: ubuntu-latest env: GH_REPO: ${{ github.repository }} -- cgit From eee97300ed0f528606e561ffaf43b17faefed612 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 22 Apr 2023 23:28:39 +0200 Subject: ci(labeler): reuse workflow to reduce duplication --- .github/workflows/add-reviewers.yml | 1 + .github/workflows/labeler.yml | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/add-reviewers.yml b/.github/workflows/add-reviewers.yml index 6c8c7ff8ed..0a23554152 100644 --- a/.github/workflows/add-reviewers.yml +++ b/.github/workflows/add-reviewers.yml @@ -2,6 +2,7 @@ name: "Request reviews" on: pull_request_target: types: [labeled, ready_for_review, reopened] + workflow_call: jobs: request-reviewer: if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index a825aeaab1..e4dadb930e 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -3,7 +3,6 @@ on: pull_request_target: types: [opened] jobs: - triage: runs-on: ubuntu-latest permissions: @@ -33,16 +32,7 @@ jobs: run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')" || true request-reviewer: - if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false - runs-on: ubuntu-latest needs: ["triage", "type-scope"] permissions: pull-requests: write - steps: - - uses: actions/checkout@v3 - - name: 'Request reviewers' - uses: actions/github-script@v6 - with: - script: | - const script = require('./.github/scripts/reviews.js') - await script({github, context}) + uses: ./.github/workflows/add-reviewers.yml -- cgit From bf0ac4f241cd22f53e026767ed5df89bf63bcf37 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 23 Apr 2023 12:15:28 +0200 Subject: ci(release): clean up wording and undeprecate tar.gz --- .github/workflows/notes.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 2b34c72ffa..0d62215fe4 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -9,14 +9,14 @@ ${NVIM_VERSION} #### Zip 1. Download **nvim-win64.zip** -2. Extract the zip. +2. Extract the zip 3. Run `nvim-qt.exe` #### MSI 1. Download **nvim-win64.msi** 2. Run the MSI -3. Search and run `nvim-qt.exe` or run `nvim.exe` on your CLI of choice. +3. Search and run `nvim-qt.exe` or run `nvim.exe` on your CLI of choice ### macOS @@ -38,8 +38,6 @@ ${NVIM_VERSION} #### Tarball -*(deprecated)* - 1. Download **nvim-linux64.tar.gz** 2. Extract: `tar xzvf nvim-linux64.tar.gz` 3. Run `./nvim-linux64/bin/nvim` -- cgit From 943ac2be55b7fcb6bf7fd9c80fd22bd4867b672f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 23 Apr 2023 16:35:49 +0200 Subject: ci: reuse script to enable Developer Command Prompt --- .github/workflows/release.yml | 10 +--------- .github/workflows/test.yml | 12 +----------- 2 files changed, 2 insertions(+), 20 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90702dc0a6..ebf5df7aac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,15 +102,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set env - run: | - $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath - if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { - & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { - $name, $value = $_ -split '=', 2 - "$name=$value" >> $env:GITHUB_ENV - } - } + - run: .github/scripts/env.ps1 - name: Build deps run: | cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f8e445f36..c58582157f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -295,18 +295,8 @@ jobs: name: windows steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/cache - - - name: Set env - run: | - $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath - if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { - & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { - $name, $value = $_ -split '=', 2 - "$name=$value" >> $env:GITHUB_ENV - } - } + - run: .github/scripts/env.ps1 - name: Build deps run: | -- cgit From 664f2749e688e2aa2b322d2296111e1246a860ee Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 23 Apr 2023 17:12:46 +0200 Subject: build: add "ci" configure preset to reduce verbosity `cmake --preset ci` is equivalent to `cmake -B build -G Ninja -D CI_BUILD=ON` Also remove build presets as they're not very useful without workflow presets, which are only available in schema versions 6 and above. --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c58582157f..2fc6b13ec4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -199,7 +199,7 @@ jobs: - name: Build run: | - cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} -D CI_BUILD=ON + cmake --preset ci -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} cmake --build build - if: "!cancelled()" @@ -305,7 +305,7 @@ jobs: - name: Build run: | - cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON + cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo' cmake --build build - name: Install test deps @@ -395,5 +395,5 @@ jobs: - name: Build run: | - cmake -B build -G Ninja -D CI_BUILD=ON + cmake --preset ci cmake --build build -- cgit From 7d0479c55810af9bf9f115ba69d1419ea81ec41e Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 26 Apr 2023 23:22:12 +0200 Subject: ci: containerize the external dependencies test Cirrus ci automatically pushes/caches docker images, which makes containerization much simpler to handle. Moving this job to cirrus ci shortens the job by a minute, and reduces github actions CI usage by two minutes per PR. --- .github/workflows/test.yml | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2fc6b13ec4..2b0b9ff20a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -353,47 +353,3 @@ jobs: run: | cd test/old/testdir mingw32-make VERBOSE=1 - - with-external-deps: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - sudo add-apt-repository ppa:neovim-ppa/stable - ./.github/scripts/install_deps.sh - sudo apt-get install -y \ - libluajit-5.1-dev \ - libmsgpack-dev \ - libtermkey-dev \ - libunibilium-dev \ - libuv1-dev \ - lua-filesystem \ - lua-lpeg \ - luajit \ - lua-luv-dev - # libtree-sitter-dev \ - # libvterm-dev - - # Remove comments from packages once we start using these external - # dependencies. - - - uses: ./.github/actions/cache - - - name: Build third-party deps - run: | - # Ideally all dependencies should external for this job, but some - # dependencies don't have the required version available. We use the - # bundled versions for these with the hopes of being able to remove them - # later on. - cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED=OFF \ - -D USE_BUNDLED_LIBVTERM=ON \ - -D USE_BUNDLED_TS=ON - cmake --build .deps - - - name: Build - run: | - cmake --preset ci - cmake --build build -- cgit From c50cdd62706ed00a2bb9e1201ac8aac1b71e9a16 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 27 Apr 2023 22:07:44 +0200 Subject: ci: replace stale bot with custom implementation The stale action has a bug where it won't close an issue/PR if it has comments after the stale label. --- .github/workflows/response.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/stale.yml | 42 ------------------------------------------ 2 files changed, 35 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/response.yml delete mode 100644 .github/workflows/stale.yml (limited to '.github/workflows') diff --git a/.github/workflows/response.yml b/.github/workflows/response.yml new file mode 100644 index 0000000000..c0db77645f --- /dev/null +++ b/.github/workflows/response.yml @@ -0,0 +1,35 @@ +name: no_response +on: + schedule: + - cron: '30 1 * * *' # Run every day at 01:30 + workflow_dispatch: + issue_comment: + +jobs: + close: + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/checkout@v3 + - uses: actions/github-script@v6 + with: + script: | + const script = require('./.github/scripts/close_unresponsive.js') + await script({github, context}) + + remove_label: + if: github.event_name == 'issue_comment' + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/checkout@v3 + - uses: actions/github-script@v6 + with: + script: | + const script = require('./.github/scripts/remove_response_label.js') + await script({github, context}) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 74661e686e..0000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: 'Close stale issues and PRs' -on: - schedule: - - cron: '30 1 * * *' # Run every day at 01:30 - workflow_dispatch: - issue_comment: - -jobs: - close: - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@v8 - with: - days-before-close: 30 - days-before-stale: -1 - stale-issue-label: needs:response - stale-pr-label: needs:response - remove-stale-when-updated: false - close-issue-message: "This issue has been closed since a request for - information has not been answered for 30 days. It can be reopened - when the requested information is provided." - close-pr-message: "This PR has been closed since a request for - changes has not been answered for 30 days. It can be reopened when - the requested changes are provided." - - remove-label: - if: github.event_name == 'issue_comment' - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/checkout@v3 - - uses: actions/github-script@v6 - with: - script: | - const script = require('./.github/scripts/unstale.js') - await script({github, context}) -- cgit From 057af3203b58771f07eb9c809573dd9275a597cb Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 29 Apr 2023 01:48:14 +0200 Subject: ci: replace stylua action with our own lint target This will prevent situations where the linting works on CI but not locally, at the cost of increased CI time. Also manually ignore `runtime/vim/lua/re.lua`, as the .styluaignore isn't respected when specifying a file instead of a directory. --- .github/workflows/test.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b0b9ff20a..0a44075f8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,13 @@ jobs: - name: Install dependencies run: ./.github/scripts/install_deps.sh lua-check + - name: Set up Homebrew + id: homebrew + uses: Homebrew/actions/setup-homebrew@master + + - run: | + brew install stylua + - name: Cache uncrustify id: cache-uncrustify uses: actions/cache@v3 @@ -84,12 +91,8 @@ jobs: run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: lintstylua - uses: JohnnyMorganz/stylua-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: latest - args: --check runtime/ + name: stylua + run: cmake --build build --target lintlua-stylua - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: luacheck -- cgit From 9f2fd8994841f344cfc269d30a4542fcddaecc5f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 29 Apr 2023 13:39:36 +0200 Subject: ci: install uncrustify through homebrew It will result in less CI code, and the additional CI time is negligible. --- .github/workflows/test.yml | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a44075f8e..5352d6a6d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,46 +33,16 @@ jobs: if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') runs-on: ubuntu-22.04 timeout-minutes: 10 - env: - CACHE_UNCRUSTIFY: ${{ github.workspace }}/.cache/uncrustify - UNCRUSTIFY_VERSION: uncrustify-0.76.0 steps: - uses: actions/checkout@v3 - - name: Install dependencies - run: ./.github/scripts/install_deps.sh lua-check - - name: Set up Homebrew - id: homebrew uses: Homebrew/actions/setup-homebrew@master - - run: | - brew install stylua - - - name: Cache uncrustify - id: cache-uncrustify - uses: actions/cache@v3 - with: - path: ${{ env.CACHE_UNCRUSTIFY }} - key: ${{ env.UNCRUSTIFY_VERSION }} - - - name: Clone uncrustify - if: steps.cache-uncrustify.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: uncrustify/uncrustify - ref: ${{ env.UNCRUSTIFY_VERSION }} - path: uncrustify - - - name: Install uncrustify - if: steps.cache-uncrustify.outputs.cache-hit != 'true' + - name: Install dependencies run: | - source_dir=uncrustify - build_dir=uncrustify/build - cmake -S $source_dir -B $build_dir -G Ninja -D CMAKE_BUILD_TYPE=Release - cmake --build $build_dir - mkdir -p .cache - cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }} + ./.github/scripts/install_deps.sh lua-check + brew install stylua uncrustify - uses: ./.github/actions/cache @@ -82,7 +52,6 @@ jobs: cmake --build .deps - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: configure run: cmake -B build -G Ninja - if: "!cancelled()" @@ -111,8 +80,7 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: uncrustify - run: | - ${{ env.CACHE_UNCRUSTIFY }} -c ./src/uncrustify.cfg -q --replace --no-backup $(find ./src/nvim -name "*.[ch]") + run: cmake --build build --target lintc-uncrustify - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: suggester / uncrustify -- cgit From 13a24b905e1646767fed908b8dbdb535a65414ab Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 29 Apr 2023 14:30:54 +0200 Subject: ci: run lintcommit with cmake target This increases CI time, but prevents situations where it works on CI but not locally. --- .github/workflows/lintcommit.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index 0bd92c05ec..e56211c29b 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -13,7 +13,15 @@ jobs: with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - - uses: rhysd/action-setup-vim@v1 - with: - neovim: true - - run: nvim --clean -l scripts/lintcommit.lua main + + - run: ./.github/scripts/install_deps.sh + - uses: ./.github/actions/cache + - name: Build + run: | + cmake -S cmake.deps -B .deps -G Ninja + cmake --build .deps + cmake --preset ci + cmake --build build + + - name: lintcommit + run: cmake --build build --target lintcommit -- cgit From 933fdff4660a17b1df7809105c57825e0ece1fc6 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 29 Apr 2023 15:43:54 +0200 Subject: ci: make install_deps.sh more flexible This will allow us to use it in containers as well as specify whether we want to install test dependencies. --- .github/workflows/release.yml | 5 +---- .github/workflows/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebf5df7aac..a07e1a098a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,10 +39,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Install dependencies - run: | - apt-get update - apt-get install -y build-essential cmake gettext ninja-build unzip + - run: ./.github/scripts/install_deps.sh --container - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') run: | echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5352d6a6d8..5249b36f9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: - name: Install dependencies run: | - ./.github/scripts/install_deps.sh lua-check + ./.github/scripts/install_deps.sh brew install stylua uncrustify - uses: ./.github/actions/cache @@ -141,7 +141,7 @@ jobs: run: mkdir -p "$LOG_DIR" - name: Install dependencies - run: ./.github/scripts/install_deps.sh cpanminus + run: ./.github/scripts/install_deps.sh --test - name: Setup interpreter packages run: | -- cgit From 416f03010e3c776e820a30f5ef1c553df5252d3b Mon Sep 17 00:00:00 2001 From: Raphael Date: Sun, 7 May 2023 20:55:31 +0800 Subject: ci: auto-add labels on issues based on title This is similar to the pull request labeler. We search for certain key words in the issue title and add them if they are present. --- .github/workflows/issue-open-check.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/issue-open-check.yml (limited to '.github/workflows') diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml new file mode 100644 index 0000000000..2471670dc6 --- /dev/null +++ b/.github/workflows/issue-open-check.yml @@ -0,0 +1,34 @@ +name: Issue Open Check + +on: + issues: + types: [opened] + +jobs: + issue-open-check: + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - name: check issue title + id: check-issue + uses: actions/github-script@v6 + with: + script: | + const title = context.payload.issue.title; + const titleSplit = title.split(/\s+/).map(e => e.toLowerCase()); + const keywords = ['api', 'treesitter', 'ui', 'lsp', 'doc']; + var match = new Set(); + for(const keyword of keywords) { + if(titleSplit.includes(keyword)) { + match.add(keyword) + } + } + if(match.size !== 0){ + github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: Array.from(match) + }) + } -- cgit From 08991b078267e5de0a19a136d00d4f71ad651a32 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 13 May 2023 21:33:22 +0200 Subject: docs: small fixes Co-authored-by: Christian Clason Co-authored-by: Gregory Anders Co-authored-by: HiPhish Co-authored-by: Julio B Co-authored-by: T727 <74924917+T-727@users.noreply.github.com> Co-authored-by: camoz Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5249b36f9a..ec393c8d8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -143,7 +143,7 @@ jobs: - name: Install dependencies run: ./.github/scripts/install_deps.sh --test - - name: Setup interpreter packages + - name: Set up interpreter packages run: | # Use default CC to avoid compilation problems when installing Python modules. echo "Install neovim module for Python." -- cgit From e71c7898ca3cf3af1243227ff3cba526d48897e8 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 15 May 2023 00:08:57 +0200 Subject: ci: trigger tests when pushing This will allow contributors to test changes in their own fork when pushing without needing to make a pull request. This can be useful when wanting to test out an idea before initiating a review process. Make the following assumptions when defining concurrency: - Pull request will work the same. - Pushes to the neovim repo will work the same: each unique commit will trigger a test run that won't cancel each other. - Pushes to forks will cancel older CI runs on the same branch, similar to how pull requests work. This will create duplicate CI runs when doing a pull request, one in the neovim repo for the pull request event and one in the fork for the push event. This is an acceptable trade as the runs in the fork doesn't count towards the CI limit of neovim. Contributors are also free to disable these actions in their own fork if they wish. --- .github/workflows/build.yml | 9 ++++++++- .github/workflows/test.yml | 6 +----- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be0f2f812c..605ba2b4c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,12 @@ name: build on: + push: + paths: + - '**.cmake' + - '**/CMakeLists.txt' + - '**/CMakePresets.json' + - 'cmake.*/**' + - '.github/**' pull_request: branches: - 'master' @@ -12,7 +19,7 @@ on: - '.github/**' concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.repository_owner == 'neovim' && github.sha || github.ref_name }} cancel-in-progress: true env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec393c8d8b..23019428c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,6 @@ name: test on: push: - branches: - - 'master' - - 'release-[0-9]+.[0-9]+' pull_request: branches: - 'master' @@ -12,7 +9,7 @@ on: - 'contrib/**' concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.repository_owner == 'neovim' && github.sha || github.ref_name }} cancel-in-progress: true env: @@ -30,7 +27,6 @@ env: jobs: lint: - if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') runs-on: ubuntu-22.04 timeout-minutes: 10 steps: -- cgit From bd247d835fd703c62df2bc0fbe3c8c522cc9c7ac Mon Sep 17 00:00:00 2001 From: ii14 <59243201+ii14@users.noreply.github.com> Date: Mon, 15 May 2023 23:21:04 +0200 Subject: ci: remove redundant asan and ubsan options We now have default options for ASAN and UBSAN (#23259) --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23019428c8..ba696ad85a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,14 +13,14 @@ concurrency: cancel-in-progress: true env: - ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0 + ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0 BIN_DIR: ${{ github.workspace }}/bin BUILD_DIR: ${{ github.workspace }}/build INSTALL_PREFIX: ${{ github.workspace }}/nvim-install LOG_DIR: ${{ github.workspace }}/build/log NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog TSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/tsan - UBSAN_OPTIONS: "print_stacktrace=1 log_path=${{ github.workspace }}/build/log/ubsan" + UBSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/ubsan VALGRIND_LOG: ${{ github.workspace }}/build/log/valgrind-%p.log # TEST_FILE: test/functional/core/startup_spec.lua # TEST_FILTER: foo -- cgit From 826b95203ac9c8decf02e332fbb55cf4ebf73aef Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 18 May 2023 16:27:47 +0200 Subject: build: bundle uncrustify Uncrustify is sensitive to version changes, which causes friction for contributors that doesn't have that exact version. It's also simpler to download and install the correct version than to have bespoke version checking. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba696ad85a..2790994377 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: - name: Install dependencies run: | ./.github/scripts/install_deps.sh - brew install stylua uncrustify + brew install stylua - uses: ./.github/actions/cache -- cgit From a1d885dbefb0a7163c622bc66b5629553ef311c5 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 22 May 2023 08:45:11 -0400 Subject: ci: add check to ensure USE_EXISTING_SRC_DIR=ON builds work --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 605ba2b4c0..26197cdcd3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,3 +78,30 @@ jobs: - name: Install run: make install + + use-existing-src: + name: Test USE_EXISTING_SRC_DIR=ON builds with no network access + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + + - name: Install build dependencies + run: ./.github/scripts/install_deps.sh + + - name: Build bundled dependencies + run: make deps + + - name: Clean bundled dependencies à la neovim/deps + run: | + rm -rf ./build + find .deps .deps/build -maxdepth 1 '!' \( -name .deps -o -name build -o -name src \) -exec rm -r '{}' + + cd .deps/build/src + rm -rf ./*-build + rm -rf ./*-stamp/*-{configure,build,install,done} + for d in *; do (cd "$d"; rm -rf ./autom4te.cache; make clean || true; make distclean || true); done + + - name: Re-build bundled dependencies with no network access + run: unshare --map-root-user --net make deps DEPS_CMAKE_FLAGS=-DUSE_EXISTING_SRC_DIR=ON + + - name: Build + run: make CMAKE_FLAGS="-D CI_BUILD=ON" -- cgit From 599cf6f60c1d4e88ad950063a2c3dcf357cef9f8 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 24 May 2023 00:14:42 +0200 Subject: ci: remove api-docs-check workflow Having a workflow that creates a PR with the necessary changes on master is redundant as this check is enforced for each PR anyway. --- .github/workflows/api-docs-check.yml | 18 ---------------- .github/workflows/api-docs.yml | 42 +++--------------------------------- 2 files changed, 3 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/api-docs-check.yml (limited to '.github/workflows') diff --git a/.github/workflows/api-docs-check.yml b/.github/workflows/api-docs-check.yml deleted file mode 100644 index 0a57df7c33..0000000000 --- a/.github/workflows/api-docs-check.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Missing API docs -on: - pull_request: - branches-ignore: - - 'marvim/api-doc-update**' - paths: - - 'src/nvim/api/*.[ch]' - - 'runtime/lua/**.lua' - - 'runtime/doc/**' - -jobs: - call-regen-api-docs: - permissions: - contents: write - pull-requests: write - uses: ./.github/workflows/api-docs.yml - with: - check_only: true diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index af0397c7cb..f083d32fce 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,23 +1,11 @@ -# Autogenerate the API docs on new commit to important branches -# Also work as a check for PR's to not forget committing their doc changes -# called from api-docs-check.yml +# Check if any PR needs to run the autogenerate script name: Autogenerate API docs on: - push: + pull_request: paths: - 'src/nvim/api/*.[ch]' - 'runtime/lua/**.lua' - 'runtime/doc/**' - branches: - - 'master' - - 'release-[0-9]+.[0-9]+' - workflow_dispatch: - workflow_call: - inputs: - check_only: - type: boolean - default: false - required: false jobs: regen-api-docs: @@ -25,50 +13,26 @@ jobs: permissions: contents: write pull-requests: write - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: rhysd/action-setup-vim@v1 with: neovim: true version: nightly - uses: actions/checkout@v3 - with: - # Fetch depth 0 is required if called through workflow_call. In order - # to create a PR we need to access other branches, which requires a - # full clone. - fetch-depth: 0 - - name: Install dependencies run: | sudo apt-get update sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack - - name: Set up git config - run: | - git config --global user.name 'marvim' - git config --global user.email 'marvim@users.noreply.github.com' - - - run: printf 'DOC_BRANCH=marvim/api-doc-update/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV - - name: Generate docs id: docs run: | - git checkout -b ${DOC_BRANCH} python3 scripts/gen_vimdoc.py printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - name: FAIL, PR has not committed doc changes - if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && inputs.check_only }} + if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes" echo "The doc generation produces the following changes:" git diff --color --exit-code - - - name: Automatic PR - if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && !inputs.check_only }} - run: | - git add -u - git commit -m 'docs: regenerate [skip ci]' - git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${DOC_BRANCH} - gh pr create --draft --fill --base ${GITHUB_REF#refs/heads/} --head ${DOC_BRANCH} || true -- cgit From ebb10d624825468c1f75bd14725cce500974b673 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 24 May 2023 21:14:47 +0200 Subject: build: remove functionaltest-lua target It's not needed anymore as it does the exact same thing as functionaltest. The functionaltest target will test the lua type neovim was built with, which can be toggled with the PREFER_LUA option. --- .github/workflows/test.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2790994377..e2027adc32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -179,16 +179,11 @@ jobs: timeout-minutes: 5 run: cmake --build build --target unittest - - if: matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') + - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: Functionaltest timeout-minutes: 20 run: cmake --build build --target functionaltest - - if: matrix.flavor == 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Functionaltest with PUC Lua - timeout-minutes: 20 - run: cmake --build build --target functionaltest-lua - - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success') name: Oldtest run: make oldtest -- cgit From 2d289589b79edd04fc3e338bc90adb7b644eeed2 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 27 May 2023 13:27:29 +0200 Subject: ci: remove reviewdog for uncrustify Now that uncrustify is bundled it is no longer necessary. --- .github/workflows/test.yml | 12 ------------ 1 file changed, 12 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2027adc32..b71718aad2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,18 +78,6 @@ jobs: name: uncrustify run: cmake --build build --target lintc-uncrustify - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: suggester / uncrustify - uses: reviewdog/action-suggester@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tool_name: uncrustify - cleanup: false - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: check uncrustify - run: git diff --color --exit-code - posix: name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) strategy: -- cgit From 68e2d722959dadc596edb9320bcdede38659db07 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 31 May 2023 08:54:35 +0800 Subject: ci(issue-open-check): don't add "doc" label "doc" label doesn't exist and mentioning "doc" doesn't mean anything. --- .github/workflows/issue-open-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml index 2471670dc6..aef1a90c38 100644 --- a/.github/workflows/issue-open-check.yml +++ b/.github/workflows/issue-open-check.yml @@ -17,14 +17,14 @@ jobs: script: | const title = context.payload.issue.title; const titleSplit = title.split(/\s+/).map(e => e.toLowerCase()); - const keywords = ['api', 'treesitter', 'ui', 'lsp', 'doc']; + const keywords = ['api', 'treesitter', 'ui', 'lsp']; var match = new Set(); - for(const keyword of keywords) { - if(titleSplit.includes(keyword)) { + for (const keyword of keywords) { + if (titleSplit.includes(keyword)) { match.add(keyword) } } - if(match.size !== 0){ + if (match.size !== 0) { github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, -- cgit From aa130d0c7ea69a05330d0b054b414cc3a15dac45 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 2 Jun 2023 16:59:58 +0200 Subject: docs: small fixes (#23619) Co-authored-by: Evgeni Chasnovski Co-authored-by: Gustavo Ferreira Co-authored-by: Kai Moschcau Co-authored-by: Lampros --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b71718aad2..14546cb371 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -101,9 +101,7 @@ jobs: flags: -D CMAKE_FIND_FRAMEWORK=NEVER deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER - # functionaltest-lua is our dumping ground for non-mainline configurations. - # 1. Check that the tests pass with PUC Lua instead of LuaJIT. - # 2. No treesitter parsers installed. + # Check that the tests pass with PUC Lua instead of LuaJIT. - flavor: functionaltest-lua cc: gcc runner: ubuntu-22.04 -- cgit From 0370e4def0c0328f8cd09f02c1ca82ed491ecb9a Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 6 Jun 2023 19:19:00 +0200 Subject: build!: remove neovim qt Neovim QT was originally bundled on Windows as a response to the then lackluster terminal options. The situation has dramatically changed, with viable options such as Windows terminal, Alacritty and Wezterm to name a few. The Windows build no longer needs this special treatment for neovim to be usable. Pros: - Release builds will be smaller. - Less maintenance burden. - Clearer separation of responsibility (neovim issues go to the neovim repo and neovim-qt issues to the neovim-qt repo). - More consistent treatment between platforms. Cons: - Users who've come to expect neovim-qt to be bundled with nvim will need to adjust and download neovim-qt from https://github.com/equalsraf/neovim-qt instead. - Similarly, build scripts will need to be adjusted to reflect this change. Closes https://github.com/neovim/neovim/issues/21209. --- .github/workflows/notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 0d62215fe4..8f05c39d2a 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -10,13 +10,13 @@ ${NVIM_VERSION} 1. Download **nvim-win64.zip** 2. Extract the zip -3. Run `nvim-qt.exe` +3. Run `nvim.exe` on your CLI of choice #### MSI 1. Download **nvim-win64.msi** 2. Run the MSI -3. Search and run `nvim-qt.exe` or run `nvim.exe` on your CLI of choice +3. Run `nvim.exe` on your CLI of choice ### macOS -- cgit From 46e95909bf898bd295f8009b15a88719733de906 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 24 Jun 2023 00:29:53 +0200 Subject: ci: introduce CI_LINT option This will abort if lint programs are not found, and is meant primarily for the lint job in CI. Supersedes the REQUIRED argument in add_glob_target as it's a superior replacement by being a built-in solution. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 14546cb371..bdec96babb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: cmake --build .deps - if: success() || failure() && steps.abort_job.outputs.status == 'success' - run: cmake -B build -G Ninja + run: cmake -B build -G Ninja -D CI_LINT=ON - if: "!cancelled()" name: Determine if run should be aborted -- cgit From fd089c8e50c211d7beae15dbc9492ae5a1a5f2e2 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 26 Jul 2023 09:50:54 +0100 Subject: feat(lua): typing for vim.fn.* (#24473) Problem: No LSP information for `vim.fn.*` Solution: Add meta file for `vim.fn.*`. --- .github/workflows/api-docs.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index f083d32fce..432e91306c 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,14 +1,15 @@ # Check if any PR needs to run the autogenerate script -name: Autogenerate API docs +name: Autogenerate API docs and types on: pull_request: paths: - 'src/nvim/api/*.[ch]' + - 'src/nvim/eval.lua' - 'runtime/lua/**.lua' - 'runtime/doc/**' jobs: - regen-api-docs: + regen-api-docs-and-types: runs-on: ubuntu-latest permissions: contents: write @@ -28,11 +29,13 @@ jobs: id: docs run: | python3 scripts/gen_vimdoc.py + ./scripts/gen_vimfn_types.lua printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - name: FAIL, PR has not committed doc changes if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | - echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes" + echo "Job failed, run ./scripts/gen_vimdoc.py and/or ./scripts/gen_vimfn_types.lua" + echo "and commit your doc changes" echo "The doc generation produces the following changes:" git diff --color --exit-code -- cgit From 42333ea98dfcd2994ee128a3467dfe68205154cd Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 28 Jul 2023 14:48:41 +0100 Subject: feat(docs): generate builtin.txt (#24493) - eval.lua is now the source of truth. - Formatting is much more consistent. - Fixed Lua type generation for polymorphic functions (get(), etc). - Removed "Overview" section from builtin.txt - Can generate this if we really want it. - Moved functions from sign.txt and testing.txt into builtin.txt. - Removed the *timer* *timers* tags since libuv timers via vim.uv should be preferred. - Removed the temp-file-name tag from tempname() - Moved lueval() from lua.txt to builtin.txt. * Fix indent * fixup! * fixup! fixup! * fixup! better tag formatting * fixup: revert changes no longer needed * fixup! CI --------- Co-authored-by: zeertzjq --- .github/workflows/api-docs.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 432e91306c..c6c2d8c658 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -29,7 +29,6 @@ jobs: id: docs run: | python3 scripts/gen_vimdoc.py - ./scripts/gen_vimfn_types.lua printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - name: FAIL, PR has not committed doc changes -- cgit From 48d533272e57e91e4d14c93b26d4922957f40cd7 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 1 Aug 2023 14:20:44 +0100 Subject: feat(lua-types): types for vim.api.* (#24523) --- .github/workflows/api-docs.yml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index c6c2d8c658..d337e558db 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -23,8 +23,13 @@ jobs: - name: Install dependencies run: | sudo apt-get update + ./.github/scripts/install_deps.sh sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack + - name: Build metadata + run: | + make api-metadata + - name: Generate docs id: docs run: | -- cgit From 8afdc1f3867a620c8235b3d3964b019b94657190 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 9 Aug 2023 09:27:51 +0800 Subject: ci(labeler): run "type-scope" after "triage" Problem: When "triage" job is run after "type-scope" job, it may remove labels added by the "type-scope" job. Solution: Run "type-scope" job after "triage" job. --- .github/workflows/labeler.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index e4dadb930e..52682d93dd 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,6 +14,7 @@ jobs: sync-labels: "" type-scope: + needs: triage runs-on: ubuntu-latest permissions: contents: write -- cgit From 006152ff7aa6af65a90c1f52962447ffca848dee Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 13 Aug 2023 12:11:39 -0700 Subject: ci: run codeql on pull requests #24545 Also use cache to save 1 minute. --- .github/workflows/codeql.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 497a79d2d1..61e6216377 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,6 +1,11 @@ name: "CodeQL" on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] schedule: - cron: '42 0 * * 0' workflow_dispatch: @@ -25,6 +30,8 @@ jobs: with: languages: cpp + - uses: ./.github/actions/cache + - run: make - name: Perform CodeQL Analysis -- cgit From 2234b84a1b85832667ad4a23fd5dee0bd1c92b72 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 17 Aug 2023 11:14:58 +0100 Subject: docs(generators): bake into cmake --- .github/workflows/api-docs.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index d337e558db..1648e7703e 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -26,14 +26,10 @@ jobs: ./.github/scripts/install_deps.sh sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack - - name: Build metadata - run: | - make api-metadata - - name: Generate docs id: docs run: | - python3 scripts/gen_vimdoc.py + make doc printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - name: FAIL, PR has not committed doc changes -- cgit From 3bf2839dec09a7a8ad38b164eb06e193c107181a Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 3 Sep 2023 12:06:32 +0200 Subject: ci: move external_deps job from cirrus-ci back to github actions This partially reverts commit 7d0479c55810af9bf9f115ba69d1419ea81ec41e. The job has been particularly unstable when used with docker on cirrus-ci, which is especially bad as it's meant to be a non-flaky and simple test. --- .github/workflows/test.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bdec96babb..0a75a9aad9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -301,3 +301,41 @@ jobs: run: | cd test/old/testdir mingw32-make VERBOSE=1 + + with-external-deps: + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo add-apt-repository ppa:neovim-ppa/stable + ./.github/scripts/install_deps.sh + sudo apt-get install -y \ + libluajit-5.1-dev \ + libmsgpack-dev \ + libtermkey-dev \ + libunibilium-dev \ + libuv1-dev \ + lua-filesystem \ + lua-lpeg \ + luajit \ + lua-luv-dev + # libtree-sitter-dev \ + # libvterm-dev + + # Remove comments from packages once we start using these external + # dependencies. + + - uses: ./.github/actions/cache + + - name: Build third-party deps + run: | + cmake -S cmake.deps --preset external_deps + cmake --build .deps + + - name: Build + run: | + cmake --preset ci + cmake --build build -- cgit From cf7d37ad13c74461e6a05a72123ba44676e6106c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:51:40 +0000 Subject: ci: bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/add-reviewers.yml | 2 +- .github/workflows/api-docs.yml | 2 +- .github/workflows/backport.yml | 2 +- .github/workflows/build.yml | 6 +++--- .github/workflows/codeql.yml | 2 +- .github/workflows/coverity.yml | 2 +- .github/workflows/lintcommit.yml | 2 +- .github/workflows/news.yml | 2 +- .github/workflows/release.yml | 8 ++++---- .github/workflows/remove-reviewers.yml | 2 +- .github/workflows/response.yml | 4 ++-- .github/workflows/test.yml | 10 +++++----- .github/workflows/vim-patches.yml | 4 ++-- 13 files changed, 24 insertions(+), 24 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/add-reviewers.yml b/.github/workflows/add-reviewers.yml index 0a23554152..9b79290008 100644 --- a/.github/workflows/add-reviewers.yml +++ b/.github/workflows/add-reviewers.yml @@ -10,7 +10,7 @@ jobs: permissions: pull-requests: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: 'Request reviewers' uses: actions/github-script@v6 with: diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 1648e7703e..d776733b58 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -19,7 +19,7 @@ jobs: with: neovim: true version: nightly - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt-get update diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 020cbd51bd..c15cbd9f68 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -11,6 +11,6 @@ jobs: if: github.event.pull_request.merged runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create backport PRs uses: korthout/backport-action@v1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26197cdcd3..19d443e9e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: runs-on: macos-latest timeout-minutes: 20 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: ./.github/scripts/install_deps.sh @@ -49,7 +49,7 @@ jobs: CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh' CMAKE_VERSION: '3.10.0' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment run: echo "$BIN_DIR" >> $GITHUB_PATH @@ -83,7 +83,7 @@ jobs: name: Test USE_EXISTING_SRC_DIR=ON builds with no network access runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: ./.github/scripts/install_deps.sh diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 61e6216377..a29ea46027 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: ./.github/scripts/install_deps.sh diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index e63f119958..3eed1e51df 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -8,7 +8,7 @@ jobs: scan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: ./.github/scripts/install_deps.sh diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index e56211c29b..cb63ddef68 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.draft == false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml index c715bf1031..d4f8e5ad65 100644 --- a/.github/workflows/news.yml +++ b/.github/workflows/news.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.draft == false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a07e1a098a..5260eec567 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: apt-get install -y fuse libfuse2 # For linuxdeploy. # Workaround for https://github.com/actions/checkout/issues/766. git config --global --add safe.directory "$GITHUB_WORKSPACE" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - run: ./.github/scripts/install_deps.sh --container @@ -75,7 +75,7 @@ jobs: macOS: runs-on: macos-11 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install dependencies @@ -96,7 +96,7 @@ jobs: runs-on: windows-2019 name: windows (MSVC_64) steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - run: .github/scripts/env.ps1 @@ -127,7 +127,7 @@ jobs: steps: # Must perform checkout first, since it deletes the target directory # before running, and would therefore delete the downloaded artifacts - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 diff --git a/.github/workflows/remove-reviewers.yml b/.github/workflows/remove-reviewers.yml index f707f79737..bf509b07a8 100644 --- a/.github/workflows/remove-reviewers.yml +++ b/.github/workflows/remove-reviewers.yml @@ -8,7 +8,7 @@ jobs: permissions: pull-requests: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: 'Remove reviewers' uses: actions/github-script@v6 with: diff --git a/.github/workflows/response.yml b/.github/workflows/response.yml index c0db77645f..a8ea88765b 100644 --- a/.github/workflows/response.yml +++ b/.github/workflows/response.yml @@ -13,7 +13,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/github-script@v6 with: script: | @@ -27,7 +27,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/github-script@v6 with: script: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a75a9aad9..050c534549 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Homebrew uses: Homebrew/actions/setup-homebrew@master @@ -112,7 +112,7 @@ jobs: env: CC: ${{ matrix.cc }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment run: | @@ -213,7 +213,7 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: ./.github/scripts/install_deps.sh @@ -242,7 +242,7 @@ jobs: timeout-minutes: 45 name: windows steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/cache - run: .github/scripts/env.ps1 @@ -306,7 +306,7 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: | diff --git a/.github/workflows/vim-patches.yml b/.github/workflows/vim-patches.yml index 60a5775497..711ddae815 100644 --- a/.github/workflows/vim-patches.yml +++ b/.github/workflows/vim-patches.yml @@ -15,11 +15,11 @@ jobs: VERSION_BRANCH: marvim/ci-version-update GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: vim/vim path: ${{ env.VIM_SOURCE_DIR }} -- cgit From b7734c4ec84f0de14fcf86cfacefbed8a3ecf600 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 9 Sep 2023 10:36:42 +0200 Subject: ci: remove container solution for the linux runner This will fix the failing release job. Ubuntu 18.04 is incompatible with checkout action version 4, which requires glibc 2.28+. This will bump the minimum glibc version required to use the release versions to 2.31. People requring the older releases can find them at https://github.com/neovim/neovim-releases. --- .github/workflows/notes.md | 4 ++++ .github/workflows/release.yml | 16 +--------------- 2 files changed, 5 insertions(+), 15 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 8f05c39d2a..7a87f936c3 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -27,6 +27,10 @@ ${NVIM_VERSION} ### Linux (x64) +Minimum glibc version to run these releases is 3.31. People requring releases +that work on older glibc versions can find them at +https://github.com/neovim/neovim-releases. + #### AppImage 1. Download **nvim.appimage** 2. Run `chmod u+x nvim.appimage && ./nvim.appimage` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5260eec567..c74f499804 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,25 +21,11 @@ jobs: CC: gcc-10 outputs: version: ${{ steps.build.outputs.version }} - container: - image: ubuntu:18.04 - options: --privileged # Privileged mode is needed to load fuse module. steps: - - name: Prepare container - run: | - apt-get update - apt-get install -y software-properties-common - add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-10. - add-apt-repository -y ppa:git-core/ppa # For git>=2.18. - apt-get update - apt-get install -y git gcc-10 - apt-get install -y fuse libfuse2 # For linuxdeploy. - # Workaround for https://github.com/actions/checkout/issues/766. - git config --global --add safe.directory "$GITHUB_WORKSPACE" - uses: actions/checkout@v4 with: fetch-depth: 0 - - run: ./.github/scripts/install_deps.sh --container + - run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') run: | echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV -- cgit From 5acd8501177eded74d94ab8f307a18ae0a4d334d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 9 Sep 2023 13:31:47 +0200 Subject: ci(release): remove unnecessary full clone --- .github/workflows/release.yml | 6 ------ 1 file changed, 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c74f499804..b19019d06d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,8 +23,6 @@ jobs: version: ${{ steps.build.outputs.version }} steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') run: | @@ -62,8 +60,6 @@ jobs: runs-on: macos-11 steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Install dependencies run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') @@ -83,8 +79,6 @@ jobs: name: windows (MSVC_64) steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - run: .github/scripts/env.ps1 - name: Build deps run: | -- cgit From 6e26964e0effdb4998fb98bc7f87430ce50cc672 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 9 Sep 2023 13:37:32 +0200 Subject: revert: "ci: trigger tests when pushing" This reverts commit e71c7898ca3cf3af1243227ff3cba526d48897e8. Triggering jobs on users own fork turned out to be not that useful, and only necessary in rare moments. It's easier to adjust the CI scripts if the users wants CI results before creating a pull request. It also reduces the complexity of the CI code. --- .github/workflows/build.yml | 9 +-------- .github/workflows/test.yml | 5 ++++- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19d443e9e2..982ec707ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,5 @@ name: build on: - push: - paths: - - '**.cmake' - - '**/CMakeLists.txt' - - '**/CMakePresets.json' - - 'cmake.*/**' - - '.github/**' pull_request: branches: - 'master' @@ -19,7 +12,7 @@ on: - '.github/**' concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.repository_owner == 'neovim' && github.sha || github.ref_name }} + group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 050c534549..f27e58644c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,9 @@ name: test on: push: + branches: + - 'master' + - 'release-[0-9]+.[0-9]+' pull_request: branches: - 'master' @@ -9,7 +12,7 @@ on: - 'contrib/**' concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.repository_owner == 'neovim' && github.sha || github.ref_name }} + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true env: -- cgit From b6b70ae19915b87f78938eb576ab6def9354b1c5 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 1 May 2023 07:56:17 +0200 Subject: ci: install stylua from their releases It's quicker to grab the .zip file rather than using homebrew. --- .github/workflows/test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f27e58644c..585e0223f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,13 +35,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Homebrew - uses: Homebrew/actions/setup-homebrew@master - - name: Install dependencies + run: ./.github/scripts/install_deps.sh + + - name: Install stylua run: | - ./.github/scripts/install_deps.sh - brew install stylua + URL=$(curl -L https://api.github.com/repos/JohnnyMorganz/StyLua/releases/latest | jq -r '.assets[] | select(.name == "stylua-linux-x86_64.zip") | .browser_download_url') + wget --directory-prefix="$BIN_DIR" "$URL" + (cd "$BIN_DIR"; unzip stylua*.zip) + echo "$BIN_DIR" >> $GITHUB_PATH - uses: ./.github/actions/cache -- cgit From 06d48f6aa65a6694f7850246f56f208f98dcc587 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 10 Sep 2023 15:21:56 +0200 Subject: ci(codeql): add concurrency to cancel unnecessary jobs early --- .github/workflows/codeql.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a29ea46027..365c3fdf56 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,14 +1,15 @@ name: "CodeQL" +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + on: push: branches: [ "master" ] pull_request: # The branches below must be a subset of the branches above branches: [ "master" ] - schedule: - - cron: '42 0 * * 0' - workflow_dispatch: jobs: analyze: name: Analyze -- cgit From 6c0f900699293937435591412e4285e313703bc7 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 6 Oct 2023 17:43:23 +0200 Subject: ci: enable clang-analyzer warnings This adds the checks in https://neovim.io/doc/reports/clang/ when using clang-tidy. The strategy is to enable all clang-analyzer checks, and disable only the checks for the warnings that exist currently. This allows us to eliminate each warning type without blocking ongoing work, but also without adding bugs for already eliminated warnings. The plan is to eventually eliminate https://neovim.io/doc/reports/clang/ by completely integrating it into the clang-tidy check. Also add make and cmake targets `clang-analyzer` to run this check. --- .github/workflows/test.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 585e0223f0..8c86ad5fcf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,6 +83,20 @@ jobs: name: uncrustify run: cmake --build build --target lintc-uncrustify + clang-analyzer: + runs-on: ubuntu-22.04 + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - run: ./.github/scripts/install_deps.sh + - uses: ./.github/actions/cache + - name: Build third-party deps + run: | + cmake -S cmake.deps -B .deps -G Ninja + cmake --build .deps + cmake -B build -G Ninja + - run: cmake --build build --target clang-analyzer + posix: name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) strategy: -- cgit From 9eb5d9f13fb24594007f5b0728826b1f9b694e3c Mon Sep 17 00:00:00 2001 From: dundargoc Date: Wed, 27 Sep 2023 17:53:06 +0200 Subject: ci: various cleanups - add reviewers - correct cache key --- .github/workflows/test.yml | 68 ++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 30 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8c86ad5fcf..3cfc6eee89 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,8 +52,7 @@ jobs: cmake -S cmake.deps -B .deps -G Ninja cmake --build .deps - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - run: cmake -B build -G Ninja -D CI_LINT=ON + - run: cmake -B build -G Ninja -D CI_LINT=ON - if: "!cancelled()" name: Determine if run should be aborted @@ -77,6 +76,7 @@ jobs: run: cmake --build build --target lintc-clint - if: success() || failure() && steps.abort_job.outputs.status == 'success' + name: clang-tidy run: cmake --build build --target clang-tidy - if: success() || failure() && steps.abort_job.outputs.status == 'success' @@ -228,34 +228,6 @@ jobs: name: Show logs run: cat $(find "$LOG_DIR" -type f) - build-types: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh - - - uses: ./.github/actions/cache - - - name: Build third-party deps - run: | - cmake -S cmake.deps -B .deps -G "Ninja Multi-Config" - cmake --build .deps - - - name: Configure - run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc -D CI_BUILD=ON - - - name: Release - run: cmake --build build --config Release - - - name: RelWithDebInfo - run: cmake --build build --config RelWithDebInfo - - - name: MinSizeRel - run: cmake --build build --config MinSizeRel - windows: runs-on: windows-2022 timeout-minutes: 45 @@ -321,6 +293,42 @@ jobs: cd test/old/testdir mingw32-make VERBOSE=1 + # This job tests the following things: + # - Check if Release, MinSizeRel and RelWithDebInfo compiles correctly. + # - Test the above build types with the GCC compiler specifically. + # Empirically the difference in warning levels between GCC and other + # compilers is particularly big. + # - Test if the build works with multi-config generators. We mostly use + # single-config generators so it's nice to have a small sanity check for + # multi-config. + build-types: + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: ./.github/scripts/install_deps.sh + + - uses: ./.github/actions/cache + + - name: Build third-party deps + run: | + cmake -S cmake.deps -B .deps -G "Ninja Multi-Config" + cmake --build .deps + + - name: Configure + run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc -D CI_BUILD=ON + + - name: Release + run: cmake --build build --config Release + + - name: RelWithDebInfo + run: cmake --build build --config RelWithDebInfo + + - name: MinSizeRel + run: cmake --build build --config MinSizeRel + with-external-deps: runs-on: ubuntu-22.04 timeout-minutes: 10 -- cgit From 40bd96b6f9295a43de0c4179a90db087a7d37293 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 8 Oct 2023 23:05:23 +0200 Subject: ci: use clang 17 as the default clang version is too old --- .github/workflows/test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cfc6eee89..aed079cb60 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,8 @@ jobs: lint: runs-on: ubuntu-22.04 timeout-minutes: 10 + env: + CC: clang steps: - uses: actions/checkout@v4 @@ -86,6 +88,8 @@ jobs: clang-analyzer: runs-on: ubuntu-22.04 timeout-minutes: 20 + env: + CC: clang steps: - uses: actions/checkout@v4 - run: ./.github/scripts/install_deps.sh @@ -304,6 +308,8 @@ jobs: build-types: runs-on: ubuntu-22.04 timeout-minutes: 10 + env: + CC: gcc steps: - uses: actions/checkout@v4 @@ -318,7 +324,7 @@ jobs: cmake --build .deps - name: Configure - run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc -D CI_BUILD=ON + run: cmake -B build -G "Ninja Multi-Config" -D CI_BUILD=ON - name: Release run: cmake --build build --config Release @@ -332,6 +338,8 @@ jobs: with-external-deps: runs-on: ubuntu-22.04 timeout-minutes: 10 + env: + CC: gcc steps: - uses: actions/checkout@v4 -- cgit From c3d21ad1bccd9a2975be73b1115213fd884eada3 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 15 Sep 2023 09:43:48 +0200 Subject: docs: small fixes Co-authored-by: Wansmer Co-authored-by: Andrew Voynov Co-authored-by: David Moberg --- .github/workflows/notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 7a87f936c3..8c518b0bdb 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -27,7 +27,7 @@ ${NVIM_VERSION} ### Linux (x64) -Minimum glibc version to run these releases is 3.31. People requring releases +Minimum glibc version to run these releases is 2.31. People requiring releases that work on older glibc versions can find them at https://github.com/neovim/neovim-releases. -- cgit From 3a3e0251267a99eec6cfb2a058f9e992d01107fd Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 20 Oct 2023 20:36:23 +0200 Subject: ci: install perl provider on mac Perl provider installation was previously disabled on mac due to a version conflict in 79bf5074499ae06788762ec49d12af6175b01d15. It is no longer present, so we enable it. --- .github/workflows/test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aed079cb60..44cf65a65e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -161,10 +161,8 @@ jobs: npm install -g neovim npm link neovim - if [[ $RUNNER_OS != macOS ]]; then - sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log" - perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' - fi + sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log" + perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' - uses: ./.github/actions/cache -- cgit From bc850ba2a090a9a4733a82a7555a5a70264ce1ac Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 20 Oct 2023 15:12:37 +0200 Subject: ci: run tests in parallel This will run the three test suites (unit, functional and old) in parallel, meaning that neovim is built for each test and run separately. This has a slight increase in total CI usage, but it allows rerunning only the specific test suite that failed for flaky tests, which will save some time. Ideally we'd remove any drawbacks by building neovim once and reusing it for each test suite, but that is not currently possible due to poor upload/download speeds of the upload-artifact and download-artifact actions. This has been addressed in https://github.com/actions/toolkit/pull/1488, but will only be made available in upload-artifact@v4 and download-artifact@v4. --- .github/workflows/test.yml | 103 ++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 66 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44cf65a65e..a9fbf4330a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -102,38 +102,30 @@ jobs: - run: cmake --build build --target clang-analyzer posix: - name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) + name: ${{ matrix.build.runner }} ${{ matrix.build.flavor }} ${{ matrix.build.cc }} ${{ matrix.test }} strategy: fail-fast: false matrix: - include: - - flavor: asan - cc: clang - runner: ubuntu-22.04 - flags: -D ENABLE_ASAN_UBSAN=ON - - flavor: tsan - cc: clang - runner: ubuntu-22.04 - flags: -D ENABLE_TSAN=ON - - flavor: uchar - cc: gcc - runner: ubuntu-22.04 - flags: -D UNSIGNED_CHAR=ON - - cc: clang - runner: macos-12 - flags: -D CMAKE_FIND_FRAMEWORK=NEVER - deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER - - # Check that the tests pass with PUC Lua instead of LuaJIT. - - flavor: functionaltest-lua - cc: gcc - runner: ubuntu-22.04 - deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON - flags: -D PREFER_LUA=ON - runs-on: ${{ matrix.runner }} + build: + [ + { runner: ubuntu-22.04, flavor: asan, cc: clang, flags: -D ENABLE_ASAN_UBSAN=ON }, + { runner: ubuntu-22.04, flavor: tsan, cc: clang, flags: -D ENABLE_TSAN=ON }, + { runner: ubuntu-22.04, flavor: uchar, cc: gcc, flags: -D UNSIGNED_CHAR=ON }, + { runner: macos-12, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER }, + { runner: ubuntu-22.04, flavor: functionaltest-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON }, + ] + test: [unittest, functionaltest, oldtest] + exclude: + - test: unittest + build: { flavor: tsan } + - test: unittest + build: { flavor: functionaltest-lua } + - test: oldtest + build: { flavor: tsan } + runs-on: ${{ matrix.build.runner }} timeout-minutes: 45 env: - CC: ${{ matrix.cc }} + CC: ${{ matrix.build.cc }} steps: - uses: actions/checkout@v4 @@ -148,7 +140,8 @@ jobs: - name: Install dependencies run: ./.github/scripts/install_deps.sh --test - - name: Set up interpreter packages + - if: ${{ matrix.test != 'unittest' }} + name: Set up interpreter packages run: | # Use default CC to avoid compilation problems when installing Python modules. echo "Install neovim module for Python." @@ -168,40 +161,21 @@ jobs: - name: Build third-party deps run: | - cmake -S cmake.deps -B .deps -G Ninja ${{ matrix.deps_flags }} + cmake -S cmake.deps -B .deps -G Ninja ${{ matrix.build.deps_flags }} cmake --build .deps - name: Build run: | - cmake --preset ci -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} + cmake --preset ci -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.build.flags }} cmake --build build - - if: "!cancelled()" - name: Determine if run should be aborted - id: abort_job - run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT - - - if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Unittest - timeout-minutes: 5 - run: cmake --build build --target unittest - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Functionaltest + - name: ${{ matrix.test }} timeout-minutes: 20 - run: cmake --build build --target functionaltest - - - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success') - name: Oldtest - run: make oldtest + run: make ${{ matrix.test }} - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Install - run: cmake --install build - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Installtests + - name: Install run: | + cmake --install build "$INSTALL_PREFIX/bin/nvim" --version if ! "$INSTALL_PREFIX/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then echo "Running ':help' in the installed nvim failed." @@ -226,14 +200,17 @@ jobs: exit 1 fi - - if: success() || failure() && steps.abort_job.outputs.status == 'success' + - if: '!cancelled()' name: Show logs run: cat $(find "$LOG_DIR" -type f) windows: runs-on: windows-2022 timeout-minutes: 45 - name: windows + strategy: + fail-fast: false + matrix: + test: [functional, old] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/cache @@ -269,18 +246,12 @@ jobs: Get-Command -CommandType Application neovim-node-host.cmd npm.cmd link neovim - - if: "!cancelled()" - name: Determine if run should be aborted - id: abort_job - run: | - "status=${{ job.status }}" >> $env:GITHUB_OUTPUT - - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Run functionaltest + - if: ${{ matrix.test == 'functional' }} + name: functionaltest timeout-minutes: 20 run: cmake --build build --target functionaltest - - if: success() || failure() && steps.abort_job.outputs.status == 'success' + - if: ${{ matrix.test == 'old' }} uses: msys2/setup-msys2@v2 with: update: true @@ -288,8 +259,8 @@ jobs: make:p gcc:p diffutils:p release: false - - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Run oldtest + - if: ${{ matrix.test == 'old' }} + name: oldtest shell: msys2 {0} run: | cd test/old/testdir -- cgit From 788bc12a6f4c5a4627cbc75a2f539bfc622384a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:23:11 +0100 Subject: ci: bump korthout/backport-action from 1 to 2 --- .github/workflows/backport.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index c15cbd9f68..321cd02b0c 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -13,4 +13,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: Create backport PRs - uses: korthout/backport-action@v1 + uses: korthout/backport-action@v2 -- cgit From 1997ef134a9a1504fdaf6e7751f470e92d283a45 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 31 Oct 2023 12:12:18 +0100 Subject: build: set char to always be signed Sticking to the same convention makes it easier to reason about the code and reduces complexity. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9fbf4330a..1ff6b31a2d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,7 +110,7 @@ jobs: [ { runner: ubuntu-22.04, flavor: asan, cc: clang, flags: -D ENABLE_ASAN_UBSAN=ON }, { runner: ubuntu-22.04, flavor: tsan, cc: clang, flags: -D ENABLE_TSAN=ON }, - { runner: ubuntu-22.04, flavor: uchar, cc: gcc, flags: -D UNSIGNED_CHAR=ON }, + { runner: ubuntu-22.04, cc: gcc }, { runner: macos-12, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER }, { runner: ubuntu-22.04, flavor: functionaltest-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON }, ] -- cgit From 20dd9f3a26e45a1b4c95ba33d6c9f300184fc361 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 31 Oct 2023 13:27:39 +0100 Subject: ci: add optional CI that can be triggered manually These are meant for expensive or situational tests that may not be suitable to run each time, but can occasionally be useful. Currently only add testing for s390x. The job is enabled by adding the ci-s390x label in github. --- .github/workflows/optional.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/optional.yml (limited to '.github/workflows') diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml new file mode 100644 index 0000000000..f512bb0d2a --- /dev/null +++ b/.github/workflows/optional.yml @@ -0,0 +1,34 @@ +name: optional +on: + pull_request: + types: [labeled, opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + s390x: + if: ${{ github.event.label.name == 'ci-s390x' }} + strategy: + fail-fast: false + matrix: + test: [functionaltest, oldtest] + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: docker://multiarch/ubuntu-core:s390x-focal + with: + args: > + bash -c + " + apt-get -y update && + DEBIAN_FRONTEND=noninteractive apt-get -y install attr build-essential cmake curl gettext libattr1-dev ninja-build unzip locales-all cpanminus git && + git clone --depth=1 https://github.com/neovim/neovim.git && + cd neovim && + cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON && + cmake --build .deps && + cmake -B build -G Ninja -D PREFER_LUA=ON && + make ${{ matrix.test }} + " -- cgit From e0d97d264f83d45472e6cdd1051893db1083eefb Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:12:38 -0700 Subject: build: use built nvim artifact to generate eval files (#25875) In cases where the generated files depend on changes to Nvim itself, generating the files with an older version of Nvim will fail because those changes are not present in the older version. For example, if a new option is added then the generator script should be run with the version of Nvim that contains the new option, or else the generation will fail. Co-authored-by: dundargoc --- .github/workflows/api-docs.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index d776733b58..cb72daf9ad 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -15,19 +15,14 @@ jobs: contents: write pull-requests: write steps: - - uses: rhysd/action-setup-vim@v1 - with: - neovim: true - version: nightly - uses: actions/checkout@v4 - name: Install dependencies run: | - sudo apt-get update ./.github/scripts/install_deps.sh - sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack + sudo apt-get install -y doxygen python3-msgpack + - uses: ./.github/actions/cache - name: Generate docs - id: docs run: | make doc printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT @@ -35,7 +30,6 @@ jobs: - name: FAIL, PR has not committed doc changes if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | - echo "Job failed, run ./scripts/gen_vimdoc.py and/or ./scripts/gen_vimfn_types.lua" - echo "and commit your doc changes" + echo "Job failed, run 'make doc' and commit your doc changes." echo "The doc generation produces the following changes:" git diff --color --exit-code -- cgit From 9ad239690fe6b151afe2f43c2858d68a2b877e1d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 22 Oct 2023 13:30:32 +0200 Subject: ci: various fixes - adjust reviewers - add workflow as cache key - install attr only when tesitng - fix s390x workflow by checking out the merge PR instead of master --- .github/workflows/build.yml | 12 +++--------- .github/workflows/lintcommit.yml | 2 +- .github/workflows/optional.yml | 11 +++++++++-- .github/workflows/test.yml | 27 +++++++++------------------ 4 files changed, 22 insertions(+), 30 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 982ec707ae..d6e11fcdcb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,10 +25,7 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@v4 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh - + - run: ./.github/scripts/install_deps.sh - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV - name: Build universal binary @@ -43,12 +40,11 @@ jobs: CMAKE_VERSION: '3.10.0' steps: - uses: actions/checkout@v4 + - run: ./.github/scripts/install_deps.sh - name: Set up environment run: echo "$BIN_DIR" >> $GITHUB_PATH - - name: Install dependencies - run: ./.github/scripts/install_deps.sh - name: Install minimum required version of cmake run: | @@ -77,9 +73,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - - name: Install build dependencies - run: ./.github/scripts/install_deps.sh + - run: ./.github/scripts/install_deps.sh - name: Build bundled dependencies run: make deps diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index cb63ddef68..8f56c057ae 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -18,7 +18,7 @@ jobs: - uses: ./.github/actions/cache - name: Build run: | - cmake -S cmake.deps -B .deps -G Ninja + cmake -S cmake.deps --preset ci cmake --build .deps cmake --preset ci cmake --build build diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index f512bb0d2a..f3bb27dc70 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -7,9 +7,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true +env: + INSTALL_PREFIX: ${{ github.workspace }}/nvim-install + # TEST_FILE: test/functional/shada + # TEST_FILTER: foo + jobs: s390x: - if: ${{ github.event.label.name == 'ci-s390x' }} + if: contains(github.event.pull_request.labels.*.name, 'ci-s390x') strategy: fail-fast: false matrix: @@ -24,9 +29,11 @@ jobs: bash -c " apt-get -y update && - DEBIAN_FRONTEND=noninteractive apt-get -y install attr build-essential cmake curl gettext libattr1-dev ninja-build unzip locales-all cpanminus git && + DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build unzip locales-all cpanminus git attr libattr1-dev && git clone --depth=1 https://github.com/neovim/neovim.git && cd neovim && + git fetch origin ${{ github.ref }}:pr && + git switch pr && cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON && cmake --build .deps && cmake -B build -G Ninja -D PREFER_LUA=ON && diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ff6b31a2d..a1133404e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,9 +36,8 @@ jobs: CC: clang steps: - uses: actions/checkout@v4 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh + - run: ./.github/scripts/install_deps.sh + - uses: ./.github/actions/cache - name: Install stylua run: | @@ -47,8 +46,6 @@ jobs: (cd "$BIN_DIR"; unzip stylua*.zip) echo "$BIN_DIR" >> $GITHUB_PATH - - uses: ./.github/actions/cache - - name: Build third-party deps run: | cmake -S cmake.deps -B .deps -G Ninja @@ -96,9 +93,9 @@ jobs: - uses: ./.github/actions/cache - name: Build third-party deps run: | - cmake -S cmake.deps -B .deps -G Ninja + cmake -S cmake.deps --preset ci cmake --build .deps - cmake -B build -G Ninja + cmake --preset ci - run: cmake --build build --target clang-analyzer posix: @@ -128,6 +125,8 @@ jobs: CC: ${{ matrix.build.cc }} steps: - uses: actions/checkout@v4 + - run: ./.github/scripts/install_deps.sh --test + - uses: ./.github/actions/cache - name: Set up environment run: | @@ -137,9 +136,6 @@ jobs: - name: Create log dir run: mkdir -p "$LOG_DIR" - - name: Install dependencies - run: ./.github/scripts/install_deps.sh --test - - if: ${{ matrix.test != 'unittest' }} name: Set up interpreter packages run: | @@ -157,11 +153,9 @@ jobs: sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log" perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' - - uses: ./.github/actions/cache - - name: Build third-party deps run: | - cmake -S cmake.deps -B .deps -G Ninja ${{ matrix.build.deps_flags }} + cmake -S cmake.deps --preset ci ${{ matrix.build.deps_flags }} cmake --build .deps - name: Build @@ -281,10 +275,7 @@ jobs: CC: gcc steps: - uses: actions/checkout@v4 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh - + - run: ./.github/scripts/install_deps.sh - uses: ./.github/actions/cache - name: Build third-party deps @@ -293,7 +284,7 @@ jobs: cmake --build .deps - name: Configure - run: cmake -B build -G "Ninja Multi-Config" -D CI_BUILD=ON + run: cmake --preset ci -G "Ninja Multi-Config" - name: Release run: cmake --build build --config Release -- cgit From 5cefec7349610853910c21a0215f85a4d47132d1 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 26 Oct 2023 22:30:00 +0200 Subject: build: various cmake fixes - silence false warnings on MSVC - merge `clang-tidy` cmake target into `lintc` and remove the corresponding make target - use cmake's built-in endianness detection --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1133404e2..096f86219e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,7 +76,7 @@ jobs: - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: clang-tidy - run: cmake --build build --target clang-tidy + run: cmake --build build --target lintc-clang-tidy - if: success() || failure() && steps.abort_job.outputs.status == 'success' name: uncrustify -- cgit From 92e99bb1058dd837c451675175efb8511c5f8e15 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 4 Nov 2023 22:38:25 +0100 Subject: ci: don't install unzip It is no longer needed now that luarocks isn't used. --- .github/workflows/optional.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index f3bb27dc70..ebaf23d29b 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -29,7 +29,7 @@ jobs: bash -c " apt-get -y update && - DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build unzip locales-all cpanminus git attr libattr1-dev && + DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build locales-all cpanminus git attr libattr1-dev && git clone --depth=1 https://github.com/neovim/neovim.git && cd neovim && git fetch origin ${{ github.ref }}:pr && -- cgit From 88ed9ffcd1c022811ebc8818e153fe94e4741671 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 5 Nov 2023 11:47:48 +0100 Subject: ci: work around flaky python3 tests Python3 provider tests suddenly became extremely flaky on macos for unknown reasons. For some reason, installing python with the setup-python action over using the default python fixes the flakiness. Use this workaround for the time being to unblock CI while we figure out the root cause. --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 096f86219e..1ebb26d5c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -136,6 +136,13 @@ jobs: - name: Create log dir run: mkdir -p "$LOG_DIR" + # FIXME(dundargoc): this workaround is needed for macos as the python3 + # provider tests suddenly started to become extremely flaky, and this + # removes the flakiness for some reason. + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + - if: ${{ matrix.test != 'unittest' }} name: Set up interpreter packages run: | -- cgit From 98bb1d66b1985db43f84b272dd4e8a83d1511d44 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 10 Nov 2023 15:47:34 +0800 Subject: ci: remove UBSAN_OPTIONS environment variable (#25963) Because it overrides log_path from ASAN_OPTIONS. Ref https://github.com/google/sanitizers/issues/1675 --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ebb26d5c0..acf0f195b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,6 @@ env: LOG_DIR: ${{ github.workspace }}/build/log NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog TSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/tsan - UBSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/ubsan VALGRIND_LOG: ${{ github.workspace }}/build/log/valgrind-%p.log # TEST_FILE: test/functional/core/startup_spec.lua # TEST_FILTER: foo -- cgit From b2ca768196af87b93c90e315747d166f5d8d931c Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 11 Nov 2023 12:50:48 +0100 Subject: ci: skip api-doc workflow on draft PRs Checking the documentation generation is mostly useful towards the end of a pull request like with the lintcommit workflow. --- .github/workflows/api-docs.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index cb72daf9ad..2cecd2af6d 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -2,6 +2,7 @@ name: Autogenerate API docs and types on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'src/nvim/api/*.[ch]' - 'src/nvim/eval.lua' @@ -11,6 +12,7 @@ on: jobs: regen-api-docs-and-types: runs-on: ubuntu-latest + if: github.event.pull_request.draft == false permissions: contents: write pull-requests: write -- cgit From 64c2c7c40da4bafb6f74076b7ffbffb262246c7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 12:57:54 +0800 Subject: ci: bump actions/github-script from 6 to 7 (#26041) Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/add-reviewers.yml | 2 +- .github/workflows/issue-open-check.yml | 2 +- .github/workflows/remove-reviewers.yml | 2 +- .github/workflows/response.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/add-reviewers.yml b/.github/workflows/add-reviewers.yml index 9b79290008..22c68b6ef7 100644 --- a/.github/workflows/add-reviewers.yml +++ b/.github/workflows/add-reviewers.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: 'Request reviewers' - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const script = require('./.github/scripts/reviews.js') diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml index aef1a90c38..eac1c2ee4d 100644 --- a/.github/workflows/issue-open-check.yml +++ b/.github/workflows/issue-open-check.yml @@ -12,7 +12,7 @@ jobs: steps: - name: check issue title id: check-issue - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const title = context.payload.issue.title; diff --git a/.github/workflows/remove-reviewers.yml b/.github/workflows/remove-reviewers.yml index bf509b07a8..3fe7493b93 100644 --- a/.github/workflows/remove-reviewers.yml +++ b/.github/workflows/remove-reviewers.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: 'Remove reviewers' - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const script = require('./.github/scripts/remove-reviewers.js') diff --git a/.github/workflows/response.yml b/.github/workflows/response.yml index a8ea88765b..663ae6ad87 100644 --- a/.github/workflows/response.yml +++ b/.github/workflows/response.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v4 - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: script: | const script = require('./.github/scripts/close_unresponsive.js') @@ -28,7 +28,7 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v4 - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: script: | const script = require('./.github/scripts/remove_response_label.js') -- cgit From 5b765fcab42308cd4d97a4c37da0c2b1cdb3514d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 11:35:19 +0100 Subject: ci: fix api-docs workflow `git diff-index` only works for tracked files, and unchanged documentation files counts as untracked when shallow cloning. --- .github/workflows/api-docs.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 2cecd2af6d..6f8fe107d2 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -27,11 +27,8 @@ jobs: - name: Generate docs run: | make doc - printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - - - name: FAIL, PR has not committed doc changes - if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} - run: | - echo "Job failed, run 'make doc' and commit your doc changes." - echo "The doc generation produces the following changes:" - git diff --color --exit-code + if [ -n "$(git status --porcelain)" ]; then + echo "::error::Job failed, run 'make doc' and commit your doc changes." + echo "::error::The doc generation produces the following changes:" + git diff --color --exit-code + fi -- cgit