-
Notifications
You must be signed in to change notification settings - Fork 58
157 lines (143 loc) · 4.7 KB
/
release-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
157
name: Release on PyPI [Linux]
on:
pull_request:
paths-ignore:
- CHANGELOG.md
release:
types:
- published
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Only cancel workflow on new push if we are not releasing
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-wheel:
name: "Build ${{ matrix.build }} wheels on ${{ matrix.arch }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
arch: ["x86_64", "aarch64"]
# build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "pp38-*", "pp39-*", "pp310-*"]
build: ["cp311-*"]
include:
- arch: "x86_64"
os: ubuntu-latest
- arch: "aarch64"
os: ubuntu-24.04-arm
exclude:
- arch: "aarch64"
build: "cp38-*"
- arch: "aarch64"
build: "pp38-*"
- arch: "aarch64"
build: "pp39-*"
- arch: "aarch64"
build: "pp310-*"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install -U pip
- run: python -m pip install cibuildwheel
- run: touch setup.py
if: matrix.arch == 'aarch64'
- run: python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux2014_x86_64"
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: "quay.io/pypa/manylinux2014_x86_64"
CIBW_MANYLINUX_AARCH64_IMAGE: "quay.io/pypa/manylinux_2_28_aarch64"
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_ENVIRONMENT: "CMEEL_JOBS=2 CMEEL_RUN_TESTS=OFF CMEEL_CMAKE_ARGS=-DBUILD_WITH_OPENMP_SUPPORT=ON"
- run: echo "ARTIFACT_NAME=dist-${{ matrix.arch }}-${{ matrix.build }}" | sed 's/\*/_/g' >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: dist
test:
name: "Test ${{ matrix.python-version }} wheels on ${{ matrix.os }}"
needs: "build-wheel"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
# python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.11"]
exclude:
- os: "ubuntu-24.04-arm"
python-version: "3.8"
steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: /tmp/dist
- name: setup and install wheel
run: |
python -m pip install -U pip
python -m pip install wheel simpleindex
# Since it's dangerous to use --extra-index-url we use simpleindex
# to mirror PyPI but use the local proxsuite packages
cat <<EOF > configuration.toml
# Serve local files for packages with prefix "proxsuite".
[routes."proxsuite"]
source = "path"
to = "/tmp/dist"
# Otherwise use PyPI.
[routes."{project}"]
source = "http"
to = "https://pypi.org/simple/{project}/"
[server]
host = "127.0.0.1"
port = 8000
EOF
python -m simpleindex ./configuration.toml &
# Wait for simpleindex server
curl --head -X GET --retry 5 --retry-connrefused --retry-delay 1 http://127.0.0.1:8000
python -m pip install -i http://127.0.0.1:8000 proxsuite
- name: test module
run: python -c "import proxsuite"
env:
PYTHONWARNINGS: error
release:
needs: "test"
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: |
github.repository == 'Simple-Robotics/proxsuite' &&
(github.event_name == 'release' && github.event.action == 'published')
check:
if: always()
name: check-release-linux
needs:
- build-wheel
- test
- release
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}