@@ -22,63 +22,81 @@ jobs:
22
22
CONDA_PY : " 310"
23
23
24
24
steps :
25
- - displayName : ' Set conda path'
26
- script : echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
27
-
28
- - displayName : ' Workaround for mamba-org/mamba#488'
29
- script : rm /usr/local/miniconda/pkgs/cache/*.json
25
+ - task : Cache@2
26
+ inputs :
27
+ key : sccache-0
28
+ restoreKeys : |
29
+ sccache-restore-0
30
+ path : $(HOME)/.sccache
31
+ displayName : Restore Sccache cache
30
32
31
- - displayName : ' Setup environment and build pandas'
32
- script : |
33
- echo $PATH
33
+ - script : |
34
+ set -eux
34
35
sccache_version=v0.2.15
35
36
sccache_archive_name=sccache-$sccache_version-x86_64-apple-darwin
36
37
curl -L https://github.com/mozilla/sccache/releases/download/$sccache_version/$sccache_archive_name.tar.gz \
37
38
| tar xzf - -O $sccache_archive_name/sccache > /usr/local/bin/sccache
38
39
chmod +x /usr/local/bin/sccache
39
- SCCACHE_IDLE_TIMEOUT=999999 sccache --start-server
40
+ SCCACHE_IDLE_TIMEOUT=999999 SCCACHE_DIR=$(HOME)/.sccache sccache --start-server
40
41
sccache -s
41
42
sccache -z
42
- # conda config --set ssl_verify false
43
- # conda config --set quiet true --set always_yes true --set changeps1 false
43
+ displayName: Setup Sccache
44
+
45
+ - task : Cache@2
46
+ inputs :
47
+ key : conda-0
48
+ restoreKeys : |
49
+ conda-restore-0
50
+ pattern : /usr/local/miniconda/pkgs/*.tar.bz2
51
+ displayName : Restore Conda package cache
52
+
53
+ - script : echo '##vso[task.prependpath]/usr/local/miniconda/condabin'
54
+ displayName : ' Set conda path asdf'
55
+
56
+ - script : rm /usr/local/miniconda/pkgs/cache/*.json
57
+ displayName : ' Workaround for mamba-org/mamba#488'
58
+
59
+ - script : |
60
+ set -eux
44
61
conda install -y -c conda-forge -n base 'mamba>=0.22' pip
45
- echo "mamba env update --file=${ENV_FILE}"
62
+ env | grep pkg
46
63
# See https://github.com/mamba-org/mamba/issues/633
47
64
mamba create -q -n pandas-dev
48
65
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
49
66
echo ' - setuptools <60' >> ${ENV_FILE}
50
- if [[ "$(uname)" == Darwin ] ]; then
67
+ if [ "$(uname)" == Darwin ]; then
51
68
# From pyarrow on MacOS
52
69
# ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib
53
70
# Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib
54
71
# Reason: image not found
55
- sed -i 's/^ - pyarrow$/ - pyarrow=6/' ${ENV_FILE}
72
+ sed -i'' -e 's/^ - pyarrow$/ - pyarrow=6/' ${ENV_FILE}
56
73
fi
57
74
time mamba env update -n pandas-dev --file="${ENV_FILE}"
75
+ set +e
58
76
echo Have qt?
59
- conda list -f qt --json
77
+ mamba list -n pandas-dev -f qt --json
60
78
echo Have pandas?
61
- pip list | grep pandas
62
- echo "Build extensions"
63
- time DISTUTILS_C_COMPILER_LAUNCHER=sccache python setup.py build_ext -q -j3
64
- echo "Install pandas"
65
- time python -m pip install --no-build-isolation -e .
79
+ mamba run --no-capture-output -n pandas-dev pip list | grep pandas
80
+ set -e
81
+ time DISTUTILS_C_COMPILER_LAUNCHER=sccache mamba run --no-capture-output -n pandas-dev python setup.py build_ext -q -j3
82
+ time mamba run --no-capture-output -n pandas-dev python -m pip install --no-build-isolation -e .
66
83
sccache -s
84
+ displayName: 'Setup environment and build pandas'
67
85
68
- - displayName : ' Test '
69
- script : |
70
- conda run -n pandas-dev --no-capture-output ci/run_tests.sh
86
+ - script : |
87
+ mamba run --no-capture-output -n pandas-dev ci/run_tests.sh
88
+ displayName: 'Test'
71
89
72
- - displayName : ' Build versions'
73
- script : |
90
+ - script : |
74
91
pushd /tmp
75
- conda run -n pandas-dev python -c "import pandas; pandas.show_versions()"
92
+ mamba run --no-capture-output -n pandas-dev python -c "import pandas; pandas.show_versions()"
76
93
popd
94
+ displayName: 'Build versions'
77
95
78
- - displayName : ' Publish test results'
79
- task : PublishTestResults@2
96
+ - task : PublishTestResults@2
80
97
condition : succeededOrFailed()
81
98
inputs :
82
99
failTaskOnFailedTests : true
83
100
testResultsFiles : ' test-data.xml'
84
101
testRunTitle : ${{ format('{0}-$(CONDA_PY)', parameters.name) }}
102
+ displayName : ' Publish test results'
0 commit comments