Skip to content

Commit 6279ffe

Browse files
committed
ci: copy Fedora 3.7 GitHub Actions configuration
1 parent 6616512 commit 6279ffe

File tree

10 files changed

+539
-44
lines changed

10 files changed

+539
-44
lines changed

.github/CODEOWNERS

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# See https://help.github.com/articles/about-codeowners/
2+
# for more info about CODEOWNERS file
3+
4+
# It uses the same pattern rule for gitignore file
5+
# https://git-scm.com/docs/gitignore#_pattern_format
6+
7+
# asyncio
8+
**/*asyncio* @1st1 @asvetlov
9+
10+
# Core
11+
**/*context* @1st1
12+
**/*genobject* @1st1
13+
**/*hamt* @1st1
14+
15+
# Hashing
16+
**/*hashlib* @python/crypto-team
17+
**/*pyhash* @python/crypto-team
18+
19+
# Import (including importlib).
20+
# Ignoring importlib.h so as to not get flagged on
21+
# all pull requests that change the emitted
22+
# bytecode.
23+
**/*import*.c @python/import-team
24+
**/*import*.py @python/import-team
25+
26+
27+
# SSL
28+
**/*ssl* @python/crypto-team
29+
30+
# CSPRNG
31+
Python/bootstrap_hash.c @python/crypto-team
32+
33+
# Email and related
34+
**/*mail* @python/email-team
35+
**/*smtp* @python/email-team
36+
**/*mime* @python/email-team
37+
**/*imap* @python/email-team
38+
**/*poplib* @python/email-team
39+
40+
# subprocess
41+
**/*subprocess* @gpshead
42+
43+
# Windows
44+
/PC/ @python/windows-team
45+
/PCbuild/ @python/windows-team
46+
47+
# Windows installer packages
48+
/Tools/msi/ @python/windows-team
49+
/Tools/nuget/ @python/windows-team
50+
51+
**/*itertools* @rhettinger
52+
**/*collections* @rhettinger
53+
**/*random* @rhettinger
54+
**/*queue* @rhettinger
55+
**/*bisect* @rhettinger
56+
**/*heapq* @rhettinger
57+
**/*functools* @ncoghlan @rhettinger
58+
**/*decimal* @rhettinger @skrah
59+
60+
**/*dataclasses* @ericvsmith
61+
62+
**/*idlelib* @terryjreedy
63+
64+
**/*typing* @gvanrossum @ilevkivskyi

.github/CONTRIBUTING.rst

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Contributing to Python
2+
======================
3+
4+
Build Status
5+
------------
6+
7+
- master
8+
9+
+ `Stable buildbots <http://buildbot.python.org/3.x.stable/>`_
10+
11+
- 3.7
12+
13+
+ `Stable buildbots <http://buildbot.python.org/3.7.stable/>`_
14+
15+
- 3.6
16+
17+
+ `Stable buildbots <http://buildbot.python.org/3.6.stable/>`_
18+
19+
- 2.7
20+
21+
+ `Stable buildbots <http://buildbot.python.org/2.7.stable/>`_
22+
23+
24+
Thank You
25+
---------
26+
First off, thanks for contributing to the maintenance of the Python programming
27+
language and the CPython interpreter! Even if your contribution is not
28+
ultimately accepted, the fact you put time and effort into helping out is
29+
greatly appreciated.
30+
31+
32+
Contribution Guidelines
33+
-----------------------
34+
Please read the `devguide <https://devguide.python.org/>`_ for
35+
guidance on how to contribute to this project. The documentation covers
36+
everything from how to build the code to submitting a pull request. There are
37+
also suggestions on how you can most effectively help the project.
38+
39+
Please be aware that our workflow does deviate slightly from the typical GitHub
40+
project. Details on how to properly submit a pull request are covered in
41+
`Lifecycle of a Pull Request <https://devguide.python.org/pullrequest/>`_.
42+
We utilize various bots and status checks to help with this, so do follow the
43+
comments they leave and their "Details" links, respectively. The key points of
44+
our workflow that are not covered by a bot or status check are:
45+
46+
- All discussions that are not directly related to the code in the pull request
47+
should happen on bugs.python.org
48+
- Upon your first non-trivial pull request (which includes documentation changes),
49+
feel free to add yourself to ``Misc/ACKS``
50+
51+
52+
Setting Expectations
53+
--------------------
54+
Due to the fact that this project is entirely volunteer-run (i.e. no one is paid
55+
to work on Python full-time), we unfortunately can make no guarantees as to if
56+
or when a core developer will get around to reviewing your pull request.
57+
If no core developer has done a review or responded to changes made because of a
58+
"changes requested" review, please feel free to email python-dev to ask if
59+
someone could take a look at your pull request.
60+
61+
62+
Code of Conduct
63+
---------------
64+
All interactions for this project are covered by the
65+
`PSF Code of Conduct <https://www.python.org/psf/codeofconduct/>`_. Everyone is
66+
expected to be open, considerate, and respectful of others no matter their
67+
position within the project.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
## CPython Mirror
1+
!!! If this is a backport PR (PR made against branches other than `master`),
2+
please ensure that the PR title is in the following format:
23

