CI: Try builds both with Clang and GCC

master
Adrian Perez de Castro 2019-08-06 17:25:25 +03:00 committed by Ran Benita
parent 510cbdd243
commit f796bbb8f7
3 changed files with 27 additions and 0 deletions

View File

@ -1,10 +1,16 @@
--- ---
parameters: parameters:
compiler: ""
options: "" options: ""
workdir: "autotools-build" workdir: "autotools-build"
steps: steps:
- bash: | - 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 "$_" mkdir '${{ parameters.workdir }}' && cd "$_"
../autogen.sh ${{ parameters.options }} ../autogen.sh ${{ parameters.options }}
displayName: 'Configuration (Autotools)' displayName: 'Configuration (Autotools)'

View File

@ -1,5 +1,6 @@
--- ---
parameters: parameters:
compiler: ""
options: "" options: ""
wrapper: "" wrapper: ""
workdir: "meson-build" workdir: "meson-build"
@ -9,6 +10,11 @@ steps:
if [[ -x /usr/local/opt/bison/bin/bison ]] ; then if [[ -x /usr/local/opt/bison/bin/bison ]] ; then
export PATH="/usr/local/opt/bison/bin:${PATH}" export PATH="/usr/local/opt/bison/bin:${PATH}"
fi 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 }} meson setup '${{ parameters.workdir }}' ${{ parameters.options }}
displayName: 'Configuration (Meson)' displayName: 'Configuration (Meson)'
- bash: ninja - bash: ninja

View File

@ -5,21 +5,36 @@ trigger:
jobs: jobs:
- job: 'Meson' - job: 'Meson'
dependsOn: [] dependsOn: []
strategy:
matrix:
Clang:
compiler: clang
GCC:
compiler: gcc
pool: pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
steps: steps:
- template: .azure-pipelines/steps/dependencies-linux.yml - template: .azure-pipelines/steps/dependencies-linux.yml
- template: .azure-pipelines/steps/meson.yml - template: .azure-pipelines/steps/meson.yml
parameters: parameters:
compiler: $(compiler)
options: -Denable-wayland=false options: -Denable-wayland=false
wrapper: valgrind --leak-check=full --track-origins=yes --error-exitcode=99 wrapper: valgrind --leak-check=full --track-origins=yes --error-exitcode=99
- job: 'Autotools' - job: 'Autotools'
dependsOn: [] dependsOn: []
strategy:
matrix:
Clang:
compiler: clang
GCC:
compiler: gcc
pool: pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
steps: steps:
- template: .azure-pipelines/steps/dependencies-linux.yml - template: .azure-pipelines/steps/dependencies-linux.yml
- template: .azure-pipelines/steps/autotools.yml - template: .azure-pipelines/steps/autotools.yml
parameters:
compiler: $(compiler)
- job: 'macOS' - job: 'macOS'
dependsOn: [] dependsOn: []
pool: pool: