Skip to content

Commit

Permalink
CI shenanigans - maybe this will help
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Boasson <[email protected]>
  • Loading branch information
eboasson committed Mar 6, 2024
1 parent e6cd5dc commit d825fde
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .azure/templates/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,13 +40,15 @@ 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
- pwsh: |
$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
Expand Down Expand Up @@ -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} \
Expand Down

0 comments on commit d825fde

Please sign in to comment.