diff --git a/.github/workflows/sgdk-docker.yml b/.github/workflows/sgdk-docker.yml index ed7ffa08..e2b6025b 100644 --- a/.github/workflows/sgdk-docker.yml +++ b/.github/workflows/sgdk-docker.yml @@ -20,6 +20,12 @@ on: - 'sample/**' - '**.md' +env: + # TODO: arm64 images are currently disabled because they keep hanging in the + # GitHub Actions environment. + #PLATFORMS: linux/amd64,linux/arm64 + PLATFORMS: linux/amd64 + jobs: build: runs-on: ubuntu-latest @@ -32,8 +38,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + # TODO: arm64 images are currently disabled because they keep hanging in + # the GitHub Actions environment. + #- name: Set up QEMU + # uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -60,10 +68,7 @@ jobs: with: file: deps/gcc.Dockerfile context: deps/ - platforms: linux/amd64,linux/arm64 - # Disable parallel builds, which are hanging in GitHub Actions. - build-args: | - PARALLEL_BUILD=0 + platforms: ${{ env.PLATFORMS }} tags: ghcr.io/${{ github.actor }}/sgdk-m68k-gcc:latest push: ${{ github.event_name == 'push' }} @@ -80,7 +85,7 @@ jobs: with: file: Dockerfile context: . - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.PLATFORMS }} build-args: | BASE_IMAGE=ghcr.io/${{ github.actor }}/sgdk-m68k-gcc tags: ghcr.io/${{ github.actor }}/sgdk:latest diff --git a/deps/gcc.Dockerfile b/deps/gcc.Dockerfile index cb7ba12a..28299e77 100644 --- a/deps/gcc.Dockerfile +++ b/deps/gcc.Dockerfile @@ -29,9 +29,9 @@ ENV INSTALLDIR="$BASEDIR/install" ENV STAGINGDIR="$BASEDIR/staging" ENV PARALLEL_BUILD="$PARALLEL_BUILD" -# Choose parallel build or not. Parallel builds are hanging under qemu on -# GitHub, so we serialize building there. If parallel builds are disabled, -# replace nproc so it always says "1". +# Choose parallel build or not. Parallel builds can cause issues with +# low-memory hosts or emulation. If parallel builds are disabled, replace +# nproc so it always says "1". RUN echo "nproc = $(nproc)" RUN echo "PARALLEL_BUILD = $PARALLEL_BUILD" RUN if [[ "$PARALLEL_BUILD" == 0 ]]; then echo -e "#!/bin/sh\necho 1" > /usr/local/bin/nproc; chmod 755 /usr/local/bin/nproc; fi