Skip to content

Commit 762bc14

Browse files
authored
Merge pull request #372 from jorisv/topic/fix_pypi_aarch
Fix pypi aarch workflow
2 parents d9b4dea + cf043a9 commit 762bc14

File tree

5 files changed

+87
-8
lines changed

5 files changed

+87
-8
lines changed

.github/workflows/ci-arch.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
paths-ignore:
77
- CHANGELOG.md
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build-with-arch:
1115
runs-on: "ubuntu-latest"

.github/workflows/ci-linux-osx-win-conda.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
paths-ignore:
77
- CHANGELOG.md
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build-with-conda:
1115
name: '[conda:${{ matrix.os }}:${{ matrix.build_type }}:c++${{ matrix.cxx_std }}]'

.github/workflows/ci-linux-ros.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
paths-ignore:
66
- CHANGELOG.md
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
CI:
1014
strategy:

.github/workflows/release-linux.yml

Lines changed: 69 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,28 @@ on:
88
types:
99
- published
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
# Only cancel workflow on new push if we are not releasing
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
1116
jobs:
1217
build-wheel:
1318
name: "Build ${{ matrix.build }} wheels on ${{ matrix.arch }}"
14-
runs-on: "ubuntu-latest"
19+
runs-on: ${{ matrix.os }}
1520
strategy:
21+
fail-fast: false
1622
matrix:
1723
arch: ["x86_64", "aarch64"]
1824
build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "pp38-*", "pp39-*", "pp310-*"]
25+
include:
26+
- arch: "x86_64"
27+
os: ubuntu-latest
28+
- arch: "aarch64"
29+
os: ubuntu-24.04-arm
1930
exclude:
31+
- arch: "aarch64"
32+
build: "cp38-*"
2033
- arch: "aarch64"
2134
build: "pp38-*"
2235
- arch: "aarch64"
@@ -31,11 +44,6 @@ jobs:
3144
- uses: actions/setup-python@v5
3245
with:
3346
python-version: "3.12"
34-
- name: Set up QEMU
35-
if: matrix.arch == 'aarch64'
36-
uses: docker/setup-qemu-action@v2
37-
with:
38-
platforms: all
3947
- run: python -m pip install -U pip
4048
- run: python -m pip install cibuildwheel
4149
- run: touch setup.py
@@ -57,8 +65,59 @@ jobs:
5765
name: ${{ env.ARTIFACT_NAME }}
5866
path: dist
5967

60-
release:
68+
test:
69+
name: "Test ${{ matrix.python-version }} wheels on ${{ matrix.os }}"
6170
needs: "build-wheel"
71+
runs-on: ${{ matrix.os }}
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
os: [ubuntu-latest, ubuntu-24.04-arm]
76+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
77+
exclude:
78+
- os: "ubuntu-24.04-arm"
79+
python-version: "3.8"
80+
steps:
81+
- uses: actions/setup-python@v5
82+
with:
83+
python-version: ${{ matrix.python-version }}
84+
- uses: actions/download-artifact@v4
85+
with:
86+
pattern: dist-*
87+
merge-multiple: true
88+
path: /tmp/dist
89+
- name: setup and install wheel
90+
run: |
91+
python -m pip install -U pip
92+
python -m pip install wheel simpleindex
93+
# Since it's dangerous to use --extra-index-url we use simpleindex
94+
# to mirror PyPI but use the local proxsuite packages
95+
cat <<EOF > configuration.toml
96+
# Serve local files for packages with prefix "proxsuite".
97+
[routes."proxsuite"]
98+
source = "path"
99+
to = "/tmp/dist"
100+
101+
# Otherwise use PyPI.
102+
[routes."{project}"]
103+
source = "http"
104+
to = "https://pypi.org/simple/{project}/"
105+
106+
[server]
107+
host = "127.0.0.1"
108+
port = 8000
109+
EOF
110+
python -m simpleindex ./configuration.toml &
111+
# Wait for simpleindex server
112+
curl --head -X GET --retry 5 --retry-connrefused --retry-delay 1 http://127.0.0.1:8000
113+
python -m pip install -i http://127.0.0.1:8000 proxsuite
114+
- name: test module
115+
run: python -c "import proxsuite"
116+
env:
117+
PYTHONWARNINGS: error
118+
119+
release:
120+
needs: "test"
62121
runs-on: ubuntu-latest
63122
permissions:
64123
id-token: write
@@ -85,8 +144,10 @@ jobs:
85144

86145
needs:
87146
- build-wheel
147+
- test
148+
- release
88149

89-
runs-on: Ubuntu-latest
150+
runs-on: ubuntu-latest
90151
steps:
91152
- name: Decide whether the needed jobs succeeded or failed
92153
uses: re-actors/alls-green@release/v1

.github/workflows/release-osx-win.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ on:
88
types:
99
- published
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
# Only cancel workflow on new push if we are not releasing
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
1116
jobs:
1217
build-wheel:
1318
runs-on: ${{ matrix.os }}
1419
name: Build ${{ matrix.os }} ${{ matrix.python-version }}
1520
strategy:
21+
fail-fast: false
1622
matrix:
1723
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1824
os: [macos-13, macos-14, windows-2019, windows-latest]

0 commit comments

Comments
 (0)