-
Notifications
You must be signed in to change notification settings - Fork 62
90 lines (77 loc) · 2.87 KB
/
testrelease_binary.yml
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
name: testrelease_binary
on:
push:
#branches: [ action_test ]
tags: ["test_*"]
jobs:
make_sdist:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- name: build_sdist
run: |
echo This job does not specify a container.
echo It runs directly on the virtual machine.
#
git clone https://github.com/mfem/PyMFEM.git
cd PyMFEM
#
REF=$(echo ${GITHUB_REF#refs/heads/})
echo "!!!!!: "$REF
git checkout $REF
#
export PATH=/opt/python/cp37-cp37m/bin:$PATH
pip3 install wheel six auditwheel twine
pip3 install urllib3==1.26.6 # use older version to avoid OpenSSL vesion issue
pip3 install numpy==1.21.6
#if [ -f requirements.txt ]; then
# pip3 install -r requirements.txt
#fi
rm -rf dist/*
python3 setup.py sdist
ls -l dist/
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
#python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*
make_binary_3_8_9_10_11:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
#container: node:10.16-jessie
steps:
- name: build package
run: |
echo It runs in the container instead of the VM.
#
git clone https://github.com/mfem/PyMFEM.git
cd PyMFEM
#
REF=$(echo ${GITHUB_REF#refs/heads/})
echo "!!!!!!: "$REF
git checkout $REF
#
ls -l /opt/python/
export PATH=/opt/python/${{ matrix.pythonpath }}/bin:$PATH
pip3 install auditwheel twine
pip3 install urllib3==1.26.6 # use older version to avoid OpenSSL vesion issue
pip3 install -r requirements.txt
CWD=$PWD
yum install -y zlib-devel
yum install -y chrpath
mkdir dist
# build wheel and check it
python3 -m pip wheel ./ --verbose --no-deps
pip3 install *.whl
cd test
python run_examples.py -serial -verbose -ex ex1
cd ..
rm -rf dist/*
export LD_LIBRARY_PATH=${CWD}/external/mfem/cmbuild_ser/:$LD_LIBRARY_PATH
auditwheel repair *.whl
rm -rf dist/*
mv wheelhouse/* dist/
ls -l dist/
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
#python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*