3-
https://github.com/python/cpython is a cpython mirror repository. Pull requests
4-
are not accepted on this repo and will be automatically closed.
4+
```
5+
[X.Y] <title from the original PR> (GH-NNNN)
6+
```
57

6-
### Submit patches at https://bugs.python.org
8+
Where: [X.Y] is the branch name, e.g. [3.7].
79

8-
For additional information about contributing to CPython, see the
9-
[developer's guide](https://docs.python.org/devguide/#contributing).
10+
GH-NNNN refers to the PR number from `master`.
11+
12+
PLEASE: Remove this headline!!!

.github/appveyor.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
name: Tests
2+
3+
# bpo-40548: "paths-ignore" is not used to skip documentation-only PRs, because
4+
# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
5+
# mandatory but not scheduled because of "paths-ignore".
6+
on:
7+
pull_request:
8+
branches:
9+
- master
10+
- 3.8
11+
- 3.7
12+
13+
jobs:
14+
check_source:
15+
name: 'Check for source changes'
16+
runs-on: ubuntu-latest
17+
outputs:
18+
run_tests: ${{ steps.check.outputs.run_tests }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 1000
23+
- name: Check for source changes
24+
id: check
25+
run: |
26+
if [ -z "$GITHUB_BASE_REF" ]; then
27+
echo '::set-output name=run_tests::true'
28+
else
29+
git fetch origin $GITHUB_BASE_REF --depth=1
30+
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
31+
# reliable than git diff "origin/$GITHUB_BASE_REF.." (2 dots),
32+
# but it requires to download more commits (this job uses
33+
# "git fetch --depth=1").
34+
#
35+
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) works with Git
36+
# 2.26, but Git 2.28 is stricter and fails with "no merge base".
37+
#
38+
# git diff "origin/$GITHUB_BASE_REF.." (2 dots) should be enough on
39+
# GitHub, since GitHub starts by merging origin/$GITHUB_BASE_REF
40+
# into the PR branch anyway.
41+
#
42+
# https://github.com/python/core-workflow/issues/373
43+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
44+
fi
45+
46+
check_abi:
47+
name: 'Check if the ABI has changed'
48+
runs-on: ubuntu-20.04
49+
needs: check_source
50+
if: needs.check_source.outputs.run_tests == 'true'
51+
steps:
52+
- uses: actions/checkout@v2
53+
- uses: actions/setup-python@v2
54+
- name: Install Dependencies
55+
run: |
56+
sudo ./.github/workflows/posix-deps-apt.sh
57+
sudo apt-get install -yq abigail-tools
58+
- name: Build CPython
59+
env:
60+
CFLAGS: -g3 -O0
61+
run: |
62+
# Build Python with the libpython dynamic library
63+
./configure --enable-shared
64+
make -j4
65+
- name: Check for changes in the ABI
66+
run: make check-abidump
67+
68+
check_generated_files:
69+
name: 'Check if generated files are up to date'
70+
runs-on: ubuntu-latest
71+
needs: check_source
72+
if: needs.check_source.outputs.run_tests == 'true'
73+
steps:
74+
- uses: actions/checkout@v2
75+
- uses: actions/setup-python@v2
76+
- name: Install Dependencies
77+
run: sudo ./.github/workflows/posix-deps-apt.sh
78+
- name: Build CPython
79+
run: |
80+
./configure --with-pydebug
81+
make -j4 regen-all
82+
- name: Check for changes
83+
run: |
84+
changes=$(git status --porcelain)
85+
# Check for changes in regenerated files
86+
if ! test -z "$changes"
87+
then
88+
echo "Generated files not up to date. Perhaps you forgot to run make regen-all ;)"
89+
echo "$changes"
90+
exit 1
91+
fi
92+
- name: Check exported libpython symbols
93+
run: make smelly
94+
95+
build_win32:
96+
name: 'Windows (x86)'
97+
runs-on: windows-2019
98+
needs: check_source
99+
if: needs.check_source.outputs.run_tests == 'true'
100+
steps:
101+
- uses: actions/checkout@v2
102+
- name: Build CPython
103+
run: .\PCbuild\build.bat -e -p Win32
104+
- name: Display build info
105+
run: .\python.bat -m test.pythoninfo
106+
- name: Tests
107+
run: .\PCbuild\rt.bat -p Win32 -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
108+
109+
build_win_amd64:
110+
name: 'Windows (x64)'
111+
runs-on: windows-2019
112+
needs: check_source
113+
if: needs.check_source.outputs.run_tests == 'true'
114+
steps:
115+
- uses: actions/checkout@v2
116+
- name: Build CPython
117+
run: .\PCbuild\build.bat -e -p x64
118+
- name: Display build info
119+
run: .\python.bat -m test.pythoninfo
120+
- name: Tests
121+
run: .\PCbuild\rt.bat -p x64 -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
122+
123+
build_macos:
124+
name: 'macOS'
125+
runs-on: macos-latest
126+
needs: check_source
127+
if: needs.check_source.outputs.run_tests == 'true'
128+
env:
129+
HOMEBREW_NO_ANALYTICS: 1
130+
HOMEBREW_NO_AUTO_UPDATE: 1
131+
HOMEBREW_NO_INSTALL_CLEANUP: 1
132+
steps:
133+
- uses: actions/checkout@v2
134+
- name: Configure CPython
135+
run: |
136+
brew install pkg-config [email protected] xz gdbm tcl-tk
137+
brew install zlib bzip2 ncurses readline sqlite
138+
SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk \
139+
CC=clang \
140+
CPPFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include \
141+
-I$(brew --prefix zlib)/include -I$(brew --prefix bzip2)/include \
142+
-I$(brew --prefix ncurses)/include -I$(brew --prefix readline)/include \
143+
-I$(brew --prefix sqlite)/include" \
144+
LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib \
145+
-L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib \
146+
-L$(brew --prefix ncurses)/lib -L$(brew --prefix readline)/lib \
147+
-L$(brew --prefix sqlite)/lib" \
148+
./configure --prefix=/opt/python-dev \
149+
--with-pydebug \
150+
--with-openssl="$(brew --prefix [email protected])" \
151+
--with-tcltk-libs="$(pkg-config --libs tk)" \
152+
--with-tcltk-includes="$(pkg-config --cflags tk)"
153+
- name: Build CPython
154+
run: make -j4
155+
- name: Display build info
156+
run: make pythoninfo
157+
- name: Tests
158+
run: make buildbottest TESTOPTS="-j4 -uall,-cpu"
159+
160+
build_ubuntu:
161+
name: 'Ubuntu'
162+
runs-on: ubuntu-20.04
163+
needs: check_source
164+
if: needs.check_source.outputs.run_tests == 'true'
165+
env:
166+
OPENSSL_VER: 1.1.1u
167+
steps:
168+
- uses: actions/checkout@v2
169+
- name: Install Dependencies
170+
run: sudo ./.github/workflows/posix-deps-apt.sh
171+
- name: 'Restore OpenSSL build'
172+
id: cache-openssl
173+
uses: actions/[email protected]
174+
with:
175+
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
176+
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
177+
- name: Install OpenSSL
178+
if: steps.cache-openssl.outputs.cache-hit != 'true'
179+
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux
180+
- name: Configure CPython
181+
run: ./configure --with-pydebug --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER
182+
- name: Build CPython
183+
run: make -j4
184+
- name: Display build info
185+
run: make pythoninfo
186+
- name: Tests
187+
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"

0 commit comments

Comments
 (0)