From 36eb1cf966e911082b628dfdb6086fa932f2bffa Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 16 Apr 2024 12:10:18 +0100 Subject: [PATCH] Try building with our own minimal maturin container --- .github/workflows/pypi.yaml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index aa6a77b..aaad65a 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -41,6 +41,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.10' + - name: Build minimal maturin docker container + run: + docker build -t maturin-release:latest -f $GITHUB_WORKSPACE/synapse_auto_compressor/docker/release.Dockerfile . - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -48,20 +51,7 @@ jobs: args: --release --out dist --find-interpreter sccache: 'true' manylinux: auto - before-script-linux: | - # If we're running on rhel centos, install needed packages. - if command -v yum &> /dev/null; then - yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic - - # If we're running on i686 we need to symlink libatomic - # in order to build openssl with -latomic flag. - if [[ ! -d "/usr/lib64" ]]; then - ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so - fi - else - # If we're running on debian-based system. - apt update -y && apt-get install -y libssl-dev openssl pkg-config - fi + container: maturin-release:latest - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -83,12 +73,16 @@ jobs: with: python-version: '3.10' architecture: ${{ matrix.platform.target }} + - name: Build minimal maturin docker container + run: + docker build -t maturin-release:latest -f $GITHUB_WORKSPACE/synapse_auto_compressor/docker/release.Dockerfile . - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: 'true' + container: maturin-release:latest - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -109,12 +103,16 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.10' + - name: Build minimal maturin docker container + run: + docker build -t maturin-release:latest -f $GITHUB_WORKSPACE/synapse_auto_compressor/docker/release.Dockerfile . - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: 'true' + container: maturin-release:latest - name: Upload wheels uses: actions/upload-artifact@v4 with: