Skip to content

Commit b00f299

Browse files
update windows test machine (#4496)
* update windows test machine * try windows-2022 * try latest cmake * update cmake version * update cmake versions * only update version in windows * back to version with cmake-server * try diff version * generator * upgrade cmake version and don't do server tests on windows * revert specifying generator * update kits to vs 2022 * more fixes switching to vs 2022 generator * more vs 2019 to 2022 * update logging to try to see more info * remove no longer needed tests * remove unused
1 parent 4217069 commit b00f299

File tree

15 files changed

+54
-209
lines changed

15 files changed

+54
-209
lines changed

.github/workflows/ci-main-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: yarn lint
3535

3636
- name: Install CMake/Ninja
37-
uses: lukka/get-cmake@v3.30.3
37+
uses: lukka/get-cmake@latest
3838
with:
3939
cmakeVersion: 3.18.3
4040
ninjaVersion: 1.10.1

.github/workflows/ci-main-mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: yarn lint
3535

3636
- name: Install CMake/Ninja
37-
uses: lukka/get-cmake@v3.30.3
37+
uses: lukka/get-cmake@latest
3838
with:
3939
cmakeVersion: 3.18.3
4040
ninjaVersion: 1.10.1

.github/workflows/ci-main.win.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: windows-2019
11+
runs-on: windows-2022
1212

1313
steps:
1414
- name: Checkout source code
@@ -36,9 +36,9 @@ jobs:
3636

3737
# The cmake server mode has been removed since CMake 3.20
3838
- name: Install CMake/Ninja
39-
uses: lukka/get-cmake@v3.30.3
39+
uses: lukka/get-cmake@latest
4040
with:
41-
cmakeVersion: 3.18.3
41+
cmakeVersion: 3.31.6
4242
ninjaVersion: 1.10.1
4343

4444
- name: Build fake compilers for tests

test/end-to-end-tests/multi-root-UI/project-folder-1/.vscode/cmake-kits.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@
3131
}
3232
},
3333
{
34-
"name": "Generator switch test VS 2019",
35-
"visualStudio": "VisualStudio.16.0",
34+
"name": "Generator switch test VS 2022",
35+
"visualStudio": "VisualStudio.17.0",
3636
"visualStudioArchitecture": "x86",
3737
"preferredGenerator": {
38-
"name": "Visual Studio 16 2019",
38+
"name": "Visual Studio 17 2022",
3939
"platform": "win32",
4040
"toolset": "host=x86"
4141
}
4242
},
4343
{
44-
"name": "Generator switch test VS 2019 Ninja",
45-
"visualStudio": "VisualStudio.16.0",
44+
"name": "Generator switch test VS 2022 Ninja",
45+
"visualStudio": "VisualStudio.17.0",
4646
"visualStudioArchitecture": "x86",
4747
"preferredGenerator": {
4848
"name": "Ninja"
4949
}
5050
},
5151
{
52-
"name": "Generator switch test VS 2019 no generator",
53-
"visualStudio": "VisualStudio.16.0",
52+
"name": "Generator switch test VS 2022 no generator",
53+
"visualStudio": "VisualStudio.17.0",
5454
"visualStudioArchitecture": "x86"
5555
}
5656
]

test/end-to-end-tests/multi-root-UI/project-folder-2/.vscode/cmake-kits.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@
3131
}
3232
},
3333
{
34-
"name": "Generator switch test VS 2019",
35-
"visualStudio": "VisualStudio.16.0",
34+
"name": "Generator switch test VS 2022",
35+
"visualStudio": "VisualStudio.17.0",
3636
"visualStudioArchitecture": "x86",
3737
"preferredGenerator": {
38-
"name": "Visual Studio 16 2019",
38+
"name": "Visual Studio 17 2022",
3939
"platform": "win32",
4040
"toolset": "host=x86"
4141
}
4242
},
4343
{
44-
"name": "Generator switch test VS 2019 Ninja",
45-
"visualStudio": "VisualStudio.16.0",
44+
"name": "Generator switch test VS 2022 Ninja",
45+
"visualStudio": "VisualStudio.17.0",
4646
"visualStudioArchitecture": "x86",
4747
"preferredGenerator": {
4848
"name": "Ninja"
4949
}
5050
},
5151
{
52-
"name": "Generator switch test VS 2019 no generator",
53-
"visualStudio": "VisualStudio.16.0",
52+
"name": "Generator switch test VS 2022 no generator",
53+
"visualStudio": "VisualStudio.17.0",
5454
"visualStudioArchitecture": "x86"
5555
}
5656
]

test/end-to-end-tests/multi-root-UI/test/configure-and-build.test.ts

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ import {
44
clearExistingKitConfigurationFile,
55
DefaultEnvironment,
66
expect,
7-
getFirstSystemKit,
8-
getMatchingSystemKit
7+
getFirstSystemKit
98
} from '@test/util';
109
import * as fs_ from 'fs';
1110
import * as path from 'path';
1211
import * as vscode from 'vscode';
1312

