-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathBuild_wheels_for_pypy310_x64_u16.yml
More file actions
168 lines (149 loc) · 9.32 KB
/
Build_wheels_for_pypy310_x64_u16.yml
File metadata and controls
168 lines (149 loc) · 9.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Build wheels for Pypy3.10 x64 on Ubuntu16
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
cancel-in-progress: true
jobs:
build_wheels:
name: Build wheel - ${{ matrix.os.name }}
runs-on: ${{ matrix.os.runs-on }}
strategy:
fail-fast: false
matrix:
os:
- name: Ubuntu 24+16 amd64 Pypy 3.10
runs-on: ubuntu-latest
matrix: linux
arch: amd64
tag_arch: x86_64
release: xenial
mirror: http://azure.archive.ubuntu.com/ubuntu
getpipurl: https://bootstrap.pypa.io/pip/get-pip.py
pypkg: pypy3.10
pypkgdev: pypy3.10-bin-dev
pyengine_tag: pp310-pypy310_pp73
libc_tag: manylinux_2_14
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Update and upgrade Ubuntu 24
if: matrix.os.matrix == 'linux'
run: |
sudo which apt
sudo apt update;
sudo apt purge -y firefox lxd snapd;
sudo apt install -y zram-config;
sudo apt list --upgradable;
sudo apt dist-upgrade -y;
sudo apt install -f
- name: Build source distribution with Ubuntu
if: matrix.os.matrix == 'linux'
run: |
sudo apt install -y debootstrap qemu-user;
pip install build;
python -m build --sdist --outdir dist .
- name: Debootstrap Ubuntu ${{matrix.os.release}} ${{matrix.os.arch}}
if: matrix.os.matrix == 'linux'
run: |
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
- name: Update and Upgrade Ubuntu ${{matrix.os.release}}
if: matrix.os.matrix == 'linux'
run: |
sudo mkdir -p ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/proc -t proc
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/dev/pts -t devpts
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/sys -t sysfs
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/python ubuntu-${{matrix.os.release}} main" > rusoft-python.list
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/backports ubuntu-${{matrix.os.release}} main" > rusoft-backports.list
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/packages ubuntu-${{matrix.os.release}} main" > rusoft-packages.list
echo " deb [trusted=yes] http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu ${{matrix.os.release}} main" > deadsnakes.list
false && sudo find ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} -iname apt
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt update
sudo cp -v ./*.list ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/etc/apt/sources.list.d
false && sudo rm -fv ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/etc/apt/trusted.gpg.d/* && sudo rm -fv ./ubuntu-xenial-x86/etc/apt/trusted.gpg
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'
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'
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'
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt update
false && sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt dist-upgrade -y
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt -fy install
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt upgrade -y
- name: Pepare dev files
if: matrix.os.matrix == 'linux'
run: |
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt install -y libzstd-dev
- name: Pepare for ${{matrix.os.pypkg}} ${{matrix.os.arch}}
if: matrix.os.matrix == 'linux'
run: |
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt install -y ${{matrix.os.pypkgdev}} gcc pkg-config ${{matrix.os.pypkgadd}}
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 || true"
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "${{matrix.os.pypkg}} -m pip install -U 'setuptools<72.0'"
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "${{matrix.os.pypkg}} -m pip install -U pkginfo"
- name: Pepare source and build wheel for ${{matrix.os.pypkg}} ${{matrix.os.arch}}
if: matrix.os.matrix == 'linux'
run: |
sudo mkdir -p ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/
version=`cat version`
sudo tar -xvf dist/zstd-$version.tar.gz -C ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/
false && sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} env
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} pkg-config libzstd --modversion
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version && ZSTD_ASM=1 _ZSTD_SMALL=1 ZSTD_WARNINGS=1 _ZSTD_ASM_BMI2=1 ZSTD_THREADS=1 _ZSTD_EXTERNAL=0 ${{matrix.os.pypkg}} setup.py bdist_wheel "
- name: Test wheel for ${{matrix.os.pypkg}} ${{matrix.os.arch}}
if: matrix.os.matrix == 'linux'
run: |
version=`cat version`
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} find /build_wheel/
sudo cp -v glibc-check.sh ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/zstd-$version/
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version/ && ls -lh build/*/zstd.*.so; ldd build/*/zstd.*.so; file build/*/zstd.*.so; bash ./glibc-check.sh build/*/zstd.*.so"
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version/ && ${{matrix.os.pypkg}} setup.py test"
- name: Pepare wheel for upload
if: matrix.os.matrix == 'linux'
run: |
version=`cat version`
sudo cp -v ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/zstd-$version/dist/* ./dist
sudo ls -lh ./dist/*
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"
- name: Test for secrets access
id: check_secrets
# If a third party makes a pull request
# this allows automated steps below to be skipped
# and leave a clean PR CI run
shell: bash
run: |
unset HAS_SECRET
unset HAS_SECRET_TEST
if [ -n "$SECRET" ]; then HAS_SECRET='true' ; fi
if [ -n "$SECRET_TEST" ]; then HAS_SECRET_TEST='true' ; fi
echo ::set-output name=HAS_SECRET::${HAS_SECRET}
echo ::set-output name=HAS_SECRET_TEST::${HAS_SECRET_TEST}
env:
SECRET: "${{ secrets.pypi_password }}"
SECRET_TEST: "${{ secrets.test_pypi_password }}"
- name: Install twine
run: pip install 'twine<=6.0.1'
- name: Publish distribution to PyPI
if: >
startsWith(github.event.ref, 'refs/tags') &&
steps.check_secrets.outputs.HAS_SECRET
env:
# If the PR/Push has secret access
# and PYPI_PASSWORD is in GH Secrets for this repo
# and this is a tag, publish to PyPI
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
TWINE_USERNAME: "${{ secrets.pypi_username }}"
TWINE_NON_INTERACTIVE: 1
TWINE_PASSWORD: "${{ secrets.pypi_password }}"
run: twine upload --non-interactive --skip-existing --verbose 'dist/*'
- name: Publish distribution to Test PyPI
if: steps.check_secrets.outputs.HAS_SECRET
env:
# If the PR/Push has secret access
# and TEST_PYPI_PASSWORD is in GH Secrets for this repo
# then publish each build to test PyPI
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
TWINE_USERNAME: "${{ secrets.test_pypi_username }}"
TWINE_NON_INTERACTIVE: 1
TWINE_PASSWORD: "${{ secrets.test_pypi_password }}"
run: twine upload --non-interactive --skip-existing --verbose 'dist/*'