Skip to content

Commit 74a5e71

Browse files
committed
General CI updates
Switch to ubuntu 24.04 Switch to macos 14 Switch to python 3.9 Install mono-complete Redo valgrind Update actions Use python 3.13 in valgrind run Workaround for cgi module being removed Fix bindings test in newer python
1 parent 01efad8 commit 74a5e71

File tree

6 files changed

+72
-73
lines changed

6 files changed

+72
-73
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
runs-on: [ ubuntu-20.04, macos-12 ]
15+
runs-on: [ ubuntu-24.04, macos-14 ]
1616
compiler: [ 'gcc' ] # Only used on linux
1717
libclang: [ true ] # Only used on linux
1818
benchmark: [ true, false ]
1919
include:
20-
- runs-on: ubuntu-20.04
20+
- runs-on: ubuntu-24.04
2121
compiler: 'clang'
2222
benchmark: false
2323
libclang: true
2424
name_suffix: 'with Clang compiler - '
25-
- runs-on: ubuntu-20.04
25+
- runs-on: ubuntu-24.04
2626
compiler: 'gcc'
2727
benchmark: false
2828
libclang: false
@@ -33,12 +33,12 @@ jobs:
3333
name: "${{ matrix.runs-on }} - ${{ matrix.name_suffix }}${{ matrix.benchmark && 'C++ Benchmark' || 'test run' }}"
3434
runs-on: ${{ matrix.runs-on }}
3535
steps:
36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3737
with:
3838
submodules: recursive
3939
fetch-depth: 0
4040

41-
- uses: actions/cache@v3
41+
- uses: actions/cache@v4
4242
if: matrix.libclang == true && matrix.benchmark == false
4343
with:
4444
key: v3-libclang-${{ runner.os }}-${{ hashFiles( 'cpp/ycm/CMakeLists.txt' ) }}
@@ -51,7 +51,7 @@ jobs:
5151
clang_archives
5252
name: Cache libclang
5353

54-
- uses: actions/cache@v3
54+
- uses: actions/cache@v4
5555
if: matrix.benchmark == false
5656
with:
5757
key: v2-deps-${{ runner.os }}-${{ hashFiles( 'build.py' ) }}
@@ -65,7 +65,7 @@ jobs:
6565
third_party/omnisharp-roslyn/v[0-9]*
6666
name: Cache dependencies
6767

68-
- uses: actions/cache@v3
68+
- uses: actions/cache@v4
6969
if: matrix.benchmark == false
7070
with:
7171
key: v2-testdeps-${{ runner.os }}-${{ hashFiles( 'run_tests.py' ) }}
@@ -79,36 +79,41 @@ jobs:
7979

8080
- name: Install Java
8181
if: matrix.benchmark == false
82-
uses: actions/setup-java@v3
82+
uses: actions/setup-java@v4
8383
with:
8484
java-version: 17
8585
distribution: 'adopt'
8686

8787
- name: Install Python
88-
uses: actions/setup-python@v4
88+
uses: actions/setup-python@v5
8989
with:
90-
python-version: '3.8'
90+
python-version: '3.9'
9191

9292
- name: Install Go
9393
if: matrix.benchmark == false
94-
uses: actions/setup-go@v4
94+
uses: actions/setup-go@v5
9595
with:
9696
go-version: stable
9797
cache: false
98+
- name: Install mono
99+
if: runner.os == 'Linux' && matrix.benchmark == false
100+
run: |
101+
sudo apt-get update
102+
sudo apt-get install mono-complete
98103
- name: Install GCC
99104
if: runner.os == 'Linux' && matrix.compiler != 'clang'
100105
run: |
101106
sudo apt-get update
102-
sudo apt-get install gcc-8 g++-8
103-
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-8 100
104-
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 100
107+
sudo apt-get install gcc-10 g++-10
108+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-10 100
109+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-10 100
105110
- name: Install Clang
106111
if: runner.os == 'Linux' && matrix.compiler == 'clang'
107112
run: |
108113
sudo apt-get update
109-
sudo apt-get install clang-7
110-
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-7 100
111-
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-7 100
114+
sudo apt-get install clang-14
115+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-14 100
116+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-14 100
112117
- name: Run pip and prepare coverage
113118
if: matrix.benchmark == false
114119
run: |
@@ -124,7 +129,7 @@ jobs:
124129
if: matrix.benchmark == false
125130
run: coverage combine && coverage xml
126131
- name: Upload coverage data
127-
uses: codecov/codecov-action@v3
132+
uses: codecov/codecov-action@v4
128133
if: matrix.benchmark == false
129134
with:
130135
name: "${{ matrix.runs-on }}-${{ matrix.name_suffix }}-tests"
@@ -133,36 +138,33 @@ jobs:
133138

