Skip to content

[READY] Add support codeAction/resolve requests #761

[READY] Add support codeAction/resolve requests

[READY] Add support codeAction/resolve requests #761

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-24.04, macos-14 ]
compiler: [ 'gcc' ] # Only used on linux
libclang: [ true ] # Only used on linux
benchmark: [ true, false ]
include:
- runs-on: ubuntu-24.04
compiler: 'clang'
benchmark: false
libclang: true
name_suffix: 'with Clang compiler - '
- runs-on: ubuntu-24.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@v4
with:
submodules: recursive
fetch-depth: 0
- uses: actions/cache@v4
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@v4
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@v4
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@v4
with:
java-version: 17
distribution: 'adopt'
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Go
if: matrix.benchmark == false
uses: actions/setup-go@v5
with:
go-version: stable
cache: false
- name: Install mono
if: runner.os == 'Linux' && matrix.benchmark == false
run: |
sudo apt-get update
sudo apt-get install mono-complete
- name: Install GCC
if: runner.os == 'Linux' && matrix.compiler != 'clang'
run: |
sudo apt-get update
sudo apt-get install gcc-10 g++-10
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-10 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-10 100
- name: Install Clang
if: runner.os == 'Linux' && matrix.compiler == 'clang'
run: |
sudo apt-get update
sudo apt-get install clang-14
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-14 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-14 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@v4
if: matrix.benchmark == false
with:
name: "${{ matrix.runs-on }}-${{ matrix.name_suffix }}-tests"
token: ${{ secrets.CODECOV_TOKEN }}
gcov: true
linux_lint:
name: "C++ Lint"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Python
uses: deadsnakes/[email protected]
with:
python-version: '3.13'
debug: true
- name: Install GCC
run: |
sudo apt-get update
sudo apt-get install gcc-10 g++-10
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-10 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-10 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-18 100
- name: Install valgrind
run: |
sudo apt-get update
sudo apt-get install valgrind
- 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@v4
with:
submodules: recursive
fetch-depth: 0
- uses: actions/cache@v4
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@v4
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@v4
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@v4
with:
java-version: 17
distribution: 'temurin'
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: ${{ matrix.python-arch }}
- name: Install Go
if: matrix.benchmark == false
uses: actions/setup-go@v5
with:
go-version: stable
cache: false
- 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@v4
if: matrix.benchmark == false
with:
name: "${{ matrix.runs-on }}-${{ matrix.name_suffix }}-tests"
token: ${{ secrets.CODECOV_TOKEN }}