Skip to content

Commit 45ca639

Browse files
Pin Rust to 1.82.0 when building Python wheels (#17993)
Addresses step 1 of #17988.
1 parent 05d58b8 commit 45ca639

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/release-artifacts.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Build release artifacts
55
on:
66
# we build on PRs and develop to (hopefully) get early warning
77
# of things breaking (but only build one set of debs). PRs skip
8-
# building wheels on ARM.
8+
# building wheels on macOS & ARM.
99
pull_request:
1010
push:
1111
branches: ["develop", "release-*"]
@@ -111,14 +111,20 @@ jobs:
111111
runs-on: ${{ matrix.os }}
112112
strategy:
113113
matrix:
114-
os: [ubuntu-22.04]
114+
os: [ubuntu-22.04, macos-13]
115115
arch: [x86_64, aarch64]
116116
# is_pr is a flag used to exclude certain jobs from the matrix on PRs.
117117
# It is not read by the rest of the workflow.
118118
is_pr:
119119
- ${{ startsWith(github.ref, 'refs/pull/') }}
120120

121121
exclude:
122+
# Don't build macos wheels on PR CI.
123+
- is_pr: true
124+
os: "macos-13"
125+
# Don't build aarch64 wheels on mac.
126+
- os: "macos-13"
127+
arch: aarch64
122128
# Don't build aarch64 wheels on PR CI.
123129
- is_pr: true
124130
arch: aarch64

changelog.d/17993.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix building wheels for MacOS which was temporarily disabled in Synapse 1.120.2.

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,11 @@ build-backend = "poetry.core.masonry.api"
386386
# c.f. https://github.com/matrix-org/synapse/pull/14259
387387
skip = "cp36* cp37* cp38* pp37* pp38* *-musllinux_i686 pp*aarch64 *-musllinux_aarch64"
388388

389-
# We need a rust compiler
390-
before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y --profile minimal"
389+
# We need a rust compiler.
390+
#
391+
# We temporarily pin Rust to 1.82.0 to work around
392+
# https://github.com/element-hq/synapse/issues/17988
393+
before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.82.0 -y --profile minimal"
391394
environment= { PATH = "$PATH:$HOME/.cargo/bin" }
392395

393396
# For some reason if we don't manually clean the build directory we

0 commit comments

Comments
 (0)