2020-11-12 11:22:14 -07:00
|
|
|
name: Linux CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
|
|
# Set "false" to force rebuild of third-party dependencies.
|
|
|
|
CACHE_ENABLE: true
|
|
|
|
DEPS_CMAKE_FLAGS: "-DUSE_BUNDLED_GPERF=OFF"
|
|
|
|
# default target name for functional tests
|
|
|
|
FUNCTIONALTEST: functionaltest
|
|
|
|
CI_TARGET: tests
|
|
|
|
# Environment variables for ccache
|
|
|
|
CCACHE_COMPRESS: 1
|
|
|
|
CCACHE_SLOPPINESS: "time_macros,file_macro"
|
|
|
|
# Default since 3.3; required with newer gcc/clang.
|
|
|
|
CCACHE_CPP2: 1
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ASAN:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
CC: clang-11
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup commom environment variables
|
|
|
|
run: |
|
2020-11-13 07:21:41 -07:00
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
|
2020-11-12 11:22:14 -07:00
|
|
|
echo "CI_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
|
|
|
echo "BUILD_DIR=$GITHUB_WORKSPACE/build" >> $GITHUB_ENV
|
|
|
|
echo "DEPS_BUILD_DIR=$HOME/nvim-deps" >> $GITHUB_ENV
|
|
|
|
echo "INSTALL_PREFIX=$HOME/nvim-install" >> $GITHUB_ENV
|
|
|
|
echo "LOG_DIR=$GITHUB_WORKSPACE/build/log" >> $GITHUB_ENV
|
|
|
|
echo "NVIM_LOG_FILE=$GITHUB_WORKSPACE/build/.nvimlog" >> $GITHUB_ENV
|
|
|
|
echo "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" >> $GITHUB_ENV
|
|
|
|
echo "ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan" >> $GITHUB_ENV
|
|
|
|
echo "TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan" >> $GITHUB_ENV
|
|
|
|
echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=$GITHUB_WORKSPACE/build/log/ubsan" >> $GITHUB_ENV
|
|
|
|
echo "VALGRIND_LOG=$GITHUB_WORKSPACE/build/log/valgrind-%p.log" >> $GITHUB_ENV
|
|
|
|
echo "CACHE_NVIM_DEPS_DIR=$HOME/.cache/nvim-deps" >> $GITHUB_ENV
|
|
|
|
echo "CACHE_MARKER=$HOME/.cache/nvim-deps/.ci_cache_marker" >> $GITHUB_ENV
|
|
|
|
echo "CCACHE_BASEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Setup clang repository
|
|
|
|
run: |
|
|
|
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
|
|
|
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
|
|
|
|
|
|
|
|
- name: Install apt packages
|
|
|
|
run: |
|
|
|
|
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 python python-pip python-setuptools python3 python3-pip python3-setuptools unzip valgrind xclip
|
|
|
|
|
|
|
|
- name: Install new clang
|
|
|
|
run: sudo apt-get install -y clang-11
|
|
|
|
|
|
|
|
- name: Set ASAN env vars
|
|
|
|
run: |
|
|
|
|
echo "CLANG_SANITIZER=ASAN_UBSAN" >> $GITHUB_ENV
|
|
|
|
echo "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 -DPREFER_LUA=ON" >> $GITHUB_ENV
|
|
|
|
echo "SYMBOLIZER=asan_symbolize-11" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Setup interpreter packages
|
|
|
|
run: |
|
|
|
|
./ci/before_install.sh
|
|
|
|
./ci/install.sh
|
|
|
|
|
|
|
|
- name: Cache dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: asan-deps
|
|
|
|
with:
|
2020-11-13 07:54:55 -07:00
|
|
|
path: |
|
|
|
|
${{ env.CACHE_NVIM_DEPS_DIR }}
|
|
|
|
~/.ccache
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles(format('{0}/**', env.CACHE_NVIM_DEPS_DIR)) }}-${{ github.base_ref }}
|
2020-11-12 11:22:14 -07:00
|
|
|
|
|
|
|
- name: Build third-party
|
|
|
|
run: ./ci/before_script.sh
|
|
|
|
|
|
|
|
- name: Build and test
|
|
|
|
run: ./ci/script.sh
|
2020-11-12 20:00:04 -07:00
|
|
|
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
CI_TARGET: lint
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup commom environment variables
|
|
|
|
run: |
|
2020-11-13 07:21:41 -07:00
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
|
2020-11-12 20:00:04 -07:00
|
|
|
echo "CI_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
|
|
|
echo "BUILD_DIR=$GITHUB_WORKSPACE/build" >> $GITHUB_ENV
|
|
|
|
echo "DEPS_BUILD_DIR=$HOME/nvim-deps" >> $GITHUB_ENV
|
|
|
|
echo "INSTALL_PREFIX=$HOME/nvim-install" >> $GITHUB_ENV
|
|
|
|
echo "LOG_DIR=$GITHUB_WORKSPACE/build/log" >> $GITHUB_ENV
|
|
|
|
echo "NVIM_LOG_FILE=$GITHUB_WORKSPACE/build/.nvimlog" >> $GITHUB_ENV
|
|
|
|
echo "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" >> $GITHUB_ENV
|
|
|
|
echo "ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan" >> $GITHUB_ENV
|
|
|
|
echo "TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan" >> $GITHUB_ENV
|
|
|
|
echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=$GITHUB_WORKSPACE/build/log/ubsan" >> $GITHUB_ENV
|
|
|
|
echo "VALGRIND_LOG=$GITHUB_WORKSPACE/build/log/valgrind-%p.log" >> $GITHUB_ENV
|
|
|
|
echo "CACHE_NVIM_DEPS_DIR=$HOME/.cache/nvim-deps" >> $GITHUB_ENV
|
|
|
|
echo "CACHE_MARKER=$HOME/.cache/nvim-deps/.ci_cache_marker" >> $GITHUB_ENV
|
|
|
|
echo "CCACHE_BASEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Install apt packages
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y autoconf automake build-essential ccache cmake gcc-multilib gettext gperf libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip
|
|
|
|
|
|
|
|
- name: Setup interpreter packages
|
|
|
|
run: |
|
|
|
|
./ci/before_install.sh
|
|
|
|
./ci/install.sh
|
|
|
|
|
|
|
|
- name: Cache dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: lint-deps
|
|
|
|
with:
|
2020-11-13 07:54:55 -07:00
|
|
|
path: |
|
|
|
|
${{ env.CACHE_NVIM_DEPS_DIR }}
|
|
|
|
~/.ccache
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles(format('{0}/**', env.CACHE_NVIM_DEPS_DIR)) }}-${{ github.base_ref }}
|
2020-11-12 20:00:04 -07:00
|
|
|
|
|
|
|
- name: Build third-party
|
|
|
|
run: ./ci/before_script.sh
|
|
|
|
|
|
|
|
- name: Build and test
|
|
|
|
run: ./ci/script.sh
|