forked from mpi4py/mpi4py-fft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
83 lines (73 loc) · 2.23 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
jobs:
- job: macOS
displayName: macos-latest
pool:
vmImage: 'macos-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- bash: |
conda config --add channels conda-forge
conda config --set always_yes yes
conda install -n root conda-build numpy fftw
displayName: Set up Anaconda
- bash: |
conda build --python $PYTHON_VERSION ./conf
displayName: Build and test
- job: Ubuntu
displayName: Ubuntu
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: |
conda config --add channels conda-forge
conda config --set always_yes yes
conda install -n root conda-build numpy fftw
displayName: Set up Anaconda
- bash: |
conda build --no-test --python $PYTHON_VERSION ./conf
conda create --name mpi4py_fft_env mpi4py_fft_test coverage scipy pyfftw=0.12 python=$PYTHON_VERSION --use-local
source activate mpi4py_fft_env
pip install codecov
cd tests && ./runtests.sh
displayName: Build and test
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
- bash: |
if [ $PYTHON_VERSION == 3.8 ]; then
source activate mpi4py_fft_env
cd tests
coverage xml -o ./coverage.xml
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -f coverage.xml
fi
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: Upload to Codecov