CI: Make Autotools and Meson builds parallel This splits the steps for installing dependencies into a new template file, as well as the build steps for Autotools. Both gets used to define two jobs which can run in parallel for both build systems.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
diff --git a/.azure-pipelines/steps/autotools.yml b/.azure-pipelines/steps/autotools.yml
new file mode 100644
index 0000000..3de1e32
--- /dev/null
+++ b/.azure-pipelines/steps/autotools.yml
@@ -0,0 +1,23 @@
+---
+parameters:
+ options: ""
+ workdir: "autotools-build"
+
+steps:
+ - bash: |
+ mkdir '${{ parameters.workdir }}' && cd "$_"
+ ../autogen.sh ${{ parameters.options }}
+ displayName: 'Configuration (Autotools)'
+ - bash: make -j$(nproc)
+ displayName: 'Build (Autotools)'
+ workingDirectory: ${{ parameters.workdir }}
+ - bash: make check
+ displayName: 'Tests (Autotools)'
+ workingDirectory: ${{ parameters.workdir }}
+ - bash: |
+ shopt -s nullglob
+ for file in "$(pwd)"/*.log ; do
+ echo "##vso[task.uploadfile]${file}"
+ done
+ displayName: 'Save Results (Autotools)'
+ condition: always()
diff --git a/.azure-pipelines/steps/dependencies-linux.yml b/.azure-pipelines/steps/dependencies-linux.yml
new file mode 100644
index 0000000..c572cc6
--- /dev/null
+++ b/.azure-pipelines/steps/dependencies-linux.yml
@@ -0,0 +1,13 @@
+---
+steps:
+ - task: UsePythonVersion@0
+ inputs:
+ versionSpec: '3.7'
+ displayName: 'Use Python 3.7'
+ - bash: |
+ python -m pip install --upgrade pip meson
+ sudo apt update -y
+ sudo env DEBIAN_FRONTEND=noninteractive apt install -y \
+ xutils-dev doxygen libxcb-xkb-dev valgrind meson libwayland-dev \
+ wayland-protocols bison valgrind
+ displayName: 'Dependencies (GNU/Linux)'
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 8833e82..ca9bff5 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -1,27 +1,21 @@
+---
trigger:
- ci-azure
jobs:
- - job: 'Ubuntu_16_04'
+ - job: 'Meson'
+ dependsOn: []
pool:
vmImage: 'ubuntu-16.04'
steps:
- - task: UsePythonVersion@0
- inputs:
- versionSpec: '3.7'
- displayName: 'Use Python 3.7'
- - script: |
- python -m pip install --upgrade pip meson
- sudo apt update -y
- sudo env DEBIAN_FRONTEND=noninteractive apt install -y \
- xutils-dev doxygen libxcb-xkb-dev valgrind meson libwayland-dev \
- wayland-protocols bison valgrind
- displayName: 'Install dependencies'
- - script: |
- mkdir autotools-build && pushd autotools-build
- ../autogen.sh && make -j$(nproc) && make check
- popd
- displayName: 'Autotools'
+ - template: .azure-pipelines/steps/dependencies-linux.yml
- template: .azure-pipelines/steps/meson.yml
parameters:
options: -Denable-wayland=false
+ - job: 'Autotools'
+ dependsOn: []
+ pool:
+ vmImage: 'ubuntu-16.04'
+ steps:
+ - template: .azure-pipelines/steps/dependencies-linux.yml
+ - template: .azure-pipelines/steps/autotools.yml