From f796bbb8f7b82ee4b99b1e5fcdb6f638d0bde78d Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Tue, 6 Aug 2019 17:25:25 +0300 Subject: [PATCH] CI: Try builds both with Clang and GCC --- .azure-pipelines/steps/autotools.yml | 6 ++++++ .azure-pipelines/steps/meson.yml | 6 ++++++ azure-pipelines.yml | 15 +++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/.azure-pipelines/steps/autotools.yml b/.azure-pipelines/steps/autotools.yml index 3de1e32..51dfe66 100644 --- a/.azure-pipelines/steps/autotools.yml +++ b/.azure-pipelines/steps/autotools.yml @@ -1,10 +1,16 @@ --- parameters: + compiler: "" options: "" workdir: "autotools-build" steps: - bash: | + export COMPILER=${{ parameters.compiler }} + case ${COMPILER:-default} in + clang ) export CC=clang CXX=clang++ ;; + gcc ) export CC=gcc CXX=g++ ;; + esac mkdir '${{ parameters.workdir }}' && cd "$_" ../autogen.sh ${{ parameters.options }} displayName: 'Configuration (Autotools)' diff --git a/.azure-pipelines/steps/meson.yml b/.azure-pipelines/steps/meson.yml index bb25197..0854414 100644 --- a/.azure-pipelines/steps/meson.yml +++ b/.azure-pipelines/steps/meson.yml @@ -1,5 +1,6 @@ --- parameters: + compiler: "" options: "" wrapper: "" workdir: "meson-build" @@ -9,6 +10,11 @@ steps: 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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 70b4881..74afa50 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,21 +5,36 @@ trigger: jobs: - job: 'Meson' dependsOn: [] + strategy: + matrix: + Clang: + compiler: clang + GCC: + compiler: gcc pool: vmImage: 'ubuntu-16.04' steps: - template: .azure-pipelines/steps/dependencies-linux.yml - template: .azure-pipelines/steps/meson.yml parameters: + compiler: $(compiler) options: -Denable-wayland=false wrapper: valgrind --leak-check=full --track-origins=yes --error-exitcode=99 - job: 'Autotools' dependsOn: [] + strategy: + matrix: + Clang: + compiler: clang + GCC: + compiler: gcc pool: vmImage: 'ubuntu-16.04' steps: - template: .azure-pipelines/steps/dependencies-linux.yml - template: .azure-pipelines/steps/autotools.yml + parameters: + compiler: $(compiler) - job: 'macOS' dependsOn: [] pool: -- 2.7.4