-
Notifications
You must be signed in to change notification settings - Fork 18
75 lines (62 loc) · 2.3 KB
/
upload_linux_x64.yaml
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
name: Upload Linux Wheels x86_64
on:
release:
workflow_dispatch:
jobs:
upload-linux-x64:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-latest]
arch: [x86_64]
runs-on: ${{ matrix.os }}
name: ${{matrix.os}} ${{matrix.python-version}}
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml wheel --upgrade
python -m pip install -r dev_requirements.txt
- name: Build flamingpy from Source
run: |
python setup.py develop
python setup.py build_cmake --inplace
- name: Run tests
run: python -m pytest tests/ --tb=native
- name: Stripping C++ modules
run: strip --strip-unneeded flamingpy/cpp/*.so
- name: Build the wheel
run: python setup.py bdist_wheel
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
- name: Rename the wheel
run: |
wheel=$(find dist/*.whl)
mv $wheel $(echo $wheel | sed 's/-linux_/-manylinux1_/')
- name: Publish the wheel
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
#password: ${{ secrets.TEST_PYPI_API_TOKEN }}
#repository_url: https://test.pypi.org/legacy/
- name: Uninstall existing versions and add a delay
run: |
python -m pip uninstall flamingpy -y
sleep 5m
- name: Pip install flamingpy
run: python -m pip install flamingpy
- name: Run some involved package examples for testing purposes
run: |
python /opt/hostedtoolcache/Python/*/x64/lib/python*/site-packages/flamingpy/benchmarks/lemon.py
python /opt/hostedtoolcache/Python/*/x64/lib/python*/site-packages/flamingpy/benchmarks/shortest_path.py