Skip to content

Commit 6f7be65

Browse files
committed
Try building with our own minimal maturin container
1 parent 317a06f commit 6f7be65

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/pypi.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,17 @@ jobs:
4141
- uses: actions/setup-python@v5
4242
with:
4343
python-version: '3.10'
44+
- name: Build minimal maturin docker container
45+
run:
46+
docker build -t maturin-release:latest -f synapse_auto_compressor/docker/release.Dockerfile .
4447
- name: Build wheels
4548
uses: PyO3/maturin-action@v1
4649
with:
4750
target: ${{ matrix.platform.target }}
4851
args: --release --out dist --find-interpreter
4952
sccache: 'true'
5053
manylinux: auto
51-
before-script-linux: |
52-
# If we're running on rhel centos, install needed packages.
53-
if command -v yum &> /dev/null; then
54-
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
55-
56-
# If we're running on i686 we need to symlink libatomic
57-
# in order to build openssl with -latomic flag.
58-
if [[ ! -d "/usr/lib64" ]]; then
59-
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
60-
fi
61-
else
62-
# If we're running on debian-based system.
63-
apt update -y && apt-get install -y libssl-dev openssl pkg-config
64-
fi
54+
container: maturin-release:latest
6555
- name: Upload wheels
6656
uses: actions/upload-artifact@v4
6757
with:
@@ -83,12 +73,16 @@ jobs:
8373
with:
8474
python-version: '3.10'
8575
architecture: ${{ matrix.platform.target }}
76+
- name: Build minimal maturin docker container
77+
run:
78+
docker build -t maturin-release:latest -f synapse_auto_compressor/docker/release.Dockerfile .
8679
- name: Build wheels
8780
uses: PyO3/maturin-action@v1
8881
with:
8982
target: ${{ matrix.platform.target }}
9083
args: --release --out dist --find-interpreter
9184
sccache: 'true'
85+
container: maturin-release:latest
9286
- name: Upload wheels
9387
uses: actions/upload-artifact@v4
9488
with:
@@ -109,12 +103,16 @@ jobs:
109103
- uses: actions/setup-python@v5
110104
with:
111105
python-version: '3.10'
106+
- name: Build minimal maturin docker container
107+
run:
108+
docker build -t maturin-release:latest -f synapse_auto_compressor/docker/release.Dockerfile .
112109
- name: Build wheels
113110
uses: PyO3/maturin-action@v1
114111
with:
115112
target: ${{ matrix.platform.target }}
116113
args: --release --out dist --find-interpreter
117114
sccache: 'true'
115+
container: maturin-release:latest
118116
- name: Upload wheels
119117
uses: actions/upload-artifact@v4
120118
with:

0 commit comments

Comments
 (0)