mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
Merge pull request #13373 from jamessan/github-actions
This commit is contained in:
@@ -1,21 +1,31 @@
|
|||||||
name: Linux CI
|
name: CI
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
build:
|
||||||
name: ${{ matrix.flavor }} (cc=${{ matrix.cc }})
|
name: ${{ matrix.os }} ${{ matrix.flavor }} (cc=${{ matrix.cc }})
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- flavor: asan
|
- flavor: asan
|
||||||
cc: clang-11
|
cc: clang-11
|
||||||
|
runner: ubuntu-20.04
|
||||||
|
os: linux
|
||||||
- flavor: lint
|
- flavor: lint
|
||||||
cc: gcc
|
cc: gcc
|
||||||
|
runner: ubuntu-20.04
|
||||||
|
os: linux
|
||||||
- flavor: tsan
|
- flavor: tsan
|
||||||
cc: clang-11
|
cc: clang-11
|
||||||
|
runner: ubuntu-20.04
|
||||||
|
os: linux
|
||||||
|
- cc: clang
|
||||||
|
runner: macos-10.15
|
||||||
|
os: osx
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
env:
|
env:
|
||||||
CC: ${{ matrix.cc }}
|
CC: ${{ matrix.cc }}
|
||||||
|
CI_OS_NAME: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@@ -29,6 +39,7 @@ jobs:
|
|||||||
sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main'
|
sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main'
|
||||||
|
|
||||||
- name: Install apt packages
|
- name: Install apt packages
|
||||||
|
if: matrix.os == 'linux'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus cscope gcc-multilib gdb gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip
|
sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus cscope gcc-multilib gdb gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip
|
||||||
@@ -37,6 +48,13 @@ jobs:
|
|||||||
if: matrix.flavor == 'asan' || matrix.flavor == 'tsan'
|
if: matrix.flavor == 'asan' || matrix.flavor == 'tsan'
|
||||||
run: sudo apt-get install -y clang-11
|
run: sudo apt-get install -y clang-11
|
||||||
|
|
||||||
|
- name: Install brew packages
|
||||||
|
if: matrix.os == 'osx'
|
||||||
|
run: |
|
||||||
|
brew update >/dev/null
|
||||||
|
brew install automake ccache cpanminus ninja
|
||||||
|
brew upgrade
|
||||||
|
|
||||||
- name: Setup interpreter packages
|
- name: Setup interpreter packages
|
||||||
run: |
|
run: |
|
||||||
./ci/before_install.sh
|
./ci/before_install.sh
|
3
.github/workflows/env.sh
vendored
3
.github/workflows/env.sh
vendored
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e -u
|
set -e -u
|
||||||
|
|
||||||
FLAVOR=$1
|
FLAVOR=${1:-}
|
||||||
|
|
||||||
cat <<EOF >> "$GITHUB_PATH"
|
cat <<EOF >> "$GITHUB_PATH"
|
||||||
$HOME/.local/bin
|
$HOME/.local/bin
|
||||||
@@ -24,6 +24,7 @@ DEPS_CMAKE_FLAGS=-DUSE_BUNDLED_GPERF=OFF
|
|||||||
FUNCTIONALTEST=functionaltest
|
FUNCTIONALTEST=functionaltest
|
||||||
CCACHE_COMPRESS=1
|
CCACHE_COMPRESS=1
|
||||||
CCACHE_SLOPPINESS=time_macros,file_macro
|
CCACHE_SLOPPINESS=time_macros,file_macro
|
||||||
|
CCACHE_DIR=$HOME/.ccache
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
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"
|
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"
|
||||||
|
@@ -54,6 +54,7 @@ env:
|
|||||||
- CCACHE_COMPRESS=1
|
- CCACHE_COMPRESS=1
|
||||||
- CCACHE_SLOPPINESS=time_macros,file_macro
|
- CCACHE_SLOPPINESS=time_macros,file_macro
|
||||||
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
|
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
|
||||||
|
- CI_OS_NAME="$TRAVIS_OS_NAME"
|
||||||
|
|
||||||
anchors:
|
anchors:
|
||||||
envs: &common-job-env
|
envs: &common-job-env
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
[Chat](https://gitter.im/neovim/neovim) |
|
[Chat](https://gitter.im/neovim/neovim) |
|
||||||
[Twitter](https://twitter.com/Neovim)
|
[Twitter](https://twitter.com/Neovim)
|
||||||
|
|
||||||
[](https://github.com/neovim/neovim/actions?query=workflow%3A%22Linux+CI%22)
|
[](https://github.com/neovim/neovim/actions?query=workflow%3A%22CI%22)
|
||||||
[](https://ci.appveyor.com/project/neovim/neovim/branch/master)
|
[](https://ci.appveyor.com/project/neovim/neovim/branch/master)
|
||||||
[](https://codecov.io/gh/neovim/neovim)
|
[](https://codecov.io/gh/neovim/neovim)
|
||||||
[](https://scan.coverity.com/projects/2227)
|
[](https://scan.coverity.com/projects/2227)
|
||||||
|
@@ -7,7 +7,7 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
source "${CI_DIR}/common/build.sh"
|
source "${CI_DIR}/common/build.sh"
|
||||||
|
|
||||||
# Enable ipv6 on Travis. ref: a39c8b7ce30d
|
# Enable ipv6 on Travis. ref: a39c8b7ce30d
|
||||||
if ! test "${TRAVIS_OS_NAME}" = osx ; then
|
if test -n "${TRAVIS_OS_NAME}" && ! test "${TRAVIS_OS_NAME}" = osx ; then
|
||||||
echo "before_script.sh: enable ipv6"
|
echo "before_script.sh: enable ipv6"
|
||||||
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
||||||
fi
|
fi
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
_stat() {
|
_stat() {
|
||||||
if test "${TRAVIS_OS_NAME}" = osx ; then
|
if test "${CI_OS_NAME}" = osx ; then
|
||||||
stat -f %Sm "${@}"
|
stat -f %Sm "${@}"
|
||||||
else
|
else
|
||||||
stat -c %y "${@}"
|
stat -c %y "${@}"
|
||||||
|
@@ -15,7 +15,7 @@ print_core() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
echo "======= Core file $core ======="
|
echo "======= Core file $core ======="
|
||||||
if test "${TRAVIS_OS_NAME}" = osx ; then
|
if test "${CI_OS_NAME}" = osx ; then
|
||||||
lldb -Q -o "bt all" -f "${app}" -c "${core}"
|
lldb -Q -o "bt all" -f "${app}" -c "${core}"
|
||||||
else
|
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}"
|
||||||
@@ -30,7 +30,7 @@ check_core_dumps() {
|
|||||||
fi
|
fi
|
||||||
local app="${1:-${BUILD_DIR}/bin/nvim}"
|
local app="${1:-${BUILD_DIR}/bin/nvim}"
|
||||||
local cores
|
local cores
|
||||||
if test "${TRAVIS_OS_NAME}" = osx ; then
|
if test "${CI_OS_NAME}" = osx ; then
|
||||||
cores="$(find /cores/ -type f -print)"
|
cores="$(find /cores/ -type f -print)"
|
||||||
local _sudo='sudo'
|
local _sudo='sudo'
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user