-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from JohanMabille/azure
Migrated from travisci to azure pipelines
- Loading branch information
Showing
9 changed files
with
279 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
jobs: | ||
- job: 'Linux_0' | ||
strategy: | ||
matrix: | ||
clang_4: | ||
llvm_version: '4.0' | ||
blas: 'OpenBLAS' | ||
clang_5: | ||
llvm_version: '5.0' | ||
blas: 'OpenBLAS' | ||
clang_6: | ||
llvm_version: '6.0' | ||
blas: 'OpenBLAS' | ||
clang_7: | ||
llvm_version: '7' | ||
blas: 'OpenBLAS' | ||
clang_8: | ||
llvm_version: '8' | ||
blas: 'OpenBLAS' | ||
clang_9: | ||
llvm_version: '9' | ||
blas: 'OpenBLAS' | ||
clang_10: | ||
llvm_version: '10' | ||
blas: 'OpenBLAS' | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
variables: | ||
CC: clang-$(llvm_version) | ||
CXX: clang++-$(llvm_version) | ||
timeoutInMinutes: 360 | ||
steps: | ||
|
||
- script: | | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | ||
if [[ $(llvm_version) == '4.0' || $(llvm_version) == '5.0' ]]; then | ||
sudo apt-get update | ||
sudo apt-get --no-install-suggests --no-install-recommends install gcc-4.9 clang-$(llvm_version) | ||
else | ||
LLVM_VERSION=$(llvm_version) | ||
get -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-$LLVM_VERSION main" | ||
sudo apt-get update | ||
sudo apt-get --no-install-suggests --no-install-recommends install clang-$(llvm_version) | ||
fi | ||
displayName: Install build toolchain | ||
- bash: echo "##vso[task.prependpath]$CONDA/bin" | ||
displayName: Add conda to PATH | ||
|
||
- template: unix-build.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
jobs: | ||
- job: 'Linux_1' | ||
strategy: | ||
matrix: | ||
gcc_4_OpenBLAS: | ||
gcc_version: '4.9' | ||
blas: 'OpenBLAS' | ||
gcc_5_OpenBLAS: | ||
gcc_version: '5' | ||
blas: 'OpenBLAS' | ||
gcc_6_OpenBLAS: | ||
gcc_version: '5' | ||
blas: 'OpenBLAS' | ||
gcc_6_bound_checks: | ||
gcc_version: '6' | ||
blas: 'OpenBLAS' | ||
bound_checks: 1 | ||
gcc_7_OpenBLAS: | ||
gcc_version: '7' | ||
blas: 'OpenBLAS' | ||
gcc_8_OpenBLAS: | ||
gcc_version: '8' | ||
blas: 'OpenBLAS' | ||
gcc_9_OpenBLAS: | ||
gcc_version: '9' | ||
blas: 'OpenBLAS' | ||
gcc_4_mkl: | ||
gcc_version: '4.9' | ||
blas: 'mkl' | ||
gcc_5_mkl: | ||
gcc_version: '5' | ||
blas: 'mkl' | ||
gcc_6_mkl: | ||
gcc_version: '6' | ||
blas: 'mkl' | ||
gcc_7_mkl: | ||
gcc_version: '7' | ||
blas: 'mkl' | ||
gcc_8_mkl: | ||
gcc_version: '8' | ||
blas: 'mkl' | ||
gcc_9_mkl: | ||
gcc_version: '9' | ||
blas: 'mkl' | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
variables: | ||
CC: gcc-$(gcc_version) | ||
CXX: g++-$(gcc_version) | ||
timeoutInMinutes: 360 | ||
steps: | ||
|
||
- script: | | ||
if [[ $(gcc_version) == '4.9' || $(gcc_version) == '6' ]]; then | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | ||
sudo apt-get update | ||
sudo apt-get --no-install-suggests --no-install-recommends install g++-$(gcc_version) | ||
fi | ||
displayName: Install build toolchain | ||
- bash: echo "##vso[task.prependpath]$CONDA/bin" | ||
displayName: Add conda to PATH | ||
|
||
- template: unix-build.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
jobs: | ||
- job: 'OSX' | ||
strategy: | ||
matrix: | ||
macOS_10_14: | ||
image_name: 'macOS-10.14' | ||
blas: 'mkl' | ||
macOS_10_15: | ||
image_name: 'macOS-10.15' | ||
blas: 'mkl' | ||
pool: | ||
vmImage: $(image_name) | ||
variables: | ||
CC: clang | ||
CXX: clang++ | ||
timeoutInMinutes: 360 | ||
steps: | ||
- script: | | ||
echo "Removing homebrew for Azure to avoid conflicts with conda" | ||
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew | ||
chmod +x ~/uninstall_homebrew | ||
~/uninstall_homebrew -f -q | ||
displayName: Remove homebrew | ||
- bash: | | ||
echo "##vso[task.prependpath]$CONDA/bin" | ||
sudo chown -R $USER $CONDA | ||
displayName: Add conda to PATH | ||
- template: unix-build.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
jobs: | ||
- job: 'build' | ||
pool: | ||
vmImage: 'vs2017-win2016' | ||
timeoutInMinutes: 360 | ||
steps: | ||
|
||
# Install Chocolatey (https://chocolatey.org/install#install-with-powershellexe) | ||
- powershell: | | ||
Set-ExecutionPolicy Bypass -Scope Process -Force | ||
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | ||
Write-Host "##vso[task.setvariable variable=PATH]$env:PATH" | ||
choco --version | ||
displayName: "Install Chocolatey" | ||
# Install Miniconda | ||
- script: | | ||
choco install miniconda3 --yes | ||
set PATH=C:\tools\miniconda3\Scripts;C:\tools\miniconda3;C:\tools\miniconda3\Library\bin;%PATH% | ||
echo '##vso[task.setvariable variable=PATH]%PATH%' | ||
set LIB=C:\tools\miniconda3\Library\lib;%LIB% | ||
echo '##vso[task.setvariable variable=LIB]%LIB%' | ||
conda --version | ||
displayName: "Install Miniconda" | ||
# Configure Miniconda | ||
- script: | | ||
conda config --set always_yes yes | ||
conda config --append channels conda-forge | ||
conda info | ||
displayName: "Configure Miniconda" | ||
# Create conda enviroment | ||
# Note: conda activate doesn't work here, because it creates a new shell! | ||
- script: | | ||
conda install cmake==3.14.0 ^ | ||
mkl-devel ^ | ||
ninja ^ | ||
xtensor=0.22.0 ^ | ||
python=3.6 | ||
conda list | ||
displayName: "Install conda packages" | ||
# Install LLVM | ||
# Note: LLVM distributed by conda is too old | ||
- script: | | ||
choco install llvm --yes | ||
set PATH=C:\Program Files\LLVM\bin;%PATH% | ||
echo '##vso[task.setvariable variable=PATH]%PATH%' | ||
clang-cl --version | ||
displayName: "Install LLVM" | ||
# Configure | ||
- script: | | ||
setlocal EnableDelayedExpansion | ||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 | ||
mkdir build & cd build | ||
cmake -G Ninja ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_C_COMPILER=clang-cl ^ | ||
-DCMAKE_CXX_COMPILER=clang-cl ^ | ||
-DBUILD_TESTS=ON ^ | ||
-DDOWNLOAD_GTEST=ON ^ | ||
$(Build.SourcesDirectory) | ||
displayName: "Configure xtensor-blas" | ||
workingDirectory: $(Build.BinariesDirectory) | ||
# Build | ||
- script: | | ||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 | ||
cmake --build . ^ | ||
--config Release ^ | ||
--target test_xtensor_blas ^ | ||
-- -v | ||
displayName: "Build xtensor-blas" | ||
workingDirectory: $(Build.BinariesDirectory)/build | ||
# Test | ||
- script: | | ||
setlocal EnableDelayedExpansion | ||
cd test | ||
.\test_xtensor_blas | ||
displayName: "Test xtensor-blas" | ||
workingDirectory: $(Build.BinariesDirectory)/build/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
steps: | ||
- script: | | ||
conda config --set always_yes yes --set changeps1 no | ||
conda update -q conda | ||
conda env create --file environment-dev.yml | ||
source activate xtensor-blas | ||
echo $(blas) | ||
if [[ $(blas) == 'mkl' ]]; then | ||
conda install mkl | ||
else | ||
conda install openblas==0.3.7 "blas * openblas" -c conda-forge; | ||
fi | ||
displayName: Install dependencies | ||
- script: | | ||
source activate xtensor-blas | ||
mkdir build | ||
cd build | ||
if [[ $(bound_checks) == 1 ]]; then | ||
CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXTENSOR_ENABLE_ASSERT=ON"; | ||
fi | ||
cmake -DDOWNLOAD_GTEST=ON -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_SYSTEM_IGNORE_PATH=/usr/lib $CMAKE_EXTRA_ARGS $(Build.SourcesDirectory); | ||
displayName: Configure xtensor-blas | ||
workingDirectory: $(Build.BinariesDirectory) | ||
- script: | | ||
source activate xtensor-blas | ||
make -j2 test_xtensor_blas | ||
displayName: Build xtensor-blas | ||
workingDirectory: $(Build.BinariesDirectory)/build | ||
- script: | | ||
source activate xtensor-blas | ||
cd test | ||
./test_xtensor_blas | ||
displayName: Test xtensor-blas | ||
workingDirectory: $(Build.BinariesDirectory)/build/test |
Oops, something went wrong.