14-
const workername: string = process.platform;
15-
1613
suite('Build', () => {
1714
let folder2: DefaultEnvironment;
1815
let compdb_cp_path: string;
@@ -99,54 +96,6 @@ suite('Build', () => {
9996
expect(result['cookie']).to.eq('passed-cookie');
10097
}).timeout(200000);
10198

102-
test('Test kit switch after missing preferred generator', async function (this: Mocha.Context) {
103-
// Select compiler build node dependent
104-
const os_compilers: { [osName: string]: { kitLabel: RegExp; compiler: string }[] } = {
105-
linux: [{ kitLabel: /^GCC \d/, compiler: 'GNU' }, { kitLabel: /^Clang \d/, compiler: 'Clang' }],
106-
win32: [{ kitLabel: /^Visual Studio/, compiler: 'MSVC' }, { kitLabel: /^Clang \d/, compiler: 'Clang' }]
107-
};
108-
if (!(workername in os_compilers)) {
109-
this.skip();
110-
}
111-
const compiler = os_compilers[workername];
112-
113-
// Run test
114-
folder2.kitSelection.defaultKitLabel = compiler[0].kitLabel;
115-
await vscode.commands.executeCommand('cmake.setKitByName', (await getMatchingSystemKit(undefined, compiler[0].kitLabel)).name);
116-
117-
await vscode.commands.executeCommand('cmake.buildAll');
118-
119-
folder2.kitSelection.defaultKitLabel = compiler[1].kitLabel;
120-
await vscode.commands.executeCommand('cmake.setKitByName', (await getMatchingSystemKit(undefined, compiler[1].kitLabel)).name);
121-
122-
await vscode.commands.executeCommand('cmake.buildAll');
123-
const result = await folder2.result.getResultAsJson();
124-
expect(result['compiler']).to.eql(compiler[1].compiler);
125-
}).timeout(150000);
126-
127-
test('Test kit switch between different preferred generators and compilers', async function (this: Mocha.Context) {
128-
// Select compiler build node dependent
129-
const os_compilers: { [osName: string]: { kitLabel: RegExp; compiler: string }[] } = {
130-
linux: [{ kitLabel: /^GCC \d/, compiler: 'GNU' }, { kitLabel: /^Clang \d/, compiler: 'Clang' }],
131-
win32: [{ kitLabel: /^Visual Studio/, compiler: 'MSVC' }, { kitLabel: /^Clang \d/, compiler: 'Clang' }]
132-
};
133-
if (!(workername in os_compilers)) {
134-
this.skip();
135-
}
136-
const compiler = os_compilers[workername];
137-
138-
folder2.kitSelection.defaultKitLabel = compiler[0].kitLabel;
139-
await vscode.commands.executeCommand('cmake.setKitByName', (await getMatchingSystemKit(undefined, compiler[0].kitLabel)).name);
140-
await vscode.commands.executeCommand('cmake.buildAll');
141-
142-
folder2.kitSelection.defaultKitLabel = compiler[1].kitLabel;
143-
await vscode.commands.executeCommand('cmake.setKitByName', (await getMatchingSystemKit(undefined, compiler[1].kitLabel)).name);
144-
await vscode.commands.executeCommand('cmake.buildAll');
145-
146-
const result = await folder2.result.getResultAsJson();
147-
expect(result['compiler']).to.eql(compiler[1].compiler);
148-
}).timeout(150000);
149-
15099
test('Test build twice', async function (this: Mocha.Context) {
151100
console.log('1. Build');
152101
expect(await vscode.commands.executeCommand('cmake.build')).eq(0);

test/end-to-end-tests/single-root-UI/project-folder/.vscode/cmake-kits.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@
3131
}
3232
},
3333
{
34-
"name": "Generator switch test VS 2019",
35-
"visualStudio": "VisualStudio.16.0",
34+
"name": "Generator switch test VS 2022",
35+
"visualStudio": "VisualStudio.17.0",
3636
"visualStudioArchitecture": "x86",
3737
"preferredGenerator": {
38-
"name": "Visual Studio 16 2019",
38+
"name": "Visual Studio 17 2022",
3939
"platform": "win32",
4040
"toolset": "host=x86"
4141
}
4242
},
4343
{
44-
"name": "Generator switch test VS 2019 Ninja",
45-
"visualStudio": "VisualStudio.16.0",
44+
"name": "Generator switch test VS 2022 Ninja",
45+
"visualStudio": "VisualStudio.17.0",
4646
"visualStudioArchitecture": "x86",
4747
"preferredGenerator": {
4848
"name": "Ninja"
4949
}
5050
},
5151
{
52-
"name": "Generator switch test VS 2019 no generator",
53-
"visualStudio": "VisualStudio.16.0",
52+
"name": "Generator switch test VS 2022 no generator",
53+
"visualStudio": "VisualStudio.17.0",
5454
"visualStudioArchitecture": "x86"
5555
}
5656
]

test/end-to-end-tests/single-root-UI/project-folder/.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
"cmake.coverageInfoFiles": [
88
"${workspaceFolder}/build/lcov.info"
99
]
10-
}
10+
}

