summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.github/CODEOWNERS203
-rw-r--r--.github/FUNDING.yml1
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md34
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md22
-rw-r--r--.github/workflows/ci.yml526
-rw-r--r--.github/workflows/codeql-analysis.yml62
6 files changed, 848 insertions, 0 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..02d6986
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,203 @@
+# Lines starting with '#' are comments.
+# Each line is a file pattern followed by one or more owners.
+# You can use github users with @user or email addresses
+
+# These owners will be the default owners for everything in the repo.
+#* @brammool
+
+# Order is important. The last matching pattern has the most precedence.
+# So if a pull request only touches javascript files, only these owners
+# will be requested to review.
+
+src/iscygpty.* @k-takata
+src/libvterm/ @leonerd
+
+runtime/autoload/getscript.vim @cecamp
+runtime/autoload/netrw.vim @cecamp
+runtime/autoload/netrwFileHandlers.vim @cecamp
+runtime/autoload/netrwSettings.vim @cecamp
+runtime/autoload/rubycomplete.vim @segfault @dkearns
+runtime/autoload/tar.vim @cecamp
+runtime/autoload/vimball.vim @cecamp
+runtime/autoload/xmlformat.vim @chrisbra
+runtime/autoload/zip.vim @cecamp
+runtime/compiler/checkstyle.vim @dkearns
+runtime/compiler/cucumber.vim @tpope
+runtime/compiler/dart.vim @dkearns
+runtime/compiler/dart2js.vim @dkearns
+runtime/compiler/dart2native.vim @dkearns
+runtime/compiler/dartanalyser.vim @dkearns
+runtime/compiler/dartdevc.vim @dkearns
+runtime/compiler/dartdoc.vim @dkearns
+runtime/compiler/dartfmt.vim @dkearns
+runtime/compiler/eruby.vim @dkearns
+runtime/compiler/fbc.vim @dkearns
+runtime/compiler/gawk.vim @dkearns
+runtime/compiler/gjs.vim @dkearns
+runtime/compiler/haml.vim @tpope
+runtime/compiler/javac.vim @dkearns
+runtime/compiler/jest.vim @dkearns
+runtime/compiler/jjs.vim @dkearns
+runtime/compiler/jshint.vim @dkearns
+runtime/compiler/jsonlint.vim @dkearns
+runtime/compiler/lazbuild.vim @dkearns
+runtime/compiler/php.vim @dkearns
+runtime/compiler/rake.vim @tpope @dkearns
+runtime/compiler/rhino.vim @dkearns
+runtime/compiler/rspec.vim @tpope @dkearns
+runtime/compiler/rubocop.vim @dkearns
+runtime/compiler/ruby.vim @tpope @dkearns
+runtime/compiler/rubyunit.vim @dkearns
+runtime/compiler/sass.vim @tpope
+runtime/compiler/se.vim @dkearns
+runtime/compiler/shellcheck.vim @dkearns
+runtime/compiler/stylelint.vim @dkearns
+runtime/compiler/tcl.vim @dkearns
+runtime/compiler/tidy.vim @dkearns
+runtime/compiler/ts-node.vim @dkearns
+runtime/compiler/tsc.vim @dkearns
+runtime/compiler/typedoc.vim @dkearns
+runtime/compiler/xmllint.vim @dkearns
+runtime/compiler/xo.vim @dkearns
+runtime/compiler/zsh.vim @dkearns
+runtime/doc/pi_getscript.txt @cecamp
+runtime/doc/pi_logipat.txt @cecamp
+runtime/doc/pi_netrw.txt @cecamp
+runtime/doc/pi_tar.txt @cecamp
+runtime/doc/pi_vimball.txt @cecamp
+runtime/doc/pi_zip.txt @cecamp
+runtime/ftplugin/awk.vim @dkearns
+runtime/ftplugin/basic.vim @dkearns
+runtime/ftplugin/bst.vim @tpope
+runtime/ftplugin/cfg.vim @chrisbra
+runtime/ftplugin/css.vim @dkearns
+runtime/ftplugin/cucumber.vim @tpope
+runtime/ftplugin/eiffel.vim @dkearns
+runtime/ftplugin/eruby.vim @tpope @dkearns
+runtime/ftplugin/freebasic.vim @dkearns
+runtime/ftplugin/git.vim @tpope
+runtime/ftplugin/gitcommit.vim @tpope
+runtime/ftplugin/gitconfig.vim @tpope
+runtime/ftplugin/gitrebase.vim @tpope
+runtime/ftplugin/gitsendemail.vim @tpope
+runtime/ftplugin/gprof.vim @dpelle
+runtime/ftplugin/haml.vim @tpope
+runtime/ftplugin/hgcommit.vim @k-takata
+runtime/ftplugin/javascript.vim @dkearns
+runtime/ftplugin/javascriptreact.vim @dkearns
+runtime/ftplugin/kconfig.vim @chrisbra
+runtime/ftplugin/liquid.vim @tpope
+runtime/ftplugin/markdown.vim @tpope
+runtime/ftplugin/matlab.vim @cecamp
+runtime/ftplugin/nroff.vim @a-vrma
+runtime/ftplugin/nsis.vim @k-takata
+runtime/ftplugin/pdf.vim @tpope
+runtime/ftplugin/ruby.vim @tpope @dkearns
+runtime/ftplugin/sass.vim @tpope
+runtime/ftplugin/scss.vim @tpope
+runtime/ftplugin/spec.vim @ignatenkobrain
+runtime/ftplugin/tidy.vim @dkearns
+runtime/ftplugin/tmux.vim @ericpruitt
+runtime/ftplugin/typescript.vim @dkearns
+runtime/ftplugin/typescriptreact.vim @dkearns
+runtime/ftplugin/xml.vim @chrisbra
+runtime/ftplugin/zsh.vim @chrisbra
+runtime/indent/bst.vim @tpope
+runtime/indent/cucumber.vim @tpope
+runtime/indent/dosbatch.vim @k-takata
+runtime/indent/eruby.vim @tpope @dkearns
+runtime/indent/gitconfig.vim @tpope
+runtime/indent/haml.vim @tpope
+runtime/indent/liquid.vim @tpope
+runtime/indent/nsis.vim @k-takata
+runtime/indent/ruby.vim @AndrewRadev @dkearns
+runtime/indent/sass.vim @tpope
+runtime/indent/scss.vim @tpope
+runtime/indent/sh.vim @chrisbra
+runtime/indent/teraterm.vim @k-takata
+runtime/indent/xml.vim @chrisbra
+runtime/indent/zsh.vim @chrisbra
+runtime/keymap/tamil_tscii.vim @yegappan
+runtime/pack/dist/opt/cfilter/plugin/cfilter.vim @yegappan
+runtime/pack/dist/opt/matchit/ @chrisbra
+runtime/plugin/getscriptPlugin.vim @cecamp
+runtime/plugin/logiPat.vim @cecamp
+runtime/plugin/netrwPlugin.vim @cecamp
+runtime/plugin/tarPlugin.vim @cecamp
+runtime/plugin/vimballPlugin.vim @cecamp
+runtime/plugin/zipPlugin.vim @cecamp
+runtime/syntax/aidl.vim @dpelle
+runtime/syntax/amiga.vim @cecamp
+runtime/syntax/asm.vim @dkearns
+runtime/syntax/asmh8300.vim @dkearns
+runtime/syntax/awk.vim @dkearns
+runtime/syntax/basic.vim @dkearns
+runtime/syntax/bst.vim @tpope
+runtime/syntax/cabal.vim @coot
+runtime/syntax/cabalconfig.vim @coot
+runtime/syntax/cabalproject.vim @coot
+runtime/syntax/cs.vim @nickspoons
+runtime/syntax/csh.vim @cecamp
+runtime/syntax/cucumber.vim @tpope
+runtime/syntax/datascript.vim @dpelle
+runtime/syntax/dcl.vim @cecamp
+runtime/syntax/doxygen.vim @frogonwheels
+runtime/syntax/dtd.vim @chrisbra
+runtime/syntax/elmfilt.vim @cecamp
+runtime/syntax/eruby.vim @tpope @dkearns
+runtime/syntax/exports.vim @cecamp
+runtime/syntax/git.vim @tpope
+runtime/syntax/gitcommit.vim @tpope
+runtime/syntax/gitconfig.vim @tpope
+runtime/syntax/gitrebase.vim @tpope
+runtime/syntax/gprof.vim @dpelle
+runtime/syntax/haml.vim @tpope
+runtime/syntax/haskell.vim @coot
+runtime/syntax/hgcommit.vim @k-takata
+runtime/syntax/kconfig.vim @chrisbra
+runtime/syntax/lex.vim @cecamp
+runtime/syntax/liquid.vim @tpope
+runtime/syntax/lisp.vim @cecamp
+runtime/syntax/lynx.vim @dkearns
+runtime/syntax/mailcap.vim @dkearns
+runtime/syntax/make.vim @rohieb
+runtime/syntax/make.vim @rohieb
+runtime/syntax/maple.vim @cecamp
+runtime/syntax/markdown.vim @tpope
+runtime/syntax/netrw.vim @cecamp
+runtime/syntax/nsis.vim @k-takata
+runtime/syntax/pdf.vim @tpope
+runtime/syntax/php.vim @TysonAndre
+runtime/syntax/privoxy.vim @dkearns
+runtime/syntax/prolog.vim @XVilka
+runtime/syntax/rc.vim @chrisbra
+runtime/syntax/rpcgen.vim @cecamp
+runtime/syntax/ruby.vim @dkearns
+runtime/syntax/sass.vim @tpope
+runtime/syntax/scss.vim @tpope
+runtime/syntax/sh.vim @cecamp
+runtime/syntax/sm.vim @cecamp
+runtime/syntax/spec.vim @ignatenkobrain
+runtime/syntax/sqloracle.vim @chrisbra
+runtime/syntax/sshdconfig.vim @Jakuje
+runtime/syntax/tags.vim @cecamp
+runtime/syntax/teraterm.vim @k-takata
+runtime/syntax/tex.vim @cecamp
+runtime/syntax/tidy.vim @dkearns
+runtime/syntax/tmux.vim @ericpruitt
+runtime/syntax/vim.vim @cecamp
+runtime/syntax/wget.vim @dkearns
+runtime/syntax/xbl.vim @dkearns
+runtime/syntax/xmath.vim @cecamp
+runtime/syntax/xml.vim @chrisbra
+runtime/syntax/xslt.vim @Boobies
+runtime/syntax/xxd.vim @cecamp
+runtime/syntax/yacc.vim @cecamp
+runtime/syntax/zsh.vim @chrisbra
+runtime/tutor/tutor.eo @dpelle
+runtime/tutor/tutor.eo.utf-8 @dpelle
+runtime/tutor/tutor.fr @dpelle
+runtime/tutor/tutor.fr.utf-8 @dpelle
+src/po/de.po @chrisbra
+src/po/eo.po @dpelle
+src/po/fr.po @dpelle
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..1d7ad39
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+custom: https://www.vim.org/sponsor/index.php
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..eb9ae4d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,34 @@
+---
+name: Bug report
+about: Create a report to help us improve Vim
+title: ''
+labels: ''
+
+---
+
+_Instructions: Replace the template text and remove irrelevant text (including this line)_
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+(Issues related to the runtime files should be reported to their maintainer, check the file header.)
+
+**To Reproduce**
+Detailed steps to reproduce the behavior:
+1. Run `vim --clean` (or `gvim --clean`, etc.)
+2. Edit `filename`
+3. Type '....'
+4. Describe the error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, copy/paste the text or add screenshots to help explain your problem.
+
+**Environment (please complete the following information):**
+ - Vim version [e.g. 8.1.1234] (Or paste the result of `vim --version`.)
+ - OS: [e.g. Ubuntu 18.04, Windows 10 1809, macOS 10.14]
+ - Terminal: [e.g. GNOME Terminal, mintty, iTerm2, tmux, GNU screen] (Use GUI if you use the GUI.)
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..8fa535d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,22 @@
+---
+name: Feature request
+about: Suggest an enhancement for Vim
+title: ''
+labels: enhancement
+
+---
+
+_Instructions: Replace the template text and remove irrelevant text (including this line)_
+
+**Is your feature request about something that is currently impossible or hard to do? Please describe the problem.**
+A clear and concise description of what is hard to do. Ex. It is difficult to [...] when [...]
+(If it is related to runtime files, please check their header for where to discuss enhancements.)
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..adbbb1f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,526 @@
+name: GitHub CI
+
+on:
+ push:
+ branches: ['**']
+ pull_request:
+
+jobs:
+ linux:
+ runs-on: ubuntu-latest
+
+ env:
+ CC: ${{ matrix.compiler }}
+ TEST: test
+ SRCDIR: ./src
+ LEAK_CFLAGS: -DEXITFREE
+ LOG_DIR: ${{ github.workspace }}/logs
+ TERM: xterm
+ DISPLAY: ':99'
+ DEBIAN_FRONTEND: noninteractive
+
+ strategy:
+ fail-fast: false
+ matrix:
+ features: [tiny, small, normal, huge]
+ compiler: [clang, gcc]
+ extra: [none]
+ include:
+ - features: tiny
+ compiler: clang
+ extra: nogui
+ - features: tiny
+ compiler: gcc
+ extra: nogui
+ - features: normal
+ shadow: ./src/shadow
+ - features: huge
+ coverage: true
+ - features: huge
+ compiler: gcc
+ coverage: true
+ extra: testgui
+ - features: huge
+ compiler: clang
+ extra: asan
+ - features: huge
+ compiler: gcc
+ coverage: true
+ extra: unittests
+ - features: normal
+ compiler: gcc
+ extra: vimtags
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install packages
+ run: |
+ sudo apt-get install -y \
+ autoconf \
+ lcov \
+ gettext \
+ libcanberra-dev \
+ libperl-dev \
+ python-dev \
+ python3-dev \
+ liblua5.3-dev \
+ lua5.3 \
+ ruby-dev \
+ tcl-dev \
+ cscope \
+ libgtk2.0-dev \
+ desktop-file-utils \
+ libtool-bin
+
+ - name: Install clang-11
+ if: matrix.compiler == 'clang'
+ run: |
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
+ . /etc/lsb-release
+ sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-11 main"
+ sudo apt-get install -y clang-11
+ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 100
+ sudo update-alternatives --set clang /usr/bin/clang-11
+ sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-11 100
+
+ - name: Set up environment
+ run: |
+ mkdir -p "${LOG_DIR}"
+ mkdir -p "${HOME}/bin"
+ echo "${HOME}/bin" >> $GITHUB_PATH
+ (
+ echo "LINUX_VERSION=$(uname -r)"
+ echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
+ echo "SND_DUMMY_DIR=${HOME}/snd-dummy"
+ echo "TMPDIR=${{ runner.temp }}"
+
+ case "${{ matrix.features }}" in
+ tiny|small)
+ echo "TEST=testtiny"
+ if ${{ contains(matrix.extra, 'nogui') }}; then
+ echo "CONFOPT=--disable-gui"
+ fi
+ ;;
+ normal)
+ ;;
+ huge)
+ echo "TEST=scripttests test_libvterm"
+ echo "CONFOPT=--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
+ ;;
+ esac
+
+ if ${{ matrix.coverage == true }}; then
+ echo "CFLAGS=--coverage -DUSE_GCOV_FLUSH"
+ echo "LDFLAGS=--coverage"
+ fi
+ if ${{ contains(matrix.extra, 'testgui') }}; then
+ echo "TEST=-C src testgui"
+ fi
+ if ${{ contains(matrix.extra, 'unittests') }}; then
+ echo "TEST=unittests"
+ fi
+ if ${{ contains(matrix.extra, 'asan') }}; then
+ echo "SANITIZER_CFLAGS=-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
+ echo "ASAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/asan"
+ echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/ubsan"
+ echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
+ fi
+ if ${{ contains(matrix.extra, 'vimtags') }}; then
+ echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
+ fi
+ ) >> $GITHUB_ENV
+
+ - name: Set up system
+ run: |
+ if [[ ${CC} = clang ]]; then
+ # Use llvm-cov instead of gcov when compiler is clang.
+ ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
+ fi
+ # Setup lua5.3 manually since its package doesn't provide alternative.
+ # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
+ if [[ ${CONFOPT} =~ luainterp ]]; then
+ sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10
+ fi
+ sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
+ sudo usermod -a -G audio "${USER}"
+ sudo bash ci/setup-xvfb.sh
+
+ - name: Cache snd-dummy
+ uses: actions/cache@v2
+ with:
+ path: ${{ env.SND_DUMMY_DIR }}
+ key: linux-${{ env.LINUX_VERSION }}-snd-dummy
+
+ - name: Set up snd-dummy
+ run: |
+ if [[ ! -e ${SND_DUMMY_DIR}/snd-dummy.ko ]]; then
+ bash ci/build-snd-dummy.sh
+ fi
+ cd "${SND_DUMMY_DIR}"
+ sudo insmod soundcore.ko
+ sudo insmod snd.ko
+ sudo insmod snd-pcm.ko
+ sudo insmod snd-dummy.ko
+
+ - name: Check autoconf
+ if: contains(matrix.extra, 'unittests')
+ run: |
+ make -C src autoconf
+
+ - name: Set up shadow dir
+ if: matrix.shadow
+ run: |
+ make -C src shadow
+ echo "SRCDIR=${{ matrix.shadow }}" >> $GITHUB_ENV
+ echo "SHADOWOPT=-C ${{ matrix.shadow }}" >> $GITHUB_ENV
+
+ - name: Configure
+ run: |
+ ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
+ # Append various warning flags to CFLAGS.
+ sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
+ sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
+
+ - name: Build
+ if: (!contains(matrix.extra, 'unittests'))
+ run: |
+ make ${SHADOWOPT} -j${NPROC}
+
+ - name: Check version
+ if: (!contains(matrix.extra, 'unittests'))
+ run: |
+ "${SRCDIR}"/vim --version
+ "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
+ "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
+
+ - name: Test
+ timeout-minutes: 20
+ run: |
+ do_test() { sg audio "sg $(id -gn) '$*'"; }
+ do_test make ${SHADOWOPT} ${TEST}
+
+ - name: Coveralls
+ if: matrix.coverage && success() && github.event_name != 'pull_request'
+ env:
+ COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
+ COVERALLS_PARALLEL: true
+ TRAVIS_JOB_ID: ${{ github.run_id }}
+ run: |
+ sudo apt-get install -y python3-setuptools python3-wheel
+ # needed for https support for coveralls building cffi only works with gcc, not with clang
+ CC=gcc pip3 install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
+ ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
+
+ - name: Codecov
+ if: matrix.coverage && success()
+ run: |
+ cd "${SRCDIR}"
+ bash <(curl -s https://codecov.io/bash) -F "${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}"
+
+ - name: ASan logs
+ if: contains(matrix.extra, 'asan') && !cancelled()
+ run: |
+ for f in $(grep -lR '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "${LOG_DIR}"); do
+ asan_symbolize-11 -l "$f"
+ false # in order to fail a job
+ done
+
+ coveralls:
+ runs-on: ubuntu-latest
+
+ needs: linux
+ if: always() && github.event_name != 'pull_request'
+
+ steps:
+ - name: Parallel finished
+ env:
+ COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
+ run: |
+ curl -k "https://coveralls.io/webhook?repo_token=${COVERALLS_REPO_TOKEN}" -d "payload[build_num]=${GITHUB_RUN_ID}&payload[status]=done"
+
+ macos:
+ runs-on: macos-latest
+
+ env:
+ CC: ${{ matrix.compiler }}
+ TEST: test
+ SRCDIR: ./src
+ LEAK_CFLAGS: -DEXITFREE
+ TERM: xterm
+
+ strategy:
+ fail-fast: false
+ matrix:
+ features: [tiny, huge]
+ compiler: [clang, gcc]
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install packages
+ env:
+ HOMEBREW_NO_AUTO_UPDATE: 1
+ run: |
+ brew install lua
+ echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
+
+ - name: Set up environment
+ run: |
+ (
+ echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
+ case "${{ matrix.features }}" in
+ tiny)
+ echo "TEST=testtiny"
+ echo "CONFOPT=--disable-gui"
+ ;;
+ huge)
+ echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
+ ;;
+ esac
+ ) >> $GITHUB_ENV
+
+ - name: Configure
+ run: |
+ ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
+ # Append various warning flags to CFLAGS.
+ # BSD sed needs backup extension specified.
+ sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
+ # On macOS, the entity of gcc is clang.
+ sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
+
+ - name: Build
+ env:
+ LC_ALL: C
+ run: |
+ make -j${NPROC}
+
+ - name: Check version
+ run: |
+ "${SRCDIR}"/vim --version
+ "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
+ "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
+
+ - name: Test
+ timeout-minutes: 20
+ run: |
+ make ${TEST}
+
+ windows:
+ runs-on: windows-latest
+
+ env:
+ VCVARSALL: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
+ # Interfaces
+ # Lua
+ LUA_VER: 54
+ LUA_VER_DOT: '5.4'
+ LUA_RELEASE: 5.4.0
+ LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
+ LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
+ LUA_DIR: D:\Lua
+ # Python 2
+ PYTHON_VER: 27
+ PYTHON_VER_DOT: '2.7'
+ # Python 3
+ PYTHON3_VER: 38
+ PYTHON3_VER_DOT: '3.8'
+ # Other dependencies
+ # winpty
+ WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
+ # Escape sequences
+ COL_RED: "\x1b[31m"
+ COL_GREEN: "\x1b[32m"
+ COL_YELLOW: "\x1b[33m"
+ COL_RESET: "\x1b[m"
+
+ strategy:
+ fail-fast: false
+ matrix:
+ toolchain: [msvc, mingw]
+ arch: [x64, x86]
+ features: [HUGE, NORMAL]
+ include:
+ - arch: x64
+ vcarch: amd64
+ warch: x64
+ bits: 64
+ msystem: MINGW64
+ cygreg: registry
+ pyreg: ""
+ - arch: x86
+ vcarch: x86
+ warch: ia32
+ bits: 32
+ msystem: MINGW32
+ cygreg: registry32
+ pyreg: "-32"
+ exclude:
+ - toolchain: msvc
+ arch: x64
+ features: NORMAL
+ - toolchain: mingw
+ arch: x86
+ features: NORMAL
+
+ steps:
+ - name: Initalize
+ id: init
+ shell: bash
+ run: |
+ git config --global core.autocrlf input
+ python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
+ python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
+ echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
+ echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
+
+ - uses: msys2/setup-msys2@v2
+ if: matrix.toolchain == 'mingw'
+ with:
+ msystem: ${{ matrix.msystem }}
+ release: false
+
+ - uses: actions/checkout@v2
+
+ - name: Create a list of download URLs
+ shell: cmd
+ run: |
+ type NUL > urls.txt
+ echo %LUA_RELEASE%>> urls.txt
+ echo %WINPTY_URL%>> urls.txt
+
+ - name: Cache downloaded files
+ uses: actions/cache@v2
+ with:
+ path: downloads
+ key: ${{ runner.os }}-${{ matrix.bits }}-${{ hashFiles('urls.txt') }}
+
+ - name: Download dependencies
+ shell: cmd
+ run: |
+ path C:\Program Files\7-Zip;%path%
+ if not exist downloads mkdir downloads
+
+ echo %COL_GREEN%Download Lua%COL_RESET%
+ call :downloadfile %LUA${{ matrix.bits }}_URL% downloads\lua.zip
+ 7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
+
+ echo %COL_GREEN%Download winpty%COL_RESET%
+ call :downloadfile %WINPTY_URL% downloads\winpty.zip
+ 7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
+ copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty.dll src\winpty${{ matrix.bits }}.dll
+ copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty-agent.exe src\
+
+ goto :eof
+
+ :downloadfile
+ :: call :downloadfile <URL> <localfile>
+ if not exist %2 (
+ curl -f -L %1 -o %2
+ )
+ if ERRORLEVEL 1 (
+ rem Retry once.
+ curl -f -L %1 -o %2 || exit 1
+ )
+ goto :eof
+
+ - name: Copy src directory to src2
+ shell: cmd
+ run: |
+ xcopy src src2\ /E > nul
+
+ - name: Build (MSVC)
+ if: matrix.toolchain == 'msvc'
+ shell: cmd
+ run: |
+ call "%VCVARSALL%" ${{ matrix.vcarch }}
+ cd src
+ :: Filter out the progress bar from the build log
+ sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
+ if "${{ matrix.features }}"=="HUGE" (
+ nmake -nologo -f Make_mvc2.mak ^
+ FEATURES=${{ matrix.features }} ^
+ GUI=yes IME=yes ICONV=yes VIMDLL=yes ^
+ DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
+ DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
+ DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
+ ) else (
+ nmake -nologo -f Make_mvc2.mak ^
+ FEATURES=${{ matrix.features }} ^
+ GUI=yes IME=yes ICONV=yes VIMDLL=yes
+ )
+ if not exist vim${{ matrix.bits }}.dll (
+ echo %COL_RED%Build failure.%COL_RESET%
+ exit 1
+ )
+
+ - name: Build (MinGW)
+ if: matrix.toolchain == 'mingw'
+ shell: msys2 {0}
+ run: |
+ cd src
+ if [ "${{ matrix.features }}" = "HUGE" ]; then
+ mingw32-make -f Make_ming.mak -j2 \
+ FEATURES=${{ matrix.features }} \
+ GUI=yes IME=yes ICONV=yes VIMDLL=yes \
+ DYNAMIC_LUA=yes LUA=${LUA_DIR} \
+ DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
+ DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
+ STATIC_STDCPLUS=yes
+ else
+ mingw32-make -f Make_ming.mak -j2 \
+ FEATURES=${{ matrix.features }} \
+ GUI=yes IME=yes ICONV=yes VIMDLL=yes \
+ STATIC_STDCPLUS=yes
+ fi
+
+ #- name: Prepare Artifact
+ # shell: cmd
+ # run: |
+ # mkdir artifacts
+ # copy src\*vim.exe artifacts
+ # copy src\vim*.dll artifacts
+ #
+ #- name: Upload Artifact
+ # uses: actions/upload-artifact@v1
+ # with:
+ # name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
+ # path: ./artifacts
+
+ - name: Test
+ shell: cmd
+ timeout-minutes: 20
+ run: |
+ PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
+ call "%VCVARSALL%" ${{ matrix.vcarch }}
+ cd src
+ echo.
+ echo %COL_GREEN%vim version:%COL_RESET%
+ .\vim --version || exit 1
+
+ echo %COL_GREEN%Start testing vim in background.%COL_RESET%
+ start cmd /c "cd ..\src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
+
+ echo %COL_GREEN%Test gvim:%COL_RESET%
+ cd testdir
+ nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
+ cd ..
+
+ echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
+ cd ..\src2\testdir
+ :: Wait about 10 minutes.
+ for /L %%i in (1,1,60) do (
+ if exist done.txt goto exitloop
+ timeout 10 > NUL 2>&1
+ if ERRORLEVEL 1 ping -n 11 localhost > NUL
+ )
+ set timeout=1
+ :exitloop
+
+ echo %COL_GREEN%Test results of vim:%COL_RESET%
+ if exist messages type messages
+ nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
+ if "%timeout%"=="1" (
+ echo %COL_RED%Timed out.%COL_RESET%
+ exit 1
+ )
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..ef98000
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,62 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+name: "CodeQL"
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [master]
+ schedule:
+ - cron: '0 18 * * 1'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ # Override automatic language detection by changing the below list
+ # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
+ language: ['cpp', 'python']
+ # Learn more...
+ # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v1
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v1
+
+ # ℹī¸ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
+
+ # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1