Use system libwebp-dev instead of building from source #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker images | |
| on: [push, pull_request, workflow_dispatch] | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: ${{ matrix.image }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| image: | |
| # Run slower jobs first to give them a headstart and reduce waiting time | |
| - "ubuntu-26.04-plucky-ppc64le" | |
| - "ubuntu-26.04-plucky-s390x" | |
| # Then run the remainder | |
| - "ubuntu-26.04-plucky-amd64" | |
| include: | |
| - image: "ubuntu-26.04-plucky-ppc64le" | |
| qemu-arch: "ppc64le" | |
| docker-args: "--platform linux/ppc64le" | |
| - image: "ubuntu-26.04-plucky-s390x" | |
| qemu-arch: "s390x" | |
| docker-args: "--platform linux/s390x" | |
| - image: "ubuntu-26.04-plucky-arm64v8" | |
| os: "ubuntu-24.04-arm" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| - name: Set up QEMU | |
| if: "matrix.qemu-arch" | |
| uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0 | |
| with: | |
| platforms: ${{ matrix.qemu-arch }} | |
| - name: Prepare build | |
| run: | | |
| sudo apt-get update && sudo apt-get install -qyy debootstrap | |
| if [[ -n "$matrix.test-image" ]]; then | |
| git submodule update --remote --init --recursive Pillow | |
| else | |
| git submodule update --remote Pillow | |
| fi | |
| (cd Pillow && git checkout main) | |
| sudo chown -R 1001 "$(pwd)" | |
| - name: Build image | |
| id: build | |
| run: | | |
| cd "${{ matrix.image }}" && sudo chmod a+w . && make update | |
| if [[ -n "$DOCKER_USERNAME" ]]; then | |
| echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && echo "logged_in=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| make build BRANCH=main | |
| env: | |
| DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
| DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
| DOCKER_ARGS: ${{ matrix.docker-args }} | |
| - name: Test image | |
| run: | | |
| cd "${{ matrix.image }}" | |
| make test BRANCH=main | |
| env: | |
| DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
| - name: Log image size | |
| run: | | |
| docker images | |
| - name: Push image | |
| if: "steps.build.outputs.logged_in == 'true' | |
| && github.event_name == 'push' | |
| && github.ref == 'refs/heads/main'" | |
| run: make push-${{ matrix.image }} BRANCH=main | |
| env: | |
| DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
| - name: Post build | |
| if: always() | |
| run: sudo chown -R "$(id -u)" "$(pwd)" | |
| success: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| name: Build successful | |
| steps: | |
| - name: Success | |
| run: echo Build Successful |