2020      - published 
2121
2222jobs :
23-   deploy -linux
23+   build -linux-py3 
2424    runs-on : ubuntu-latest 
25+     strategy :
26+       fail-fast : true 
27+       matrix :
28+         wheel :
29+           - cp37-manylinux 
30+           - cp37-musllinux 
31+           - cp38-manylinux 
32+           - cp38-musllinux 
33+           - cp39-manylinux 
34+           - cp39-musllinux 
35+           - cp310-manylinux 
36+           - cp310-musllinux 
37+           - cp311-manylinux 
38+           - cp311-musllinux 
39+           - cp312-manylinux 
40+           - cp312-musllinux 
2541
2642    steps :
27-       - uses : actions/checkout@v3  
43+       - uses : actions/checkout@v4  
2844        with :
2945          persist-credentials : false 
3046          fetch-depth : 0 
3147
3248      - name : Setup QEMU 
33-         uses : docker/setup-qemu-action@v1 
49+         uses : docker/setup-qemu-action@v3 
50+ 
51+       - name : Build Wheels 
52+ 53+         env :
54+           CIBW_PLATFORM : linux 
55+           CIBW_BUILD : " ${{ matrix.wheel }}*" 
56+           CIBW_ARCHS_LINUX : x86_64 aarch64 
57+           CIBW_ENVIRONMENT : " LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib" 
58+           CIBW_TEST_REQUIRES : pytest 
59+           CIBW_TEST_COMMAND : " PYTHONPATH={project}/tests pytest {project}/tests/agent_unittests -vx" 
60+ 
61+       - name : Upload Artifacts 
62+ 63+         with :
64+           name : ${{ github.job }}-${{ matrix.wheel }} 
65+           path : ./wheelhouse/*.whl 
66+           retention-days : 1 
67+ 
68+   build-linux-py2 :
69+     runs-on : ubuntu-latest 
70+ 
71+     steps :
72+       - uses : actions/checkout@v4 
73+         with :
74+           persist-credentials : false 
75+           fetch-depth : 0 
76+ 
77+       - name : Setup QEMU 
78+         uses : docker/setup-qemu-action@v3 
79+ 
80+       - name : Build Wheels 
81+ 82+         env :
83+           CIBW_PLATFORM : linux 
84+           CIBW_BUILD : cp27-manylinux_x86_64 
85+           CIBW_ARCHS_LINUX : x86_64 
86+           CIBW_ENVIRONMENT : " LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib" 
87+           CIBW_TEST_REQUIRES : pytest==4.6.11 
88+           CIBW_TEST_COMMAND : " PYTHONPATH={project}/tests pytest {project}/tests/agent_unittests -vx" 
89+ 
90+       - name : Upload Artifacts 
91+ 92+         with :
93+           name : ${{ github.job }} 
94+           path : ./wheelhouse/*.whl 
95+           retention-days : 1 
96+ 
97+   build-sdist :
98+     runs-on : ubuntu-latest 
99+     steps :
100+       - uses : actions/checkout@v4 
101+         with :
102+           persist-credentials : false 
103+           fetch-depth : 0 
104+ 
105+       - name : Install Dependencies 
106+         run : | 
107+           pip install -U pip 
108+           pip install -U setuptools 
109+ 
110+ name : Build Source Package 
111+         run : | 
112+           python setup.py sdist 
113+ 
114+ name : Prepare MD5 Hash File 
115+         run : | 
116+           tarball="$(python setup.py --fullname).tar.gz" 
117+           md5_file=${tarball}.md5 
118+           openssl md5 -binary dist/${tarball} | xxd -p | tr -d '\n' > dist/${md5_file} 
119+ 
120+ name : Upload Artifacts 
121+ 122+         with :
123+           name : ${{ github.job }}-sdist 
124+           path : | 
125+             ./dist/*.tar.gz 
126+             ./dist/*.tar.gz.md5 
127+ retention-days : 1 
128+ 
129+   deploy :
130+     runs-on : ubuntu-latest 
131+ 
132+     needs : 
133+       - build-linux-py3 
134+       - build-linux-py2 
135+       - build-sdist 
136+ 
137+     steps :
138+       - uses : actions/checkout@v4 
139+         with :
140+           persist-credentials : false 
141+           fetch-depth : 0 
34142
35143      - uses : actions/setup-python@v2 
36144        with :
@@ -42,32 +150,22 @@ jobs:
42150          pip install -U pip 
43151          pip install -U wheel setuptools twine 
44152
45- name : Build Source Package 
46-         run : python setup.py sdist 
47- 
48-       - name : Build Manylinux Wheels (Python 2) 
49- 50-         env :
51-           CIBW_PLATFORM : linux 
52-           CIBW_BUILD : cp27-manylinux_x86_64 
53-           CIBW_ARCHS : x86_64 
54-           CIBW_ENVIRONMENT : " LD_LIBRARY_PATH=/opt/rh/=vtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib" 
153+ name : Download Artifacts 
154+ 155+         with :
156+           path : ./artifacts/ 
55157
56-       - name : Build Manylinux Wheels (Python 3) 
57- 58-         env :
59-           CIBW_PLATFORM : linux 
60-           CIBW_BUILD : cp37-manylinux* cp38-manylinux* cp39-manylinux* cp310-manylinux* cp311-manylinux* 
61-           CIBW_ARCHS : x86_64 aarch64 
62-           CIBW_ENVIRONMENT : " LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib" 
158+       - name : Unpack Artifacts 
159+         run : | 
160+           mkdir -p dist/ 
161+           mv artifacts/**/*{.whl,.tar.gz,.tar.gz.md5} dist/ 
63162
64163name : Upload Package to S3 
65164        run : | 
66165          tarball="$(python setup.py --fullname).tar.gz" 
67-           md5_file=$(mktemp) 
68-           openssl md5 -binary dist/$tarball | xxd -p | tr -d '\n' > $md5_file 
69-           aws s3 cp $md5_file $S3_DST/${tarball}.md5 
70-           aws s3 cp dist/$tarball $S3_DST/$tarball 
166+           md5_file=${tarball}.md5 
167+           aws s3 cp dist/${md5_file} $S3_DST/${md5_file} 
168+           aws s3 cp dist/${tarball} $S3_DST/${tarball} 
71169env :
72170          S3_DST : s3://nr-downloads-main/python_agent/release 
73171          AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }} 
76174
77175      - name : Upload Package to PyPI 
78176        run : | 
79-           twine upload --non-interactive dist/*.tar.gz wheelhouse/*-manylinux *.whl 
177+           twine upload --non-interactive dist/*.tar.gz dist/ *.whl 
80178env :
81179          TWINE_USERNAME : __token__ 
82180          TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }} 
0 commit comments