From 7d22d84584226d51804a3cdbad588f43a903dba2 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 4 Apr 2019 11:02:59 -0400 Subject: [PATCH] Deduplicate the install latest meson steps. --- azure-pipelines.yml | 40 ++++++------------------ azure-pipelines/install-latest-meson.yml | 10 ++++++ 2 files changed, 19 insertions(+), 31 deletions(-) create mode 100644 azure-pipelines/install-latest-meson.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 30853d21..00898b0b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,16 +9,11 @@ jobs: workspace: clean: all steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' - architecture: 'x64' + # Ubuntu typically comes with an outdated meson + - template: azure-pipelines/install-latest-meson.yml - script: | sudo apt-get install libgtk-3-dev ninja-build - # Ubuntu typically comes with an outdated meson - python -m pip install --upgrade pip setuptools wheel - pip install meson - displayName: 'Setup' + displayName: 'Install Dependencies' - script: | meson setup build --buildtype=release --default-library=shared --backend=ninja displayName: 'Configure' @@ -33,16 +28,10 @@ jobs: workspace: clean: all steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' - architecture: 'x64' + - template: azure-pipelines/install-latest-meson.yml - script: | sudo apt-get install libgtk-3-dev ninja-build - # Ubuntu typically comes with an outdated meson - python -m pip install --upgrade pip setuptools wheel - pip install meson - displayName: 'Setup' + displayName: 'Install Dependencies' - script: | meson setup build --buildtype=release --default-library=static --backend=ninja displayName: 'Configure' @@ -57,14 +46,7 @@ jobs: workspace: clean: all steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' - architecture: 'x64' - - script: | - python -m pip install --upgrade pip setuptools wheel - pip install meson - displayName: 'Setup' + - template: azure-pipelines/install-latest-meson.yml - script: | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" meson setup build --buildtype=release --default-library=shared --backend=vs2017 @@ -82,20 +64,16 @@ jobs: workspace: clean: all steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' - architecture: 'x64' + - template: azure-pipelines/install-latest-meson.yml - script: | choco install ninja - python -m pip install --upgrade pip setuptools wheel - pip install meson - displayName: 'Setup' + displayName: 'Install Dependencies' - script: | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" meson setup build --buildtype=release --default-library=static --backend=ninja displayName: 'Configure' - script: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" ninja -C build displayName: 'Build' diff --git a/azure-pipelines/install-latest-meson.yml b/azure-pipelines/install-latest-meson.yml new file mode 100644 index 00000000..2097031d --- /dev/null +++ b/azure-pipelines/install-latest-meson.yml @@ -0,0 +1,10 @@ +# 4 april 2019 +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: '3.6' + architecture: 'x64' +- script: | + python -m pip install --upgrade pip setuptools wheel + pip install meson + displayName: 'Install Latest Meson'