CI #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
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: Setup dotnet sdk | |
if: matrix.benchmark == false | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.x' | |
- 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 | |
wget https://github.com/dotnet/cli-lab/releases/download/1.7.521001/dotnet-core-uninstall-1.7.521001.msi | |
shell: bash | |
- name: dotnet test | |
run: | | |
dotnet --info | |
msiexec /i dotnet-core-uninstall-1.7.521001.msi /quiet /passive | |
dotnet-core-uninstall -h | |
dotnet-core-uninstall list |