1
1
name : Tests
2
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
3
on :
7
4
pull_request :
8
5
@@ -13,44 +10,46 @@ jobs:
13
10
outputs :
14
11
run_tests : ${{ steps.check.outputs.run_tests }}
15
12
steps :
16
- - uses : actions/checkout@v2
13
+ - uses : actions/checkout@v4
17
14
with :
18
15
fetch-depth : 1000
19
16
- name : Check for source changes
20
17
id : check
21
18
run : |
22
19
if [ -z "$GITHUB_BASE_REF" ]; then
23
- echo '::set-output name= run_tests:: true'
20
+ echo " run_tests= true" >> "$GITHUB_OUTPUT"
24
21
else
25
22
git fetch origin $GITHUB_BASE_REF --depth=1
26
- # git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
27
- # reliable than git diff "origin/$GITHUB_BASE_REF.." (2 dots),
28
- # but it requires to download more commits (this job uses
29
- # "git fetch --depth=1").
30
- #
31
- # git diff "origin/$GITHUB_BASE_REF..." (3 dots) works with Git
32
- # 2.26, but Git 2.28 is stricter and fails with "no merge base".
33
- #
34
- # git diff "origin/$GITHUB_BASE_REF.." (2 dots) should be enough on
35
- # GitHub, since GitHub starts by merging origin/$GITHUB_BASE_REF
36
- # into the PR branch anyway.
37
- #
38
- # https://github.com/python/core-workflow/issues/373
39
- git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
23
+ # git diff using 2 dots should be enough on GitHub.
24
+ # See https://github.com/python/core-workflow/issues/373
25
+ git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> "$GITHUB_OUTPUT" || true
40
26
fi
41
27
42
- check_abi :
43
- name : ' Check if the ABI has changed '
44
- runs-on : ubuntu-20.04
28
+ check_abi_opensuse :
29
+ name : ' Check ABI (openSUSE Leap) '
30
+ runs-on : ubuntu-latest
45
31
needs : check_source
46
32
if : needs.check_source.outputs.run_tests == 'true'
33
+ container :
34
+ image : opensuse/leap:latest
47
35
steps :
48
- - uses : actions/checkout@v2
49
- - uses : actions/setup-python@v2
36
+ - uses : actions/checkout@v4
50
37
- name : Install Dependencies
51
38
run : |
52
- sudo ./.github/workflows/posix-deps-apt.sh
53
- sudo apt-get install -yq abigail-tools
39
+ zypper --non-interactive install --auto-agree-with-licenses \
40
+ gcc \
41
+ make \
42
+ libabigail-tools \
43
+ libffi-devel \
44
+ zlib-devel \
45
+ ncurses-devel \
46
+ gdbm-devel \
47
+ sqlite3-devel \
48
+ tk-devel \
49
+ readline-devel \
50
+ xz-devel \
51
+ bzip2 \
52
+ openssl
54
53
- name : Build CPython
55
54
env :
56
55
CFLAGS : -g3 -O0
@@ -61,16 +60,31 @@ jobs:
61
60
- name : Check for changes in the ABI
62
61
run : make check-abidump
63
62
64
- check_generated_files :
65
- name : ' Check if generated files are up to date '
63
+ check_generated_files_opensuse :
64
+ name : ' Check generated files (openSUSE Leap) '
66
65
runs-on : ubuntu-latest
67
66
needs : check_source
68
67
if : needs.check_source.outputs.run_tests == 'true'
68
+ container :
69
+ image : opensuse/leap:latest
69
70
steps :
70
- - uses : actions/checkout@v2
71
- - uses : actions/setup-python@v2
71
+ - uses : actions/checkout@v4
72
72
- name : Install Dependencies
73
- run : sudo ./.github/workflows/posix-deps-apt.sh
73
+ run : |
74
+ zypper --non-interactive install --auto-agree-with-licenses \
75
+ gcc \
76
+ make \
77
+ tar \
78
+ libffi-devel \
79
+ zlib-devel \
80
+ ncurses-devel \
81
+ gdbm-devel \
82
+ sqlite3-devel \
83
+ tk-devel \
84
+ readline-devel \
85
+ xz-devel \
86
+ bzip2 \
87
+ openssl
74
88
- name : Build CPython
75
89
run : |
76
90
./configure --with-pydebug
@@ -88,23 +102,41 @@ jobs:
88
102
- name : Check exported libpython symbols
89
103
run : make smelly
90
104
91
- build_ubuntu :
92
- name : ' Ubuntu '
93
- runs-on : ubuntu-20.04
105
+ build_opensuse :
106
+ name : ' Build and Test (openSUSE Leap) '
107
+ runs-on : ubuntu-latest # The host runner is still Ubuntu
94
108
needs : check_source
95
109
if : needs.check_source.outputs.run_tests == 'true'
110
+ container :
111
+ image : opensuse/leap:latest # But steps run inside this container
96
112
env :
97
113
OPENSSL_VER : 1.1.1u
98
114
steps :
99
- - uses : actions/checkout@v2
115
+ - uses : actions/checkout@v4
100
116
- name : Install Dependencies
101
- run : sudo ./.github/workflows/posix-deps-apt.sh
117
+ run : |
118
+ zypper --non-interactive install --auto-agree-with-licenses \
119
+ gcc \
120
+ make \
121
+ tar \
122
+ python3 \
123
+ xorg-x11-server-Xvfb \
124
+ libffi-devel \
125
+ zlib-devel \
126
+ ncurses-devel \
127
+ gdbm-devel \
128
+ sqlite3-devel \
129
+ tk-devel \
130
+ readline-devel \
131
+ xz-devel \
132
+ bzip2
102
133
- name : ' Restore OpenSSL build'
103
134
id : cache-openssl
104
135
uses : actions/cache@v4
105
136
with :
106
137
path : ./multissl/openssl/${{ env.OPENSSL_VER }}
107
- key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
138
+ # Updated key to be specific to the OS distribution
139
+ key : opensuse-leap-multissl-openssl-${{ env.OPENSSL_VER }}
108
140
- name : Install OpenSSL
109
141
if : steps.cache-openssl.outputs.cache-hit != 'true'
110
142
run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux
@@ -115,4 +147,4 @@ jobs:
115
147
- name : Display build info
116
148
run : make pythoninfo
117
149
- name : Tests
118
- run : xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
150
+ run : xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
0 commit comments