Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae2a3b1

Browse files
authored
Merge pull request#20680 from larsoner/circle
CI: Build merged version on CircleCI
2 parents4fdff43 +2a0da42 commitae2a3b1

File tree

4 files changed

+172
-108
lines changed

4 files changed

+172
-108
lines changed

‎.circleci/config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,34 @@ version: 2.1
99
#
1010

1111
commands:
12+
check-skip:
13+
steps:
14+
-run:
15+
name:Check-skip
16+
command:|
17+
export git_log=$(git log --max-count=1 --pretty=format:"%B" | tr "\n" " ")
18+
echo "Got commit message:"
19+
echo "${git_log}"
20+
if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$git_log" == *"[skip circle]"* ]] || [[ "$git_log" == *"[circle skip]"* ]]); then
21+
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
22+
circleci-agent step halt;
23+
fi
24+
25+
merge:
26+
steps:
27+
-run:
28+
name:Merge with upstream
29+
command:|
30+
if ! git remote -v | grep upstream; then
31+
git remote add upstream git://github.com/matplotlib/matplotlib.git
32+
fi
33+
git fetch upstream
34+
export merge=${CI_PULL_REQUEST//*pull\//}
35+
if [[ "$merge" != "" ]]; then
36+
echo "Merging ${merge}";
37+
git pull --ff-only upstream "refs/pull/${merge}/merge";
38+
fi
39+
1240
apt-install:
1341
steps:
1442
-run:
@@ -124,6 +152,8 @@ jobs:
124152
-image:circleci/python:3.8
125153
steps:
126154
-checkout
155+
-check-skip
156+
-merge
127157

128158
-apt-install
129159
-fonts-install

‎.github/workflows/circleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ jobs:
1010
repo-token:${{ secrets.GITHUB_TOKEN }}
1111
artifact-path:0/doc/build/html/index.html
1212
circleci-jobs:docs-python38
13+
job-title:Check the rendered docs here!

‎azure-pipelines.yml

Lines changed: 129 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -3,122 +3,143 @@
33
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
44
# https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python?view=azure-devops
55

6-
strategy:
7-
matrix:
8-
Linux_py37:
9-
vmImage:'ubuntu-18.04'
10-
python.version:'3.7'
11-
Linux_py38:
12-
vmImage:'ubuntu-18.04'
13-
python.version:'3.8'
14-
Linux_py39:
15-
vmImage:'ubuntu-18.04'
16-
python.version:'3.9'
17-
macOS_py37:
18-
vmImage:'macOS-10.15'
19-
python.version:'3.7'
20-
macOS_py38:
21-
vmImage:'macOS-latest'
22-
python.version:'3.8'
23-
macOS_py39:
24-
vmImage:'macOS-latest'
25-
python.version:'3.9'
26-
Windows_py37:
27-
vmImage:'vs2017-win2016'
28-
python.version:'3.7'
29-
Windows_py38:
30-
vmImage:'windows-latest'
31-
python.version:'3.8'
32-
Windows_py39:
33-
vmImage:'windows-latest'
34-
python.version:'3.9'
35-
maxParallel:4
6+
stages:
367

37-
pool:
38-
vmImage:'$(vmImage)'
39-
40-
steps:
8+
-stage:Check
9+
jobs:
10+
-job:Skip
11+
pool:
12+
vmImage:'ubuntu-18.04'
13+
variables:
14+
DECODE_PERCENTS:'false'
15+
RET:'true'
16+
steps:
17+
-bash:|
18+
git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "`
19+
echo "##vso[task.setvariable variable=log]$git_log"
20+
-bash:echo "##vso[task.setvariable variable=RET]false"
21+
condition:or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))
22+
-bash:echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET"
23+
name:result
4124

