-
Notifications
You must be signed in to change notification settings - Fork 7
135 lines (130 loc) · 4.4 KB
/
Copy pathmaster.yml
File metadata and controls
135 lines (130 loc) · 4.4 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
name: Python JGraphT
on:
push:
branches:
- master
jobs:
build-linux:
runs-on: ubuntu-20.04
container:
image: dmichail/manylinux:1634888a5feacaf6c3b8e4d181d00fee57b390b4
timeout-minutes: 30
steps:
- name: OS name
run: |
uname -a
- name: Clone repository
run: |
git clone --recursive https://github.com/d-michail/python-jgrapht.git $GITHUB_WORKSPACE/../python-jgrapht
git checkout $GITHUB_SHA
git submodule update --init --recursive
- name: ls GITHUB_WORKSPACE
run: |
ls $GITHUB_WORKSPACE
- name: Build
run: $GITHUB_WORKSPACE/.github/scripts/build-manylinux2010_x86_64.sh
shell: bash
- name: list all wheels
run: |
ls $GITHUB_WORKSPACE/dist/*.whl
- name: upload to PyPi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: $GITHUB_WORKSPACE/.github/scripts/upload-pypi.sh
shell: bash
env:
PYPI_USER: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
#PYPI_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
build-non-linux:
runs-on: ${{ matrix.config.os }}
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
config:
- { os: windows-2019, python-version: "3.9", gu: "gu.cmd" }
- { os: windows-2019, python-version: "3.8", gu: "gu.cmd" }
- { os: windows-2019, python-version: "3.7", gu: "gu.cmd" }
- { os: windows-2019, python-version: "3.6", gu: "gu.cmd" }
- { os: macos-10.15, python-version: "3.9", gu: "gu" }
- { os: macos-10.15, python-version: "3.8", gu: "gu" }
- { os: macos-10.15, python-version: "3.7", gu: "gu" }
- { os: macos-10.15, python-version: "3.6", gu: "gu" }
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config.python-version }}
architecture: x64
- name: Display Python version
run: |
python -c "import sys; print(sys.version)"
- name: Setup GraalVM
id: setup-graalvm
uses: DeLaGuardo/setup-graalvm@4.0
with:
graalvm: '21.0.0.2'
java: 'java11'
arch: 'amd64'
- name: Install native-image component
run: |
${{ matrix.config.gu }} install native-image
- name: Install swig (MacOS)
if: runner.os == 'MacOS'
run: |
brew install swig
- name: Install swig (Windows)
if: runner.os == 'Windows'
run: |
choco install swig --version=4.0.1
- name: Build Library
run: |
pip install wheel
python setup.py bdist_wheel
- name: Install and run tests
run: |
pip install -r requirements/test.txt
pip install jgrapht --no-index -f dist/
pytest
- name: Upload wheel artifacts
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v2
with:
name: wheel-${{matrix.config.os}}-${{matrix.config.python-version}}-artifact
path: dist/
if-no-files-found: error
upload-pypi-non-linux:
needs: build-non-linux
runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
strategy:
matrix:
config:
- { os: windows-2019, python-version: "3.9" }
- { os: windows-2019, python-version: "3.8" }
- { os: windows-2019, python-version: "3.7" }
- { os: windows-2019, python-version: "3.6" }
- { os: macos-10.15, python-version: "3.9" }
- { os: macos-10.15, python-version: "3.8" }
- { os: macos-10.15, python-version: "3.7" }
- { os: macos-10.15, python-version: "3.6" }
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: wheel-${{matrix.config.os}}-${{matrix.config.python-version}}-artifact
path: dist
- name: List files
run: ls -R
- name: Upload to PyPi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
#password: ${{ secrets.TEST_PYPI_API_TOKEN }}
#repository_url: https://test.pypi.org/legacy/