Skip to content

Implement simple type hierarchy support #499

Implement simple type hierarchy support

Implement simple type hierarchy support #499

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
unix-like:
strategy:
fail-fast: false
matrix:
runs-on: [ ubuntu-20.04, macos-12 ]
compiler: [ 'gcc' ] # Only used on linux
libclang: [ true ] # Only used on linux
benchmark: [ true, false ]
include:
- runs-on: ubuntu-20.04
compiler: 'clang'
benchmark: false
libclang: true
name_suffix: 'with Clang compiler - '
- runs-on: ubuntu-20.04
compiler: 'gcc'
benchmark: false
libclang: false
name_suffix: 'without libclang completer - '
env:
USE_CLANG_COMPLETER: ${{ matrix.libclang }}
COVERAGE: ${{ !matrix.benchmark }}
name: "${{ matrix.runs-on }} - ${{ matrix.name_suffix }}${{ matrix.benchmark && 'C++ Benchmark' || 'test run' }}"
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: actions/cache@v3
if: matrix.libclang == true && matrix.benchmark == false
with:
key: v3-libclang-${{ runner.os }}-${{ hashFiles( 'cpp/ycm/CMakeLists.txt' ) }}
restore-keys: |
v3-libclang-${{ runner.os }}-
v2-libclang-${{ runner.os }}-${{ hashFiles( 'cpp/ycm/CMakeLists.txt' ) }}
v2-libclang-${{ runner.os }}-
v1-libclang-${{ runner.os }}-
path: |
clang_archives
name: Cache libclang
- uses: actions/cache@v3
if: matrix.benchmark == false
with:
key: v2-deps-${{ runner.os }}-${{ hashFiles( 'build.py' ) }}
restore-keys: |
v2-deps-${{ runner.os }}-
v1-deps-${{ runner.os }}-
path: |
third-party/clangd/cache
third_party/eclipse.jdt.ls/target/cache
third_party/go
third_party/omnisharp-roslyn/v[0-9]*
name: Cache dependencies
- uses: actions/cache@v3
if: matrix.benchmark == false
with:
key: v2-testdeps-${{ runner.os }}-${{ hashFiles( 'run_tests.py' ) }}
restore-keys: |
v2-testdeps-${{ runner.os }}-
v1-testdeps-${{ runner.os }}-
path: |
third-party/lombok/cache
~/.npm
name: Cache test deps
- name: Install Java
if: matrix.benchmark == false
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Go
if: matrix.benchmark == false
uses: actions/setup-go@v4
with:
stable: true
- name: Install GCC
if: runner.os == 'Linux' && matrix.compiler != 'clang'
run: |
sudo apt-get update
sudo apt-get install gcc-8 g++-8
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-8 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 100
- name: Install Clang
if: runner.os == 'Linux' && matrix.compiler == 'clang'
run: |
sudo apt-get update
sudo apt-get install clang-7
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-7 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-7 100
- name: Run pip and prepare coverage
if: matrix.benchmark == false
run: |
python3 -m pip install -r test_requirements.txt
echo -e "import coverage\ncoverage.process_startup()" > $(python -c "print(__import__('sysconfig').get_path('purelib'))")/sitecustomize.py
- name: Run tests
if: matrix.benchmark == false
run: python3 run_tests.py --quiet
- name: Run benchmarks
if: matrix.benchmark == true
run: python3 benchmark.py --quiet
- name: Combine and summarise coverage
if: matrix.benchmark == false
run: coverage combine && coverage xml
- name: Upload coverage data
uses: codecov/codecov-action@v3
if: matrix.benchmark == false
with:
name: "${{ matrix.runs-on }}-${{ matrix.name_suffix }}-tests"
gcov: true
linux_lint:
name: "C++ Lint"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Python
uses: deadsnakes/action@v2.1.1
with:
python-version: '3.8'
debug: true
- name: Install GCC
run: |
sudo apt-get update
sudo apt-get install gcc-8 g++-8
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-8 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 100
- name: Install clang-tidy
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y clang-tidy libc6-dbg build-essential
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-10 100
- name: Install valgrind
run: |
wget https://sourceware.org/pub/valgrind/valgrind-3.16.1.tar.bz2
tar xf valgrind-3.16.1.tar.bz2
pushd valgrind-3.16.1
./configure && make -j3 && sudo make install
popd
- name: Run pip
run: python3 -m pip install -r test_requirements.txt
- name: Lint
run: |
YCM_TESTRUN=1 python3 build.py --clang-completer --clang-tidy --valgrind
python3 run_tests.py --valgrind --skip-build --no-flake8 --quiet
windows:
strategy:
fail-fast: false
matrix:
runs-on: [ windows-2022 ]
benchmark: [ true, false ]
python-arch: [ 'x64', 'x86' ]
msvc: [ 17 ]
exclude:
- runs-on: windows-2022
benchmark: true
python-arch: 'x86'
include:
- runs-on: windows-2019
benchmark: false
python-arch: 'x64'
msvc: 16
runs-on: ${{ matrix.runs-on }}
env:
USE_CLANG_COMPLETER: ${{ matrix.libclang }}
COVERAGE: ${{ !matrix.benchmark }}
name: "Windows MSVC ${{ matrix.msvc }} ${{ matrix.python-arch }} - ${{ matrix.benchmark && 'C++ Benchmark' || 'test run' }}"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: actions/cache@v3
if: matrix.libclang == true && matrix.benchmark == false
with:
key: v3-libclang-${{ runner.os }}-${{ hashFiles( 'cpp/ycm/CMakeLists.txt' ) }}
restore-keys: |
v3-libclang-${{ runner.os }}-
v2-libclang-${{ runner.os }}-${{ hashFiles( 'cpp/ycm/CMakeLists.txt' ) }}
v2-libclang-${{ runner.os }}-
v1-libclang-${{ runner.os }}-
path: |
clang_archives
name: Cache libclang
- uses: actions/cache@v3
if: matrix.benchmark == false
with:
key: v2-deps-${{ runner.os }}-${{ hashFiles( 'build.py' ) }}
restore-keys: |
v2-deps-${{ runner.os }}-
v1-deps-${{ runner.os }}-
path: |
third-party/clangd/cache
third_party/eclipse.jdt.ls/target/cache
third_party/go
third_party/omnisharp-roslyn/v[0-9]*
name: Cache dependencies
- uses: actions/cache@v3
if: matrix.benchmark == false
with:
key: v2-testdeps-${{ runner.os }}-${{ hashFiles( 'run_tests.py' ) }}
restore-keys: |
v2-testdeps-${{ runner.os }}-
v1-testdeps-${{ runner.os }}-
path: |
third-party/lombok/cache
~/.npm
name: Cache test deps
- name: Install Java
if: matrix.benchmark == false
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: ${{ matrix.python-arch }}
- name: Install Go
if: matrix.benchmark == false
uses: actions/setup-go@v4
with:
stable: true
- name: Run pip and prepare coverage
if: matrix.benchmark == false
run: |
python3 -m pip install -r test_requirements.txt
echo -e "import coverage\ncoverage.process_startup()" > $(python -c "print(__import__('sysconfig').get_path('purelib'))")/sitecustomize.py
shell: bash
- name: Run benchmarks
if: matrix.benchmark == true
run: python3 benchmark.py --msvc ${{ matrix.msvc }} --quiet
- name: Run tests
if: matrix.benchmark == false
run: python3 run_tests.py --msvc ${{ matrix.msvc }} --quiet
- name: Combine and summarise coverage
if: matrix.benchmark == false
run: coverage combine && coverage xml
- name: Upload coverage data
uses: codecov/codecov-action@v3
if: matrix.benchmark == false
with:
name: "${{ matrix.runs-on }}-${{ matrix.name_suffix }}-tests"
gcov: true