libxkbcommon/.azure-pipelines/steps/meson.yml

46 lines
1.4 KiB
YAML

---
parameters:
compiler: ""
options: ""
wrapper: ""
workdir: "meson-build"
steps:
- bash: |
if [[ -x /usr/local/opt/bison/bin/bison ]] ; then
export PATH="/usr/local/opt/bison/bin:${PATH}"
fi
export COMPILER=${{ parameters.compiler }}
case ${COMPILER:-default} in
clang ) export CC=clang CXX=clang++ ;;
gcc ) export CC=gcc CXX=g++ ;;
esac
meson setup '${{ parameters.workdir }}' ${{ parameters.options }}
displayName: 'Configuration (Meson)'
- bash: ninja
displayName: 'Build (Meson)'
workingDirectory: ${{ parameters.workdir }}
env:
TERM: dumb
- bash: |
meson test --print-errorlogs --wrap='${{ parameters.wrapper }}'
displayName: 'Tests (Meson)'
workingDirectory: ${{ parameters.workdir }}
- bash: |
shopt -s nullglob
for file in "$(pwd)"/meson-logs/* ; do
echo "##vso[task.uploadfile]${file}"
done
for file in "$(pwd)"/meson-logs/*.json ; do
python3 ../scripts/meson-junit-report.py --project-name=xkbcommon \
--job-id='$(Build.BuildId)' --branch='$(Build.SourceBranch)' \
--output="${file}-junit.xml" "${file}"
done
displayName: 'Process Results (Meson)'
workingDirectory: ${{ parameters.workdir }}
condition: always()
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/*-junit.xml'
failTaskOnFailedTests: true