CI: Split Meson build steps into a separate YAML file
authorAdrian Perez de Castro <aperez@igalia.com>
Tue, 6 Aug 2019 12:34:37 +0000 (15:34 +0300)
committerRan Benita <ran234@gmail.com>
Fri, 9 Aug 2019 20:01:27 +0000 (23:01 +0300)
.azure-pipelines/steps/meson.yml [new file with mode: 0644]
azure-pipelines.yml

diff --git a/.azure-pipelines/steps/meson.yml b/.azure-pipelines/steps/meson.yml
new file mode 100644 (file)
index 0000000..8cd2cca
--- /dev/null
@@ -0,0 +1,21 @@
+---
+parameters:
+  options: ""
+  workdir: "meson-build"
+
+steps:
+  - bash: 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='valgrind --leak-check=full --track-origins=yes --error-exitcode=99'
+      for file in "$(pwd)"/meson-logs/* ; do
+        echo "##vso[task.uploadfile]${file}"
+      done
+    displayName: 'Tests (Meson)'
+    workingDirectory: ${{ parameters.workdir }}
index bfcf219..8833e82 100644 (file)
@@ -22,12 +22,6 @@ jobs:
           ../autogen.sh && make -j$(nproc) && make check
           popd
         displayName: 'Autotools'
-      - script: |
-          meson setup meson-build -Denable-wayland=false
-          ninja -C meson-build
-          meson test -C meson-build --print-errorlogs \
-            --wrap='valgrind --leak-check=full --track-origins=yes --error-exitcode=99'
-          for file in "$(pwd)"/meson-build/meson-logs/* ; do
-            echo "##vso[task.uploadfile]${file}"
-          done
-        displayName: 'Meson'
+      - template: .azure-pipelines/steps/meson.yml
+        parameters:
+          options: -Denable-wayland=false