Files
predef/azure-pipelines.yml
2026-05-09 08:19:18 -05:00

154 lines
5.1 KiB
YAML

# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Copyright René Ferdinand Rivera Morell 2019-2021.
trigger:
branches:
include:
- develop
- master
- feature/*
paths:
exclude:
- .circleci/*
- .cirrus.yml
- .drone.star
- .github/workflows/*
- .semaphore/*
- .travis.yml
- appveyor.yml
- README.*
pr:
branches:
include:
- develop
stages:
- template: "tools/ci/azp.yml"
parameters:
name: Core
toolsets:
- "gcc-16"
b2_tests:
- name: "GNU (info)"
dir: test
args: "--verbose-test -a predef-info cxxstd=03,11,14,17,20,23
cxxstd-dialect=gnu"
- name: "GNU (test)"
dir: test
args: "--debug-configuration -a predef predef-headers cxxstd=03,11,14,17,20,23
cxxstd-dialect=gnu"
- name: "ISO (info)"
dir: test
args: "--verbose-test -a predef-info cxxstd=03,11,14,17,20,23
cxxstd-dialect=iso"
- name: "ISO (test)"
dir: test
args: "--debug-configuration -a predef predef-headers cxxstd=03,11,14,17,20,23
cxxstd-dialect=iso"
- name: "ISO (warnings)"
dir: test
args: "--debug-configuration -a predef predef-headers cxxstd=03,11,14,17,20,23
cxxstd-dialect=iso warnings=pedantic warnings-as-errors=on
cxxflags=-Woverloaded-virtual cxxflags=-Wshadow
cxxflags=-Wnon-virtual-dtor cxxflags=-Wzero-as-null-pointer-constant
cxxflags=-Wsign-promo cxxflags=-Wsign-compare
cxxflags=-Wsign-conversion cxxflags=-Wundef"
- template: "tools/ci/azp.yml"
parameters:
name: Compilers
depends_on: [ "Core" ]
b2_tests:
- name: "Info"
dir: test
args: "--verbose-test -a predef-info"
- name: "Test"
dir: test
args: "--debug-configuration -a predef predef-headers"
- template: "tools/ci/azp.yml"
parameters:
name: "Windows_UWP"
toolsets:
- "msvc-14.5"
depends_on: [ "Core" ]
b2_tests:
- name: "UWP DESKTOP"
dir: test
args: "--verbose-test -a address-model=64 define=_WIN32_WINNT=0x0A00
define=WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP"
- name: "UWP PHONE"
dir: test
args: "--verbose-test -a address-model=64 define=_WIN32_WINNT=0x0A00
define=WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP"
- name: "UWP STORE"
dir: test
args: "--verbose-test -a address-model=64 define=_WIN32_WINNT=0x0A00
define=WINAPI_FAMILY=WINAPI_FAMILY_PC_APP"
- name: "UWP SERVER"
dir: test
args: "--verbose-test -a address-model=64 define=_WIN32_WINNT=0x0A00
define=WINAPI_FAMILY=WINAPI_FAMILY_SERVER"
- name: "UWP SYSTEM"
dir: test
args: "--verbose-test -a address-model=64 define=_WIN32_WINNT=0x0A00
define=WINAPI_FAMILY=WINAPI_FAMILY_SYSTEM"
- stage: WebsiteUpdate
displayName: "Website Update"
dependsOn: [ Core, Compilers, Windows_UWP ]
condition: and(in(variables['Build.SourceBranch'], 'refs/heads/master',
'refs/heads/develop'), eq(variables['Build.Repository.Name'],
'grafikrobot/hash-predef'))
jobs:
- job: Documentation
pool:
vmImage: "ubuntu-latest"
steps:
- task: UseRubyVersion@0
- bash: |
gem install asciidoctor
gem install rouge
displayName: "Install Doc Tools"
- bash: |
set -e
pushd ${HOME}
wget -nv https://github.com/bfgroup/b2/archive/release.tar.gz
tar -zxf release.tar.gz
cd b2-release
CXX= ./bootstrap.sh
sudo ./b2 install
popd
displayName: "Install B2"
- bash: |
rm -rf ${WEB_DIR}
git clone --verbose --branch gh-pages --depth 1 "https://${GH_TOKEN}github.com/grafikrobot/hash-predef.git" ${WEB_DIR} || exit 1
pushd ${WEB_DIR}
git rm --ignore-unmatch -r "${DOC_DIR}" || exit 1
mkdir -p "${DOC_DIR}" || exit 1
popd
displayName: "Clone Website"
env:
GH_TOKEN: $(GitHubToken)
WEB_DIR: website
DOC_DIR: manual/$(Build.SourceBranchName)
- bash: |
echo "using asciidoctor ;" > ${HOME}/user-config.jam
pushd doc
b2 --doc-dir=${WEB_DIR}/${DOC_DIR} html
git config user.email "doc-bot"
git config user.name "doc-bot"
cd ${WEB_DIR}/${DOC_DIR}
git add --verbose . || exit 1
git commit -m "Update documentation."
git push
popd
displayName: "Build & Publish"
env:
GH_TOKEN: $(GitHubToken)
WEB_DIR: website
DOC_DIR: manual/$(Build.SourceBranchName)