-
Notifications
You must be signed in to change notification settings - Fork 1.5k
156 lines (132 loc) · 4.59 KB
/
wheel-linux.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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: linux-wheels
on:
push: # run on push events
paths-ignore: # but ignore everything in the docs subfolder
- 'docs/**'
- 'src/gui*/**'
- 'src/netedit/**'
- 'tests/netedit/**'
branches:
- '**'
tags:
- '*'
pull_request: # run on pull requests
paths-ignore: # but ignore everything in the docs subfolder
- 'docs/**'
workflow_dispatch:
schedule:
- cron: '5 1 * * *'
jobs:
build-manylinux-wheels:
runs-on: ubuntu-latest
steps:
- name: Cloning SUMO
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetching SUMO tags
run: |
git fetch --tags --force
- name: Building helper wheels for later tests
run: |
cd tools
python build/version.py build/setup-sumolib.py ./setup.py
python -m build --sdist --wheel
python build/version.py build/setup-traci.py ./setup.py
python -m build --sdist --wheel
- name: Uploading artifacts (Helper wheels)
uses: actions/upload-artifact@v3
with:
name: helper-wheels
path: tools/dist
- name: Building Python wheels (latest manylinux docker)
# if: github.repository == 'DLR-TS/sumo'
uses: docker://quay.io/pypa/manylinux2014_x86_64
with:
entrypoint: tools/build/build_wheels.sh
# the next two steps are only needed when we debug the manylinux build
# - name: Building Python wheels (fixed manylinux docker)
# if: github.repository == 'eclipse/sumo'
# uses: docker://quay.io/pypa/manylinux2014_x86_64:2022-11-14-1226cfc
# with:
# entrypoint: tools/build/build_wheels.sh
# - name: Uploading raw wheels (without auditwheel being applied)
# uses: actions/upload-artifact@v3
# with:
# name: manylinux-raw-wheels
# path: dist
- name: Uploading artifacts (Python wheels)
uses: actions/upload-artifact@v3
with:
name: manylinux-wheels
path: wheelhouse
test-wheels:
needs: [build-manylinux-wheels]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: [3.7, 3.8, 3.9, '3.10', 3.11]
steps:
- name: Cloning SUMO
uses: actions/checkout@v3
- name: Downloading Wheels artifact
uses: actions/download-artifact@v3
- name: Configuring Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Preparing Python environment
run: |
python -m pip install wheel # need to do this separately because the texttest install wants it
python -m pip install texttest
python -m pip install manylinux-wheels/eclipse_sumo*
python -c "import sumo; print('SUMO_HOME=' + sumo.SUMO_HOME)" >> $GITHUB_ENV
- name: Running "sumo in the wheel" tests
if: github.repository == 'DLR-TS/sumo'
run: |
python -m pip install -r tools/requirements.txt
tests/runTests.sh -b ci -v ci.fast
- name: Running meta tests and cleaning up
run: |
tests/runTests.sh -b ci -v ci -ts meta
python -m pip uninstall -y eclipse-sumo
sed -i '/SUMO_HOME/d' $GITHUB_ENV
- name: Running libsumo tests
run: |
python -m pip install helper-wheels/sumolib-* helper-wheels/traci-*
PYTHON_VERSION=${{ matrix.python }}
python -m pip install manylinux-wheels/libsumo-*cp3${PYTHON_VERSION:2}*
cd tests
texttest -b ci -v ci -a complex.libsumo
- name: Compressing test results
if: failure()
run: |
zip -r texttesttmp.zip ~/.texttest/tmp
- name: Uploading test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: texttesttmp-${{ matrix.python }}
path: texttesttmp.zip
if-no-files-found: warn
publish-wheels:
if: github.repository == 'eclipse/sumo' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags'))
needs: [test-wheels]
runs-on: ubuntu-latest
steps:
- name: Downloading Wheels artifact
uses: actions/download-artifact@v3
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
packages_dir: manylinux-wheels/
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: manylinux-wheels/