|
| 1 | +name: Build wheels for CPython2.7 x86 on Ubuntu16 with GCC-5 with All warnings, test external build |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +concurrency: |
| 6 | + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }} |
| 7 | + cancel-in-progress: true |
| 8 | + |
| 9 | +jobs: |
| 10 | + build_wheels: |
| 11 | + name: Build wheel - ${{ matrix.os.name }} |
| 12 | + runs-on: ${{ matrix.os.runs-on }} |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + os: |
| 17 | + - name: Ubuntu 24+16 i386 CPython 2.7 |
| 18 | + runs-on: ubuntu-latest |
| 19 | + matrix: linux |
| 20 | + arch: i386 |
| 21 | + tag_arch: i686 |
| 22 | + release: xenial |
| 23 | + mirror: http://azure.archive.ubuntu.com/ubuntu |
| 24 | + #version: 1.5.6.7 |
| 25 | + #pyver: "2.7" |
| 26 | + getpipurl: https://bootstrap.pypa.io/pip/2.7/get-pip.py |
| 27 | + pypkg: python2.7 |
| 28 | + pyengine_tag: cp27-cp27mu |
| 29 | + libc_tag: manylinux_2_4 |
| 30 | + steps: |
| 31 | + - name: Checkout code |
| 32 | + uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + submodules: 'recursive' |
| 35 | + |
| 36 | + - name: Update and upgrade Ubuntu 24 |
| 37 | + if: matrix.os.matrix == 'linux' |
| 38 | + run: | |
| 39 | + sudo which apt |
| 40 | + sudo apt update; |
| 41 | + sudo apt purge -y firefox lxd snapd; |
| 42 | + sudo apt install -y zram-config; |
| 43 | + sudo apt list --upgradable; |
| 44 | + sudo apt upgrade -y; |
| 45 | + sudo apt install -f |
| 46 | +
|
| 47 | + - name: Build source distribution with Ubuntu |
| 48 | + if: matrix.os.matrix == 'linux' |
| 49 | + run: | |
| 50 | + sudo apt install -y debootstrap qemu-user; |
| 51 | + pip install build; |
| 52 | + python -m build --sdist --outdir dist . |
| 53 | +
|
| 54 | + - name: Debootstrap Ubuntu ${{matrix.os.release}} ${{matrix.os.arch}} |
| 55 | + if: matrix.os.matrix == 'linux' |
| 56 | + run: | |
| 57 | + sudo debootstrap --no-merged-usr --verbose --include=sudo,wget,curl,gnupg,ca-certificates --arch=${{matrix.os.arch}} ${{matrix.os.release}} ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} ${{matrix.os.mirror}} || tail ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/debootstrap/debootstrap.log |
| 58 | +
|
| 59 | + - name: Update and Upgrade Ubuntu ${{matrix.os.release}} |
| 60 | + if: matrix.os.matrix == 'linux' |
| 61 | + run: | |
| 62 | + sudo mkdir -p ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel |
| 63 | + sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/proc -t proc |
| 64 | + sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/dev/pts -t devpts |
| 65 | + sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/sys -t sysfs |
| 66 | + echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/python ubuntu-${{matrix.os.release}} main" > rusoft-python.list |
| 67 | + echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/backports ubuntu-${{matrix.os.release}} main" > rusoft-backports.list |
| 68 | + echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/packages ubuntu-${{matrix.os.release}} main" > rusoft-packages.list |
| 69 | + echo "# deb [trusted=yes] http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu ${{matrix.os.release}} main" > deadsnakes.list |
| 70 | + echo "# deb [trusted=yes] http://apt.llvm.org/${{matrix.os.release}}/ llvm-toolchain-${{matrix.os.release}}-20 main " > clang.list |
| 71 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt update |
| 72 | + sudo cp -v ./*.list ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/etc/apt/sources.list.d |
| 73 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c 'cd /etc/apt/trusted.gpg.d && wget http://packages.rusoft.ru/apt/public.gpg -Orusoft.gpg' |
| 74 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c 'cd /etc/apt/trusted.gpg.d && wget http://packages.rusoft.ru/apt/public-old.gpg -Orusoft-old.gpg' |
| 75 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c 'apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A2CE4BCCC50209DD || true' |
| 76 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt update |
| 77 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt dist-upgrade -y |
| 78 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt -fy install |
| 79 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt upgrade -y |
| 80 | +
|
| 81 | + - name: Pepare dev files |
| 82 | + if: matrix.os.matrix == 'linux' |
| 83 | + run: | |
| 84 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt-cache search libzstd-dev |
| 85 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt-cache madison libzstd |
| 86 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt install -y libzstd-dev |
| 87 | +
|
| 88 | + - name: Pepare for ${{matrix.os.pypkg}} ${{matrix.os.arch}} |
| 89 | + if: matrix.os.matrix == 'linux' |
| 90 | + run: | |
| 91 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt-cache madison clang-18 |
| 92 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt install -y ${{matrix.os.pypkg}}-dev gcc pkg-config ${{matrix.os.pypkgadd}} |
| 93 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "wget ${{matrix.os.getpipurl}} -O get-pip.py && ${{matrix.os.pypkg}} get-pip.py" |
| 94 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "${{matrix.os.pypkg}} -m pip install -U 'setuptools'" |
| 95 | + |
| 96 | + - name: Pepare source and build wheel for ${{matrix.os.pypkg}} ${{matrix.os.arch}} |
| 97 | + if: matrix.os.matrix == 'linux' |
| 98 | + run: | |
| 99 | + sudo mkdir -p ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/ |
| 100 | + version=`cat version` |
| 101 | + echo "$version" |
| 102 | + sudo tar -xvf dist/zstd-$version.tar.gz -C ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/ |
| 103 | + false && sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} env |
| 104 | + |
| 105 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} pkg-config libzstd --modversion |
| 106 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} echo GCC-5 |
| 107 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} gcc-5 -v |
| 108 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version && _CC=clang-20 ZSTD_ASM=1 ZSTD_WARNINGS=1 ZSTD_WERRORS=1 _ZSTD_SMALL=1 _ZSTD_ASM_BMI2=1 ZSTD_THREADS=1 ZSTD_EXTERNAL=1 CC=gcc-5 ${{matrix.os.pypkg}} setup.py bdist_wheel " |
| 109 | +
|
| 110 | + - name: Test wheel for ${{matrix.os.pypkg}} ${{matrix.os.arch}} |
| 111 | + if: matrix.os.matrix == 'linux' |
| 112 | + run: | |
| 113 | + false && sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} find /build_wheel/ |
| 114 | + version=`cat version` |
| 115 | + echo version=$version |
| 116 | + sudo cp -v glibc-check.sh ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/zstd-$version/ |
| 117 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version/ ; echo LLH; ls -lh build/*/zstd.so; echo LDD; ldd build/*/zstd.so;echo FILE; file build/*/zstd.so; echo LIBC; bash ./glibc-check.sh build/*/zstd.so" |
| 118 | + sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version && ${{matrix.os.pypkg}} setup.py test" |
| 119 | +
|
| 120 | + - name: Pepare wheel for upload |
| 121 | + if: matrix.os.matrix == 'linux' |
| 122 | + run: | |
| 123 | + version=`cat version` |
| 124 | + echo version=$version |
| 125 | + sudo cp -v ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/zstd-$version/dist/* ./dist |
| 126 | + sudo ls -lh ./dist/* |
| 127 | + sudo mv -v ./dist/"zstd-$version-${{matrix.os.pyengine_tag}}-linux_${{matrix.os.tag_arch}}.whl" ./dist/"zstd-$version-${{matrix.os.pyengine_tag}}-${{matrix.os.libc_tag}}_${{matrix.os.tag_arch}}.whl" |
| 128 | +
|
0 commit comments