134139
linux_lint:
135140
name: "C++ Lint"
136-
runs-on: ubuntu-20.04
141+
runs-on: ubuntu-24.04
137142
steps:
138-
- uses: actions/checkout@v3
143+
- uses: actions/checkout@v4
139144
with:
140145
submodules: recursive
141146
fetch-depth: 0
142147
- name: Install Python
143-
uses: deadsnakes/action@v2.1.1
148+
uses: deadsnakes/action@v3.1.0
144149
with:
145-
python-version: '3.8'
150+
python-version: '3.13'
146151
debug: true
147152
- name: Install GCC
148153
run: |
149154
sudo apt-get update
150-
sudo apt-get install gcc-8 g++-8
151-
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-8 100
152-
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 100
155+
sudo apt-get install gcc-10 g++-10
156+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-10 100
157+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-10 100
153158
- name: Install clang-tidy
154159
run: |
155160
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
156161
sudo apt-get update
157162
sudo apt-get install -y clang-tidy libc6-dbg build-essential
158-
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-10 100
163+
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-18 100
159164
- name: Install valgrind
160165
run: |
161-
wget https://sourceware.org/pub/valgrind/valgrind-3.16.1.tar.bz2
162-
tar xf valgrind-3.16.1.tar.bz2
163-
pushd valgrind-3.16.1
164-
./configure && make -j3 && sudo make install
165-
popd
166+
sudo apt-get update
167+
sudo apt-get install valgrind
166168
- name: Run pip
167169
run: python3 -m pip install -r test_requirements.txt
168170
- name: Lint
@@ -193,12 +195,12 @@ jobs:
193195
COVERAGE: ${{ !matrix.benchmark }}
194196
name: "Windows MSVC ${{ matrix.msvc }} ${{ matrix.python-arch }} - ${{ matrix.benchmark && 'C++ Benchmark' || 'test run' }}"
195197
steps:
196-
- uses: actions/checkout@v3
198+
- uses: actions/checkout@v4
197199
with:
198200
submodules: recursive
199201
fetch-depth: 0
200202

201-
- uses: actions/cache@v3
203+
- uses: actions/cache@v4
202204
if: matrix.libclang == true && matrix.benchmark == false
203205
with:
204206
key: v3-libclang-${{ runner.os }}-${{ hashFiles( 'cpp/ycm/CMakeLists.txt' ) }}
@@ -211,7 +213,7 @@ jobs:
211213
clang_archives
212214
name: Cache libclang
213215

214-
- uses: actions/cache@v3
216+
- uses: actions/cache@v4
215217
if: matrix.benchmark == false
216218
with:
217219
key: v2-deps-${{ runner.os }}-${{ hashFiles( 'build.py' ) }}
@@ -225,7 +227,7 @@ jobs:
225227
third_party/omnisharp-roslyn/v[0-9]*
226228
name: Cache dependencies
227229

228-
- uses: actions/cache@v3
230+
- uses: actions/cache@v4
229231
if: matrix.benchmark == false
230232
with:
231233
key: v2-testdeps-${{ runner.os }}-${{ hashFiles( 'run_tests.py' ) }}
@@ -239,18 +241,18 @@ jobs:
239241

240242
- name: Install Java
241243
if: matrix.benchmark == false
242-
uses: actions/setup-java@v3
244+
uses: actions/setup-java@v4
243245
with:
244246
java-version: 17
245247
distribution: 'temurin'
246248
- name: Install Python
247-
uses: actions/setup-python@v4
249+
uses: actions/setup-python@v5
248250
with:
249-
python-version: '3.8'
251+
python-version: '3.9'
250252
architecture: ${{ matrix.python-arch }}
251253
- name: Install Go
252254
if: matrix.benchmark == false
253-
uses: actions/setup-go@v4
255+
uses: actions/setup-go@v5
254256
with:
255257
go-version: stable
256258
cache: false
@@ -270,7 +272,7 @@ jobs:
270272
if: matrix.benchmark == false
271273
run: coverage combine && coverage xml
272274
- name: Upload coverage data
273-
uses: codecov/codecov-action@v3
275+
uses: codecov/codecov-action@v4
274276
if: matrix.benchmark == false
275277
with:
276278
name: "${{ matrix.runs-on }}-${{ matrix.name_suffix }}-tests"

