diff --git a/.ci/azure-build.yml b/.ci/azure-build.yml index db5f2ae5..45147fe8 100644 --- a/.ci/azure-build.yml +++ b/.ci/azure-build.yml @@ -1,13 +1,17 @@ +parameters: + osName: 'linux' + steps: -- script: | +- bash: | + ./.ci/install.sh + export PATH=/usr/local/bin:${PATH} +- bash: | + export TRAVIS_OS_NAME=${{ osName }} export CXX=${CXX_COMPILER} export CC=${C_COMPILER} # Use TRAVIS_TAG if defined, or the short commit SHA otherwise export VERSION=${TRAVIS_TAG:-$(git rev-parse --short HEAD)} -- script: | +- bash: | ./.ci/script.sh sed -i -e "s/VERSION_NAME_VALUE/${VERSION}/g" ./.ci/bintray-release.json || true - cp ./.ci/bintray-release.json . -- script: | - ./.ci/install.sh - export PATH=/usr/local/bin:${PATH} \ No newline at end of file + cp ./.ci/bintray-release.json . \ No newline at end of file diff --git a/.ci/install.sh b/.ci/install.sh index d8dd67f2..9b296412 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -37,6 +37,9 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd libsodium-1.0.16/ ./configure && make && make check && sudo make install ) + curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty main" | sudo tee /etc/apt/sources.list.d/llvm.list + sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty # needed for git-lfs, otherwise the follow apt update fails. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6B05F25D762E3157 @@ -44,8 +47,12 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then # needed for mongodb repository: https://github.com/travis-ci/travis-ci/issues/9037 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt update -qq sudo apt install -qq -y \ + g++-8 \ + ninja-build \ qt${QT_PKG}base \ qt${QT_PKG}tools \ qt${QT_PKG}svg \ diff --git a/.ci/script.sh b/.ci/script.sh index cf8b524b..d57e483f 100755 --- a/.ci/script.sh +++ b/.ci/script.sh @@ -3,6 +3,7 @@ set -ex if [ "$TRAVIS_OS_NAME" = "linux" ]; then + export CC=${C_COMPILER} export CXX=${CXX_COMPILER} # make build use all available cores diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b3c4d191..1524e7ee 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,18 +18,37 @@ stages: pool: vmImage: 'ubuntu-16.04' + variables: + CXX_COMPILER: 'clang++-5.0' + C_COMPILER: 'clang-5.0' + QT_VERSION: '592' + QT_PKG: '59' + USE_BUNDLED_BOOST: '1' + USE_BUNDLED_CMARK: '1' + USE_BUNDLED_JSON: '1' steps: - template: .ci/azure-build.yml + parameters: + osName: 'linux' - job: macOS pool: vmImage: 'macOS-10.13' + variables: + DEPLOYMENT: '1' + USE_BUNDLED_BOOST: '0' + USE_BUNDLED_CMARK: '0' + USE_BUNDLED_JSON: '0' steps: - template: .ci/azure-build.yml + parameters: + osName: 'osx' - job: Windows pool: vmImage: 'vs2017-win2016' - + steps: - - template: .ci/azure-build.yml \ No newline at end of file + - template: .ci/azure-build.yml + parameters: + osName: 'windows' \ No newline at end of file