Skip to content

Commit

Permalink
simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 2, 2024
1 parent 6bb8885 commit c5af64d
Showing 1 changed file with 1 addition and 77 deletions.
78 changes: 1 addition & 77 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Docker images

on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.image }}
Expand All @@ -15,49 +11,16 @@ jobs:
fail-fast: false
matrix:
image:
# Run slower jobs first to give them a headstart and reduce waiting time
- "ubuntu-22.04-jammy-arm64v8"
- "ubuntu-24.04-noble-ppc64le"
- "ubuntu-24.04-noble-s390x"
# test image for manylinux-wheel build
- "ubuntu-24.04-noble-amd64"
# Then run the remainder
- "alpine"
- "amazon-2-amd64"
- "amazon-2023-amd64"
- "arch"
- "centos-stream-9-amd64"
- "debian-12-bookworm-x86"
- "debian-12-bookworm-amd64"
- "fedora-40-amd64"
- "fedora-41-amd64"
- "gentoo"
- "ubuntu-22.04-jammy-amd64"
- "ubuntu-22.04-jammy-amd64-valgrind"
# has a dependency on the test image
- "manylinux2014-wheel-build"
- "manylinux_2_28-wheel-build"
include:
- image: "manylinux2014-wheel-build"
test-image: "ubuntu-24.04-noble-amd64"
- image: "manylinux_2_28-wheel-build"
test-image: "ubuntu-24.04-noble-amd64"
- image: "ubuntu-22.04-jammy-arm64v8"
qemu-arch: "aarch64"
- image: "ubuntu-24.04-noble-ppc64le"
qemu-arch: "ppc64le"
- image: "ubuntu-24.04-noble-s390x"
qemu-arch: "s390x"

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up QEMU
if: "matrix.qemu-arch"
run: |
docker run --rm --privileged aptman/qus -s -- -p ${{ matrix.qemu-arch }}
docker run --rm --privileged aptman/qus -s -- -p ppc64le
- name: Prepare build
run: |
Expand All @@ -70,14 +33,6 @@ jobs:
(cd Pillow && git checkout main)
sudo chown -R 1001 $(pwd)
- name: Test Image Build
if: "matrix.test-image"
run: |
cd "${{ matrix.test-image }}"
make pull || (sudo chmod a+w . && make update && make build BRANCH=main)
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}

- name: Build image
id: build
run: |
Expand All @@ -89,34 +44,3 @@ jobs:
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

- 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

0 comments on commit c5af64d

Please # to comment.