.mergify.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ queue_rules:
33
- name: default
44
# These define the conditions to get out of the merge queue
55
conditions:
6-
- status-success=macos-12 - C++ Benchmark
7-
- status-success=macos-12 - test run
8-
- status-success=ubuntu-20.04 - C++ Benchmark
9-
- status-success=ubuntu-20.04 - without libclang completer - test run
10-
- status-success=ubuntu-20.04 - with Clang compiler - test run
11-
- status-success=ubuntu-20.04 - test run
6+
- status-success=macos-14 - C++ Benchmark
7+
- status-success=macos-14 - test run
8+
- status-success=ubuntu-24.04 - C++ Benchmark
9+
- status-success=ubuntu-24.04 - without libclang completer - test run
10+
- status-success=ubuntu-24.04 - with Clang compiler - test run
11+
- status-success=ubuntu-24.04 - test run
1212
- status-success=C++ Lint
1313
- status-success=Windows MSVC 16 x64 - test run
1414
- status-success=Windows MSVC 17 x64 - test run
@@ -20,12 +20,12 @@ pull_request_rules:
2020
conditions:
2121
- base=master
2222
- "#approved-reviews-by>=2"
23-
- status-success=macos-12 - C++ Benchmark
24-
- status-success=macos-12 - test run
25-
- status-success=ubuntu-20.04 - C++ Benchmark
26-
- status-success=ubuntu-20.04 - without libclang completer - test run
27-
- status-success=ubuntu-20.04 - with Clang compiler - test run
28-
- status-success=ubuntu-20.04 - test run
23+
- status-success=macos-14 - C++ Benchmark
24+
- status-success=macos-14 - test run
25+
- status-success=ubuntu-24.04 - C++ Benchmark
26+
- status-success=ubuntu-24.04 - without libclang completer - test run
27+
- status-success=ubuntu-24.04 - with Clang compiler - test run
28+
- status-success=ubuntu-24.04 - test run
2929
- status-success=C++ Lint
3030
- status-success=Windows MSVC 16 x64 - test run
3131
- status-success=Windows MSVC 17 x64 - test run
@@ -42,12 +42,12 @@ pull_request_rules:
4242
- name: Manual merge on Azure Pipelines and Maintainer Override
4343
conditions:
4444
- base=master
45-
- status-success=macos-12 - C++ Benchmark
46-
- status-success=macos-12 - test run
47-
- status-success=ubuntu-20.04 - C++ Benchmark
48-
- status-success=ubuntu-20.04 - without libclang completer - test run
49-
- status-success=ubuntu-20.04 - with Clang compiler - test run
50-
- status-success=ubuntu-20.04 - test run
45+
- status-success=macos-14 - C++ Benchmark
46+
- status-success=macos-14 - test run
47+
- status-success=ubuntu-24.04 - C++ Benchmark
48+
- status-success=ubuntu-24.04 - without libclang completer - test run
49+
- status-success=ubuntu-24.04 - with Clang compiler - test run
50+
- status-success=ubuntu-24.04 - test run
5151
- status-success=C++ Lint
5252
- status-success=Windows MSVC 16 x64 - test run
5353
- status-success=Windows MSVC 17 x64 - test run
@@ -69,12 +69,12 @@ pull_request_rules:
6969
conditions:
7070
- base=master
7171
- author=puremourning
72-
- status-success=macos-12 - C++ Benchmark
73-
- status-success=macos-12 - test run
74-
- status-success=ubuntu-20.04 - C++ Benchmark
75-
- status-success=ubuntu-20.04 - without libclang completer - test run
76-
- status-success=ubuntu-20.04 - with Clang compiler - test run
77-
- status-success=ubuntu-20.04 - test run
72+
- status-success=macos-14 - C++ Benchmark
73+
- status-success=macos-14 - test run
74+
- status-success=ubuntu-24.04 - C++ Benchmark
75+
- status-success=ubuntu-24.04 - without libclang completer - test run
76+
- status-success=ubuntu-24.04 - with Clang compiler - test run
77+
- status-success=ubuntu-24.04 - test run
7878
- status-success=C++ Lint
7979
- status-success=Windows MSVC 16 x64 - test run
8080
- status-success=Windows MSVC 17 x64 - test run

run_tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ def UnittestValgrind( parsed_args, extra_unittest_args ):
229229
# unittest_args += [ '-m', 'not valgrind_skip' ]
230230

231231
new_env = os.environ.copy()
232-
new_env[ 'PYTHONMALLOC' ] = 'malloc'
233232
new_env[ 'LD_LIBRARY_PATH' ] = LIBCLANG_DIR
234233
new_env[ 'YCM_VALGRIND_RUN' ] = '1'
235234
cmd = [ 'valgrind',

test_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ WebTest >= 2.0.20
66
psutil >= 5.6.6
77
coverage >= 4.2
88
requests
9+
legacy-cgi ; python_version >= "3.13"

valgrind.suppressions

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
{
2-
Valgrind bug (https://stackoverflow.com/questions/1542457/memory-leak-reported-by-valgrind-in-dlopen)
2+
Valgrind has a false positive around dlopen
33
Memcheck:Leak
4-
fun:malloc
54
...
6-
fun:dl_open_worker
7-
fun:_dl_catch_exception
85
fun:_dl_open
96
fun:dlopen_doit
107
fun:_dl_catch_exception
118
fun:_dl_catch_error
129
fun:_dlerror_run
13-
fun:dlopen@@GLIBC_2.2.5
14-
fun:_PyImport_FindSharedFuncptr
15-
fun:_PyImport_LoadDynamicModuleWithSpec
10+
fun:dlopen_implementation
11+
fun:dlopen@@GLIBC_2.34
1612
}

ycmd/tests/bindings/cpp_bindings_raises_exception_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
from unittest import TestCase
2222
ycm_core = ImportCore()
2323

24-
READONLY_MESSAGE = 'can\'t set attribute'
24+
READONLY_MESSAGE = ( 'can\'t set attribute'
25+
'|property (\'\' )?of \'\\w+\' object has no setter' )
2526

2627

2728
class CppBindingsExceptionTest( TestCase ):

0 commit comments

Comments
 (0)