test/end-to-end-tests/single-root-UI/project-folder/CMakeUserPresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{
2222
"name": "WindowsUser1",
2323
"description": "Sets generator, build and install directory, vcpkg",
24-
"generator": "Visual Studio 16 2019",
24+
"generator": "Visual Studio 17 2022",
2525
"binaryDir": "${sourceDir}/build",
2626
"cacheVariables": {
2727
"CMAKE_BUILD_TYPE": "Debug",

test/end-to-end-tests/single-root-UI/test/configure-and-build-kits.test.ts

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ import {
44
clearExistingKitConfigurationFile,
55
DefaultEnvironment,
66
expect,
7-
getFirstSystemKit,
8-
getMatchingSystemKit
7+
getFirstSystemKit
98
} from '@test/util';
109
import * as path from 'path';
1110
import * as vscode from 'vscode';
1211

13-
const workername: string = process.platform;
14-
1512
suite('Build using Kits and Variants', () => {
1613
let testEnv: DefaultEnvironment;
1714
let compdb_cp_path: string;
@@ -88,56 +85,6 @@ suite('Build using Kits and Variants', () => {
8885
expect(result['cookie']).to.eq('passed-cookie');
8986
}).timeout(100000);
9087

91-
test('Test kit switch after missing preferred generator', async function (this: Mocha.Context) {
92-
// Select compiler build node dependent
93-
const os_compilers: { [osName: string]: { kitLabel: RegExp; compiler: string }[] } = {
94-
linux: [{ kitLabel: /^GCC \d/, compiler: 'GNU' }, { kitLabel: /^Clang \d/, compiler: 'Clang' }],
95-
win32: [{ kitLabel: /^Visual Studio/, compiler: 'MSVC' }, { kitLabel: /^Clang \d/, compiler: 'Clang' }]
96-
};
97-
if (!(workername in os_compilers)) {
98-
this.skip();
99-
}
100-
const compiler = os_compilers[workername];
101-
102-
// Run test
103-
testEnv.kitSelection.defaultKitLabel = compiler[0].kitLabel;
104-
await vscode.commands.executeCommand('cmake.setKitByName', (await getMatchingSystemKit(undefined, compiler[0].kitLabel)).name);
105-
106-
await vscode.commands.executeCommand('cmake.build');
107-
108-
testEnv.kitSelection.defaultKitLabel = compiler[1].kitLabel;
109-
await vscode.commands.executeCommand('cmake.setKitByName', (await getMatchingSystemKit(undefined, compiler[1].kitLabel)).name);
110-
111-
await vscode.commands.executeCommand('cmake.build');
112-
const result1 = await testEnv.result.getResultAsJson();
113-
expect(result1['compiler']).to.eql(compiler[1].compiler);
114-
}).timeout(100000);
115-
116-
test('Test kit switch between different preferred generators and compilers',
117-
async function (this: Mocha.Context) {
118-
// Select compiler build node dependent
119-
const os_compilers: { [osName: string]: { kitLabel: RegExp; compiler: string }[] } = {
120-
linux: [{ kitLabel: /^GCC \d/, compiler: 'GNU' }, { kitLabel: /^Clang \d/, compiler: 'Clang' }],
121-
win32: [{ kitLabel: /^Visual Studio/, compiler: 'MSVC' }, { kitLabel: /^Clang \d/, compiler: 'Clang' }]
122-
};
123-
if (!(workername in os_compilers)) {
124-
this.skip();
125-
}
126-
const compiler = os_compilers[workername];
127-
128-
testEnv.kitSelection.defaultKitLabel = compiler[0].kitLabel;
129-
await vscode.commands.executeCommand('cmake.setKitByName', (await getMatchingSystemKit(undefined, compiler[0].kitLabel)).name);
130-
await vscode.commands.executeCommand('cmake.build');
131-
132-
testEnv.kitSelection.defaultKitLabel = compiler[1].kitLabel;
133-
await vscode.commands.executeCommand('cmake.setKitByName', (await getMatchingSystemKit(undefined, compiler[1].kitLabel)).name);
134-
await vscode.commands.executeCommand('cmake.build');
135-
136-
const result1 = await testEnv.result.getResultAsJson();
137-
expect(result1['compiler']).to.eql(compiler[1].compiler);
138-
})
139-
.timeout(100000);
140-
14188
test('Test build twice', async function (this: Mocha.Context) {
14289
console.log('1. Build');
14390
expect(await vscode.commands.executeCommand('cmake.build')).eq(0);

0 commit comments

Comments
 (0)