Migrate Ubuntu 18 to 22 directly in the matricses (#4442)

* First cut at migrating Ubuntu 18 to 22 directly in the matricses

* Try 20.04

* Remove azure.list from apt configuration on 22.04

* Parens

* gpp-8 on Ubuntu 20.04

* Remove g++-5

* Move config changes to steps/

* Remove g++-5 from live tests

* Update eng/pipelines/templates/steps/fix-linux-1es-configs.yml

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Review feedback

* Finish renaming

* Setting line coverage target to 91%

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Daniel Jurek 2023-03-31 12:07:25 -07:00 committed by GitHub
parent 3d17447cce
commit c2e845266b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 48 additions and 26 deletions

View File

@ -92,6 +92,8 @@ jobs:
parameters:
AgentImage: $(OsVmImage)
- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
- pwsh: sudo apt update && sudo apt install -y $(AptDependencies)
condition: and(succeeded(), ne(variables['AptDependencies'], ''))
displayName: Install dependencies from apt

View File

@ -64,6 +64,8 @@ jobs:
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml
parameters:
AgentImage: $(OSVmImage)
- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
- pwsh: sudo apt update && sudo apt install -y $(AptDependencies)
condition: and(succeeded(), ne(variables['AptDependencies'], ''))

View File

@ -78,8 +78,8 @@ jobs:
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml
parameters:
AgentImage: $(OSVmImage)
- template: /eng/common/pipelines/templates/steps/bypass-local-dns.yml
- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
# Add g++5 repo to ubuntu
- bash: sudo sh -c "echo 'deb http://ftp.debian.org/debian/ stretch main' >> /etc/apt/sources.list"

View File

@ -3,8 +3,8 @@
"CmakeEnvArg": "",
"OSConfig": {
"Linux": {
"Pool": "azsdk-pool-mms-ubuntu-1804-general",
"OSVmImage": "MMSUbuntu18.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"OSVmImage": "MMSUbuntu22.04",
"AptDependencies": "libcurl4-openssl-dev",
"VCPKG_DEFAULT_TRIPLET": "x64-linux"
},

View File

@ -7,8 +7,8 @@
"CmakeEnvArg": ""
},
"Linux": {
"Pool": "azsdk-pool-mms-ubuntu-1804-general",
"OSVmImage": "MMSUbuntu18.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"OSVmImage": "MMSUbuntu22.04",
"CmakeEnvArg": "",
"AptDependencies": "libcurl4-openssl-dev"
},

View File

@ -21,19 +21,15 @@
},
{
"StaticConfigs": {
"Ubu1804": {
"Ubu2204": {
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"BuildArgs": "-j 4",
"Pool": "azsdk-pool-mms-ubuntu-1804-general",
"OSVmImage": "MMSUbuntu18.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"OSVmImage": "MMSUbuntu22.04",
"RunProxyTests": true
}
},
"BuildConfig": {
"x64_gcc5_with_unit_test": {
"CmakeEnvArg": "CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 cmake",
"CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON"
},
"x64_with_unit_test": {
"CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_CODE_COVERAGE=ON",
"AptDependencies": "gcovr lcov",

View File

@ -135,24 +135,15 @@
},
{
"StaticConfigs": {
"Ubuntu18": {
"OSVmImage": "MMSUbuntu18.04",
"Pool": "azsdk-pool-mms-ubuntu-1804-general",
"Ubuntu22": {
"OSVmImage": "MMSUbuntu22.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"BuildArgs": "-j 10",
"RunProxyTests": true
}
},
"BuildSettings": {
"gpp-5": {
"AptDependencies": "g++-5",
"CmakeEnvArg": "CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 "
},
"gpp-8": {
"AptDependencies": "g++-8",
"CC": "/usr/bin/gcc-8",
"CXX": "/usr/bin/g++-8"
},
"gpp-9": {
"AptDependencies": "g++-9",
"CC": "/usr/bin/gcc-9",
@ -177,6 +168,24 @@
}
}
},
{
"StaticConfigs": {
"Ubuntu20": {
"OSVmImage": "MMSUbuntu20.04",
"Pool": "azsdk-pool-mms-ubuntu-2004-general",
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"BuildArgs": "-j 10",
"RunProxyTests": true
}
},
"BuildSettings": {
"gpp-8": {
"AptDependencies": "g++-8",
"CC": "/usr/bin/gcc-8",
"CXX": "/usr/bin/g++-8"
}
}
},
{
"StaticConfigs": {
"Ubuntu20": {

View File

@ -0,0 +1,13 @@
steps:
- pwsh: |
if ((lsb_release --release --short) -eq "22.04") {
Write-Host "Release is 22.04, modifying apt configuration"
Write-Host "sudo rm -f /etc/apt/sources.list.d/azure.list"
# Use -f to suppress error if file is not present
sudo rm -f /etc/apt/sources.list.d/azure.list
} else {
Write-Host "Release does not need modification"
}
displayName: Modify Linux configurations
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))

View File

@ -44,7 +44,7 @@ stages:
CtestRegex: azure-core.|json-test
LiveTestCtestRegex: azure-core.|json-test
LiveTestTimeoutInMinutes: 90 # default is 60 min. We need a little longer on worst case for Win+jsonTests
LineCoverageTarget: 92
LineCoverageTarget: 91
BranchCoverageTarget: 50
# PreTestSteps:
# - pwsh: |