Skip to content

Opensuse 3.6 gh action #68

Opensuse 3.6 gh action

Opensuse 3.6 gh action #68

Workflow file for this run

name: Tests
on:
pull_request:
jobs:
check_source:
name: 'Check for source changes'
runs-on: ubuntu-latest
outputs:
run_tests: ${{ steps.check.outputs.run_tests }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1000
- name: Check for source changes
id: check
run: |
if [ -z "$GITHUB_BASE_REF" ]; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
else
git fetch origin $GITHUB_BASE_REF --depth=1
# git diff using 2 dots should be enough on GitHub.
# See https://github.com/python/core-workflow/issues/373
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> "$GITHUB_OUTPUT" || true
fi
check_abi_opensuse:
name: 'Check ABI (openSUSE Leap)'
runs-on: ubuntu-latest
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
container:
image: opensuse/leap:latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
zypper --non-interactive install --auto-agree-with-licenses \
gcc \
make \
libabigail-tools \
libffi-devel \
zlib-devel \
ncurses-devel \
gdbm-devel \
sqlite3-devel \
tk-devel \
readline-devel \
xz-devel \
bzip2 \
openssl
- name: Build CPython
env:
CFLAGS: -g3 -O0
run: |
# Build Python with the libpython dynamic library
./configure --enable-shared
make -j4
- name: Check for changes in the ABI
run: make check-abidump
check_generated_files_opensuse:
name: 'Check generated files (openSUSE Leap)'
runs-on: ubuntu-latest
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
container:
image: opensuse/leap:latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
zypper --non-interactive install --auto-agree-with-licenses \
gcc \
make \
libffi-devel \
zlib-devel \
ncurses-devel \
gdbm-devel \
sqlite3-devel \
tk-devel \
readline-devel \
xz-devel \
bzip2 \
openssl
- name: Build CPython
run: |
./configure --with-pydebug
make -j4 regen-all
- name: Check for changes
run: |
changes=$(git status --porcelain)
# Check for changes in regenerated files
if ! test -z "$changes"
then
echo "Generated files not up to date. Perhaps you forgot to run make regen-all ;)"
echo "$changes"
exit 1
fi
- name: Check exported libpython symbols
run: make smelly
build_opensuse:
name: 'Build and Test (openSUSE Leap)'
runs-on: ubuntu-latest # The host runner is still Ubuntu
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
container:
image: opensuse/leap:latest # But steps run inside this container
env:
OPENSSL_VER: 1.1.1u
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
zypper --non-interactive install --auto-agree-with-licenses \
gcc \
make \
python3 \
xorg-x11-server-Xvfb \
libffi-devel \
zlib-devel \
ncurses-devel \
gdbm-devel \
sqlite3-devel \
tk-devel \
readline-devel \
xz-devel \
bzip2
- name: 'Restore OpenSSL build'
id: cache-openssl
uses: actions/cache@v4
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
# Updated key to be specific to the OS distribution
key: opensuse-leap-multissl-openssl-${{ env.OPENSSL_VER }}
- name: Install OpenSSL
if: steps.cache-openssl.outputs.cache-hit != 'true'
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux
- name: Configure CPython
run: ./configure --with-pydebug --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER
- name: Build CPython
run: make -j4
- name: Display build info
run: make pythoninfo
- name: Tests
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"