Skip to content

Commit

Permalink
Setup Qemu for multi-arch run
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Dec 31, 2023
1 parent d73cea8 commit 4cc397f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,20 @@ jobs:
uses: docker/setup-buildx-action@v3
with:
platforms: ${{ matrix.build_platform }}
- name: Setup Qemu
if: ${{ matrix.build_arch != 'amd64'}}
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Docker build
run: |
docker buildx build --platform ${{ matrix.build_platform }} --build-arg HOST=${{ matrix.build_host }} --tag wait_for_db:latest --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache,mode=max --output=type=docker .
- name: Docker help test
if: ${{ matrix.build_arch == 'amd64'}}
run: |
docker run --platform ${{ matrix.build_platform }} --name wait_for_db wait_for_db --help
- name: Docker copy
if: ${{ matrix.build_arch == 'amd64'}}
run: |
docker cp wait_for_db:/wait_for_db wait-for-db-linux-${{ matrix.build_arch }}
- name: ldd check
if: ${{ matrix.build_arch == 'amd64'}}
run: |
ldd wait-for-db-linux-${{ matrix.build_arch }} | grep "statically linked"
retVal=$?
Expand Down

0 comments on commit 4cc397f

Please sign in to comment.