Skip to content

Commit

Permalink
Try build linux/s390x platform in MacOS on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Oct 5, 2023
1 parent c10d0e3 commit c0c5f3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ jobs:
- arm64v8
- ppc64le
- s390x
runs-on: ubuntu-latest
runs-on: ${{ (matrix.arch == 's390x' && 'macos')
|| 'ubuntu' }}-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # for correct image labeling via `git describe --tags`
- name: Setup Docker and Docker Compose
run: |
brew install colima docker docker-buildx
colima start
if: ${{ matrix.arch == 's390x' }}
- uses: docker/setup-buildx-action@v3
if: ${{ matrix.arch != 's390x' }}

- run: make docker.image no-cache=yes
platform=${{ matrix.os }}/${{ matrix.arch }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ github_url := $(strip $(or $(GITHUB_SERVER_URL),https://github.com))
github_repo := $(strip $(or $(GITHUB_REPOSITORY),$(OWNER)/$(NAME)-docker-image))

docker.image:
docker buildx build --force-rm \
docker buildx build $(if $(call eq,$(CI),),--force-rm,) \
$(if $(call eq,$(platform),),,--platform $(call dockerify,$(platform)))\
$(if $(call eq,$(no-cache),yes),--no-cache --pull,) \
--build-arg haraka_ver=$(HARAKA_VER) \
Expand Down

0 comments on commit c0c5f3b

Please sign in to comment.