diff options
-rw-r--r-- | .coveralls.yml | 1 | ||||
-rw-r--r-- | .github/workflows/ci-windows.yaml | 230 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 519 | ||||
-rw-r--r-- | .travis.yml | 200 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | ci/build-snd-dummy.sh | 19 | ||||
-rw-r--r-- | ci/setup-xvfb.sh | 17 | ||||
-rw-r--r-- | src/version.c | 2 |
8 files changed, 660 insertions, 331 deletions
diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 000000000..1157ff256 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +service_name: github-actions diff --git a/.github/workflows/ci-windows.yaml b/.github/workflows/ci-windows.yaml deleted file mode 100644 index 4a470624b..000000000 --- a/.github/workflows/ci-windows.yaml +++ /dev/null @@ -1,230 +0,0 @@ -name: GitHub CI - -on: - push: - branches: - - '**' - pull_request: - -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" - -jobs: - build: - runs-on: windows-latest - - 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/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..758da09b6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,519 @@ +name: GitHub CI + +on: [push, 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' + + 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 + env: + DEBIAN_FRONTEND: noninteractive + 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 + if [[ ${CC} = clang ]]; then + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository -y "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-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 + fi + + - 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. + # BSD sed needs backup extension specified. + sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk + sed -i.bak -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() + 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) + + - 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() + + 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 + 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/.travis.yml b/.travis.yml index b89f27677..d60037c3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -172,56 +172,56 @@ script: # Linux: 2 compilers on some of the environments + gcc on os390 jobs: include: - - <<: *osx - name: tiny-nogui/clang - compiler: clang - env: *tiny-nogui - - <<: *osx - name: tiny-nogui/gcc - compiler: gcc - env: *tiny-nogui - - <<: *osx - <<: *osx-homebrew - name: huge/clang - compiler: clang - env: *osx-huge - - <<: *osx - <<: *osx-homebrew - name: huge/gcc - compiler: gcc - env: *osx-huge - - <<: *linux - name: tiny-nogui/clang - compiler: clang - env: *tiny-nogui - - <<: *linux - name: tiny-nogui/gcc - compiler: gcc - env: *tiny-nogui - - <<: *linux - name: tiny/clang - compiler: clang - env: *tiny - - <<: *linux - name: tiny/gcc - compiler: gcc - env: *tiny - - <<: *linux - name: small/gcc - compiler: gcc - env: *small - - <<: *linux - name: normal+shadow/clang - compiler: clang - env: - - *normal - - *shadowopt - - <<: *linux - name: normal+shadow/gcc - compiler: gcc - env: - - *normal - - *shadowopt + #- <<: *osx + # name: tiny-nogui/clang + # compiler: clang + # env: *tiny-nogui + #- <<: *osx + # name: tiny-nogui/gcc + # compiler: gcc + # env: *tiny-nogui + #- <<: *osx + # <<: *osx-homebrew + # name: huge/clang + # compiler: clang + # env: *osx-huge + #- <<: *osx + # <<: *osx-homebrew + # name: huge/gcc + # compiler: gcc + # env: *osx-huge + #- <<: *linux + # name: tiny-nogui/clang + # compiler: clang + # env: *tiny-nogui + #- <<: *linux + # name: tiny-nogui/gcc + # compiler: gcc + # env: *tiny-nogui + #- <<: *linux + # name: tiny/clang + # compiler: clang + # env: *tiny + #- <<: *linux + # name: tiny/gcc + # compiler: gcc + # env: *tiny + #- <<: *linux + # name: small/gcc + # compiler: gcc + # env: *small + #- <<: *linux + # name: normal+shadow/clang + # compiler: clang + # env: + # - *normal + # - *shadowopt + #- <<: *linux + # name: normal+shadow/gcc + # compiler: gcc + # env: + # - *normal + # - *shadowopt - <<: *linux arch: s390x name: huge/gcc-s390x @@ -234,55 +234,55 @@ jobs: compiler: gcc env: *linux-huge services: [] - - <<: *linux - name: huge+coverage/clang - compiler: clang - env: - - *linux-huge - - *coverage - after_success: *eval-coverage - - <<: *linux - name: huge+coverage/gcc - compiler: gcc - env: - - *linux-huge - - *coverage - after_success: *eval-coverage - - <<: *linux # ASAN - name: huge+asan/clang - compiler: clang-11 - addons: - apt: - sources: - - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main' - key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' - packages: - - *apt-packages - - clang-11 - env: - - *linux-huge - - *asan - after_failure: *asan_symbolize - - <<: *linux - name: huge-testgui+coverage/gcc - compiler: gcc - env: - - *linux-huge - - *coverage - - TEST="-C src testgui" - after_success: *eval-coverage - - <<: *linux - name: unittests+coverage/gcc - compiler: gcc - env: - - *unittests - - *coverage - after_success: *eval-coverage - - <<: *linux - name: vimtags/gcc - compiler: gcc - env: - - *normal - - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim" + #- <<: *linux + # name: huge+coverage/clang + # compiler: clang + # env: + # - *linux-huge + # - *coverage + # after_success: *eval-coverage + #- <<: *linux + # name: huge+coverage/gcc + # compiler: gcc + # env: + # - *linux-huge + # - *coverage + # after_success: *eval-coverage + #- <<: *linux # ASAN + # name: huge+asan/clang + # compiler: clang-11 + # addons: + # apt: + # sources: + # - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main' + # key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' + # packages: + # - *apt-packages + # - clang-11 + # env: + # - *linux-huge + # - *asan + # after_failure: *asan_symbolize + #- <<: *linux + # name: huge-testgui+coverage/gcc + # compiler: gcc + # env: + # - *linux-huge + # - *coverage + # - TEST="-C src testgui" + # after_success: *eval-coverage + #- <<: *linux + # name: unittests+coverage/gcc + # compiler: gcc + # env: + # - *unittests + # - *coverage + # after_success: *eval-coverage + #- <<: *linux + # name: vimtags/gcc + # compiler: gcc + # env: + # - *normal + # - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim" # vim:set sts=2 sw=2 tw=0 et: @@ -1,14 +1,15 @@ ![Vim Logo](https://github.com/vim/vim/blob/master/runtime/vimlogo.gif) +[![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Travis Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) -[![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) + For translations of this README see the end. diff --git a/ci/build-snd-dummy.sh b/ci/build-snd-dummy.sh new file mode 100644 index 000000000..a2380b4b1 --- /dev/null +++ b/ci/build-snd-dummy.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -eu + +LINUX_VERSION=$(uname -r | cut -d. -f1-2) +LINUX_ARCHIVE_FILE=v${LINUX_VERSION}.tar.gz +LINUX_SOURCE_DIR=linux-${LINUX_VERSION} + +mkdir -p "${TMPDIR}" +cd "${TMPDIR}" + +wget -q "https://github.com/torvalds/linux/archive/${LINUX_ARCHIVE_FILE}" + +tar -xf "${LINUX_ARCHIVE_FILE}" "${LINUX_SOURCE_DIR}/sound" +cd "${LINUX_SOURCE_DIR}/sound" + +CC=gcc make -C "/lib/modules/$(uname -r)/build" M="${PWD}" CONFIG_SOUND=m CONFIG_SND=m CONFIG_SND_PCM=m CONFIG_SND_DUMMY=m modules + +mkdir -p "${SND_DUMMY_DIR}" +cp soundcore.ko core/snd.ko core/snd-pcm.ko drivers/snd-dummy.ko "${SND_DUMMY_DIR}" diff --git a/ci/setup-xvfb.sh b/ci/setup-xvfb.sh new file mode 100644 index 000000000..cfc0f97bb --- /dev/null +++ b/ci/setup-xvfb.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e + +apt-get install -y xvfb + +cat <<EOT >/etc/systemd/system/xvfb.service +[Unit] +Description=X Virtual Frame Buffer Service +After=network.target +[Service] +ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24 +[Install] +WantedBy=multi-user.target +EOT + +systemctl enable xvfb.service +systemctl start xvfb.service diff --git a/src/version.c b/src/version.c index 95633c8f2..86ccdd618 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2150, +/**/ 2149, /**/ 2148, |