summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Perez de Castro <aperez@igalia.com>2019-08-12 23:14:25 +0300
committerRan Benita <ran@unusedvar.com>2019-12-28 15:32:30 +0200
commitb30bf21c82cf2ad9641ef104736556a2429f3d5e (patch)
tree6b2481f24fa7673fa47068f5c7575a6daf4e13e7
parentfadfb13c42927ada3fd6d9d3f173be384b6c0c4d (diff)
downloadlibxkbcommon-b30bf21c82cf2ad9641ef104736556a2429f3d5e.tar.gz
libxkbcommon-b30bf21c82cf2ad9641ef104736556a2429f3d5e.tar.bz2
libxkbcommon-b30bf21c82cf2ad9641ef104736556a2429f3d5e.zip
CI: some tweaks
[ran: extracted generic bits from Windows commit.] Signed-off-by: Ran Benita <ran@unusedvar.com>
-rw-r--r--.azure-pipelines/steps/dependencies-linux.yml2
-rw-r--r--.azure-pipelines/steps/dependencies-macos.yml1
-rw-r--r--.azure-pipelines/steps/meson.yml55
-rw-r--r--azure-pipelines.yml2
4 files changed, 27 insertions, 33 deletions
diff --git a/.azure-pipelines/steps/dependencies-linux.yml b/.azure-pipelines/steps/dependencies-linux.yml
index 76ef5be..6d6bcce 100644
--- a/.azure-pipelines/steps/dependencies-linux.yml
+++ b/.azure-pipelines/steps/dependencies-linux.yml
@@ -4,7 +4,9 @@ steps:
inputs:
versionSpec: '3.7'
displayName: 'Use Python 3.7'
+
- bash: |
+ set -euo pipefail
python -m pip install --upgrade pip meson
sudo apt update -y
sudo env DEBIAN_FRONTEND=noninteractive apt install -y \
diff --git a/.azure-pipelines/steps/dependencies-macos.yml b/.azure-pipelines/steps/dependencies-macos.yml
index a7efc4a..387d56c 100644
--- a/.azure-pipelines/steps/dependencies-macos.yml
+++ b/.azure-pipelines/steps/dependencies-macos.yml
@@ -1,6 +1,7 @@
---
steps:
- bash: |
+ set -euo pipefail
brew install meson doxygen bison
brew link bison --force
displayName: 'Dependencies (macOS)'
diff --git a/.azure-pipelines/steps/meson.yml b/.azure-pipelines/steps/meson.yml
index e9ec6dd..5348cbe 100644
--- a/.azure-pipelines/steps/meson.yml
+++ b/.azure-pipelines/steps/meson.yml
@@ -1,45 +1,34 @@
---
parameters:
- compiler: ""
+ compiler: "cc"
options: ""
wrapper: ""
- workdir: "meson-build"
+ prepare: ""
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 }}
+ - script: |
+ ${{ parameters.prepare }}
+ meson setup ${{ parameters.options }} build
+ displayName: 'Setup'
+ env:
+ CC: ${{ parameters.compiler }}
+
+ - script: |
+ ${{ parameters.prepare }}
+ ninja -C build
+ displayName: 'Build'
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()
+ set -euo pipefail
+ meson test -C build --print-errorlogs --wrapper="${{ parameters.wrapper }}"
+ python3 scripts/meson-junit-report.py --project-name=xkbcommon \
+ --job-id='$(Build.BuildId)' --branch='$(Build.SourceBranch)' \
+ --output=testlog.xml build/meson-logs/testlog*.json
+ displayName: 'Test'
+
- task: PublishTestResults@2
inputs:
- testResultsFiles: '**/*-junit.xml'
+ testResultsFiles: 'testlog.xml'
failTaskOnFailedTests: true
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 3479aec..f5308a7 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -17,6 +17,7 @@ jobs:
compiler: $(compiler)
options: -Denable-wayland=false
wrapper: valgrind --leak-check=full --track-origins=yes --error-exitcode=99
+
- job: 'macOS'
dependsOn: []
pool:
@@ -26,3 +27,4 @@ jobs:
- template: .azure-pipelines/steps/meson.yml
parameters:
options: -Denable-wayland=false -Denable-x11=false
+ prepare: 'export PATH="/usr/local/opt/bison/bin:${PATH}"'