42-
-task:UsePythonVersion@0
43-
inputs:
44-
versionSpec:'$(python.version)'
45-
architecture:'x64'
46-
displayName:'Use Python $(python.version)'
47-
condition:and(succeeded(), ne(variables['python.version'], 'Pre'))
25+
-stage:Main
26+
condition:and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true'))
27+
dependsOn:Check
28+
jobs:
29+
-job:Pytest
30+
strategy:
31+
matrix:
32+
Linux_py37:
33+
vmImage:'ubuntu-18.04'
34+
python.version:'3.7'
35+
Linux_py38:
36+
vmImage:'ubuntu-18.04'
37+
python.version:'3.8'
38+
Linux_py39:
39+
vmImage:'ubuntu-18.04'
40+
python.version:'3.9'
41+
macOS_py37:
42+
vmImage:'macOS-10.15'
43+
python.version:'3.7'
44+
macOS_py38:
45+
vmImage:'macOS-latest'
46+
python.version:'3.8'
47+
macOS_py39:
48+
vmImage:'macOS-latest'
49+
python.version:'3.9'
50+
Windows_py37:
51+
vmImage:'vs2017-win2016'
52+
python.version:'3.7'
53+
Windows_py38:
54+
vmImage:'windows-latest'
55+
python.version:'3.8'
56+
Windows_py39:
57+
vmImage:'windows-latest'
58+
python.version:'3.9'
59+
maxParallel:4
60+
pool:
61+
vmImage:'$(vmImage)'
62+
steps:
63+
-task:UsePythonVersion@0
64+
inputs:
65+
versionSpec:'$(python.version)'
66+
architecture:'x64'
67+
displayName:'Use Python $(python.version)'
68+
condition:and(succeeded(), ne(variables['python.version'], 'Pre'))
4869

49-
-task:stevedower.python.InstallPython.InstallPython@1
50-
displayName:'Use prerelease Python'
51-
inputs:
52-
prerelease:true
53-
condition:and(succeeded(), eq(variables['python.version'], 'Pre'))
70+
-task:stevedower.python.InstallPython.InstallPython@1
71+
displayName:'Use prerelease Python'
72+
inputs:
73+
prerelease:true
74+
condition:and(succeeded(), eq(variables['python.version'], 'Pre'))
5475

55-
-bash:|
56-
set -e
57-
case "$(python -c 'import sys; print(sys.platform)')" in
58-
linux)
59-
sudo apt update
60-
sudo apt install \
61-
cm-super \
62-
dvipng \
63-
ffmpeg \
64-
gdb \
65-
gir1.2-gtk-3.0 \
66-
graphviz \
67-
inkscape \
68-
libcairo2 \
69-
libgirepository-1.0.1 \
70-
lmodern \
71-
fonts-freefont-otf \
72-
poppler-utils \
73-
texlive-pictures \
74-
texlive-fonts-recommended \
75-
texlive-latex-base \
76-
texlive-latex-extra \
77-
texlive-latex-recommended \
78-
texlive-xetex texlive-luatex \
79-
ttf-wqy-zenhei
80-
;;
81-
darwin)
82-
brew install --cask xquartz
83-
brew install pkg-config ffmpeg imagemagick mplayer ccache
84-
;;
85-
win32)
86-
;;
87-
*)
88-
exit 1
89-
;;
90-
esac
91-
displayName:'Install dependencies'
76+
-bash:|
77+
set -e
78+
case "$(python -c 'import sys; print(sys.platform)')" in
79+
linux)
80+
sudo apt update
81+
sudo apt install \
82+
cm-super \
83+
dvipng \
84+
ffmpeg \
85+
gdb \
86+
gir1.2-gtk-3.0 \
87+
graphviz \
88+
inkscape \
89+
libcairo2 \
90+
libgirepository-1.0.1 \
91+
lmodern \
92+
fonts-freefont-otf \
93+
poppler-utils \
94+
texlive-pictures \
95+
texlive-fonts-recommended \
96+
texlive-latex-base \
97+
texlive-latex-extra \
98+
texlive-latex-recommended \
99+
texlive-xetex texlive-luatex \
100+
ttf-wqy-zenhei
101+
;;
102+
darwin)
103+
brew install --cask xquartz
104+
brew install pkg-config ffmpeg imagemagick mplayer ccache
105+
;;
106+
win32)
107+
;;
108+
*)
109+
exit 1
110+
;;
111+
esac
112+
displayName: 'Install dependencies'
92113
93-
-bash:|
94-
python -m pip install --upgrade pip
95-
python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt ||
96-
[[ "$PYTHON_VERSION" = 'Pre' ]]
97-
displayName:'Install dependencies with pip'
114+
-bash:|
115+
python -m pip install --upgrade pip
116+
python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt ||
117+
[[ "$PYTHON_VERSION" = 'Pre' ]]
118+
displayName: 'Install dependencies with pip'
98119
99-
-bash:|
100-
python -m pip install -ve . ||
101-
[[ "$PYTHON_VERSION" = 'Pre' ]]
102-
displayName:"Install self"
120+
-bash:|
121+
python -m pip install -ve . ||
122+
[[ "$PYTHON_VERSION" = 'Pre' ]]
123+
displayName: "Install self"
103124
104-
-script:env
105-
displayName:'print env'
125+
-script:env
126+
displayName:'print env'
106127

