From d825fde3707240711530c0e7cb297b07f2e951fd Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Wed, 6 Mar 2024 10:33:58 +0100 Subject: [PATCH] CI shenanigans - maybe this will help Signed-off-by: Erik Boasson --- .azure/templates/build-test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.azure/templates/build-test.yml b/.azure/templates/build-test.yml index a235425021..9526aadf60 100644 --- a/.azure/templates/build-test.yml +++ b/.azure/templates/build-test.yml @@ -30,6 +30,7 @@ steps: echo "###vso[task.setvariable variable=pip_cache;]${HOME}/.cache/pip" echo "###vso[task.setvariable variable=PATH;]$(python3 -m site --user-base)/bin:${PATH}" echo "###vso[task.setvariable variable=build_tool_options;]-j 4" + echo "###vso[task.setvariable variable=cmake_system_name;]Linux" sudo apt install -y clang clang-tools clang-tidy condition: eq(variables['Agent.OS'], 'Linux') name: setup_linux @@ -39,6 +40,7 @@ steps: echo "###vso[task.setvariable variable=pip_cache;]${HOME}/Library/Caches/pip" echo "###vso[task.setvariable variable=PATH;]$(python3 -m site --user-base)/bin:${PATH}" echo "###vso[task.setvariable variable=build_tool_options;]-j 4" + echo "###vso[task.setvariable variable=cmake_system_name;]Darwin" condition: eq(variables['Agent.OS'], 'Darwin') name: setup_macos # Use PowerShell rather than Bash to ensure Windows-style paths @@ -46,6 +48,7 @@ steps: $python_bin = python -m site --user-base Write-Host "###vso[task.setvariable variable=pip_cache;]${env:LOCALAPPDATA}\\pip\\Cache" Write-Host "###vso[task.setvariable variable=PATH;]$python_bin\\bin;${env:PATH}" + Write-Host "###vso[task.setvariable variable=cmake_system_name;]Windows" # Visual Studio is most likely used on Windows agents if (${env:GENERATOR} -match "2019" -and -not ${env:PLATFORM}) { # Make sure platform matches arch if not specified @@ -119,16 +122,14 @@ steps: fi crosscompiling= if [[ "${SHAREDLIBS:-on}" == "off" ]] ; then - echo "PLATFORM=${PLATFORM}" prefix_path="${prefix_path}:../build-sharedlibs/install" - crosscompiling="-DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSTEM_NAME=Linux" + crosscompiling="-DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSTEM_NAME=${cmake_system_name}" fi cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DCMAKE_INSTALL_PREFIX=install \ -DCMAKE_PREFIX_PATH="${prefix_path//:/;}" \ -DBUILD_SHARED_LIBS=${SHAREDLIBS:-on} \ ${crosscompiling} \ - -DCMAKE_SYSTEM_NAME="${PLATFORM}" \ -DANALYZER=${ANALYZER:-off} \ -DSANITIZER=${SANITIZER:-none} \ -DENABLE_SSL=${SSL:-on} \