Skip to content

Commit

Permalink
Migrate Ubuntu 18 to 22 directly in the matricses (#4442)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Review feedback

* Finish renaming

* Setting line coverage target to 91%

---------

Co-authored-by: Ben Broderick Phillips <[email protected]>
  • Loading branch information
danieljurek and benbp authored Mar 31, 2023
1 parent 3d17447 commit c2e8452
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 26 deletions.
2 changes: 2 additions & 0 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/jobs/cmake-generate.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'], ''))
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
10 changes: 3 additions & 7 deletions eng/pipelines/templates/stages/platform-matrix-live.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
33 changes: 21 additions & 12 deletions eng/pipelines/templates/stages/platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
13 changes: 13 additions & 0 deletions eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
Original file line number Diff line number Diff line change
@@ -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'))
2 changes: 1 addition & 1 deletion sdk/core/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit c2e8452

Please sign in to comment.