107-
-bash:|
108-
PYTHONFAULTHANDLER=1 python -m pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 ||
109-
[[ "$PYTHON_VERSION" = 'Pre' ]]
110-
displayName:'pytest'
128+
-bash:|
129+
PYTHONFAULTHANDLER=1 python -m pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 ||
130+
[[ "$PYTHON_VERSION" = 'Pre' ]]
131+
displayName: 'pytest'
111132
112-
-bash:|
113-
bash <(curl -s https://codecov.io/bash) -f "!*.gcov" -X gcov
114-
displayName:'Upload to codecov.io'
133+
-bash:|
134+
bash <(curl -s https://codecov.io/bash) -f "!*.gcov" -X gcov
135+
displayName: 'Upload to codecov.io'
115136
116-
-task:PublishTestResults@2
117-
inputs:
118-
testResultsFiles:'**/test-results.xml'
119-
testRunTitle:'Python $(python.version)'
120-
condition:succeededOrFailed()
137+
-task:PublishTestResults@2
138+
inputs:
139+
testResultsFiles:'**/test-results.xml'
140+
testRunTitle:'Python $(python.version)'
141+
condition:succeededOrFailed()
121142

122-
-publish:$(System.DefaultWorkingDirectory)/result_images
123-
artifact:$(Agent.JobName)-result_images
124-
condition:and(failed(), ne(variables['python.version'], 'Pre'))
143+
-publish:$(System.DefaultWorkingDirectory)/result_images
144+
artifact:$(Agent.JobName)-result_images
145+
condition:and(failed(), ne(variables['python.version'], 'Pre'))

‎doc/devel/coding_guide.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,18 @@ will run on all supported platforms and versions of Python.
219219

220220
.. _tox:https://tox.readthedocs.io/
221221

222+
* If you know your changes do not need to be tested (this is very rare!), all
223+
CIs can be skipped for a given commit by including ``[ci skip]`` or
224+
``[skip ci]`` in the commit message. If you know only a subset of CIs need
225+
to be run (e.g., if you are changing some block of plain reStructuredText and
226+
want only CircleCI to run to render the result), individual CIs can be
227+
skipped on individual commits as well by using the following substrings
228+
in commit messages:
229+
230+
- GitHub Actions: ``[skip actions]``
231+
- AppVeyor: ``[skip appveyor]`` (must be in the first line of the commit)
232+
- Azure Pipelines: ``[skip azp]``
233+
- CircleCI: ``[skip circle]``
222234

223235
.. _pr-squashing:
224236

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp