Skip to content

Commit 4e9f3e3

Browse files
authored
Merge pull request #6 from matrix-org/quenting/ci-on-linux
2 parents d1614aa + 926b870 commit 4e9f3e3

File tree

1 file changed

+16
-35
lines changed

1 file changed

+16
-35
lines changed

.github/workflows/python.yaml

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,15 @@ jobs:
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
include:
47-
- os: macos-latest
48-
target: x86_64-apple-darwin
49-
compatibility: manylinux2014 # Ignored on macOS
46+
target:
47+
- x86_64-apple-darwin
48+
- aarch64-apple-darwin
49+
- x86_64-unknown-linux-gnu
50+
- aarch64-unknown-linux-gnu
51+
- x86_64-unknown-linux-musl
52+
- aarch64-unknown-linux-musl
5053

51-
- os: macos-latest
52-
target: aarch64-apple-darwin
53-
compatibility: manylinux2014 # Ignored on macOS
54-
55-
- os: ubuntu-latest
56-
target: aarch64-unknown-linux-gnu
57-
compatibility: manylinux2014
58-
59-
- os: ubuntu-latest
60-
target: x86_64-unknown-linux-gnu
61-
compatibility: manylinux2014
62-
63-
- os: ubuntu-latest
64-
target: aarch64-unknown-linux-musl
65-
compatibility: musllinux_1_2
66-
67-
- os: ubuntu-latest
68-
target: x86_64-unknown-linux-musl
69-
compatibility: musllinux_1_2
70-
71-
runs-on: ${{ matrix.os }}
54+
runs-on: ubuntu-latest
7255
steps:
7356
- name: Checkout the code
7457
uses: actions/checkout@v3
@@ -81,15 +64,7 @@ jobs:
8164
architecture: x64
8265
update-environment: false
8366

84-
- name: Install maturin (macOS)
85-
if: runner.os == 'macOS'
86-
run: |
87-
mkdir -p "${HOME}/.local/bin"
88-
curl -sL https://github.com/PyO3/maturin/releases/download/v0.13.6/maturin-x86_64-apple-darwin.tar.gz | tar xzf - -C "${HOME}/.local/bin"
89-
echo "$HOME/.local/bin" >> $GITHUB_PATH
90-
91-
- name: Install maturin (Linux)
92-
if: runner.os == 'Linux'
67+
- name: Install maturin
9368
run: |
9469
mkdir -p "${HOME}/.local/bin"
9570
curl -sL https://github.com/PyO3/maturin/releases/download/v0.13.6/maturin-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C "${HOME}/.local/bin"
@@ -115,12 +90,18 @@ jobs:
11590

11691
- name: Build wheels
11792
run: |
93+
if [[ "${{ matrix.target }}" == *-linux-gnu ]]; then
94+
EXTRA_FLAGS="--compatibility manylinux2014"
95+
elif [[ "${{ matrix.target }}" == *-linux-musl ]]; then
96+
EXTRA_FLAGS="--compatibility musllinux_1_2"
97+
fi
98+
11899
maturin build \
119100
--release \
120101
--out dist \
121102
--manifest-path synapse/Cargo.toml \
122103
-i ${{ steps.cpy310.outputs.python-path }} \
123-
--compatibility ${{ matrix.compatibility }} \
104+
${EXTRA_FLAGS} \
124105
--target ${{ matrix.target }} \
125106
--zig
126107

0 commit comments

Comments
 (0)