-
Notifications
You must be signed in to change notification settings - Fork 18
108 lines (91 loc) · 3.06 KB
/
upload_win_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
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
name: Upload Win Wheels x86_64
on:
release:
workflow_dispatch:
jobs:
win-x64-wheel:
strategy:
fail-fast: false
matrix:
python-version: ['3.8.10', '3.9.9', '3.10.2']
os: [windows-latest]
arch: [amd64]
runs-on: ${{ matrix.os }}
name: ${{matrix.os}} ${{matrix.python-version}}
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Get git branch name
id: branch-name
uses: tj-actions/branch-names@v8
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Configure MSVC for amd64
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- 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: Build the wheel
run: python setup.py bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifact${{matrix.python-version}}
path: dist/*.whl
upload-pypi:
needs: win-x64-wheel
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
path: dist
- name: Display and organize the structure of downloaded files
run: |
mv dist/artifact*/* dist
rmdir dist/artifact*
- name: Upload the wheel to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
#password: ${{ secrets.TEST_PYPI_API_TOKEN }}
#repository_url: https://test.pypi.org/legacy/
- name: Add a delay for upcoming tests
run: sleep 5m
test-wheel:
needs: upload-pypi
strategy:
fail-fast: false
matrix:
python-version: ['3.8.10', '3.9.9', '3.10.2']
os: [windows-latest]
arch: [amd64]
runs-on: ${{ matrix.os }}
steps:
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip install flamingpy
run: |
python -m pip install --upgrade pip
python -m pip install flamingpy
- name: Run some involved package examples for testing purposes
run: |
python c:\hostedtoolcache\windows\python\${{matrix.python-version}}\x64\lib\site-packages\flamingpy\benchmarks\lemon.py
python c:\hostedtoolcache\windows\python\${{matrix.python-version}}\x64\lib\site-packages\flamingpy\benchmarks\shortest_path.py