Skip to content

Commit

Permalink
.github/workflows/config.yml: add --platform for qemu environment
Browse files Browse the repository at this point in the history
Fixes
```
+ docker run --rm --platform linux/amd64 -v /home/runner/work/EusLisp/EusLisp:/ws/euslisp -e ARCH=LinuxARM -t arm32v7/debian:unstable-slim bash -c '      set -x; set -e;      apt update -qq;      apt install -y -qq make gcc libgl-dev libglu1-mesa-dev libjpeg-dev libpng-dev libpq-dev libx11-dev libxext-dev;      CFLAGS='\''-Werror=implicit-function-declaration'\'' ARCH=LinuxARM EUSDIR=/ws/euslisp make -C /ws/euslisp/lisp/ -f Makefile.LinuxARM eus0;      CC='\''gcc -Werror'\'' ARCHDIR=LinuxARM EUSDIR=/ws/euslisp make -C /ws/euslisp/lisp/image/jpeg;      exit 0'
Unable to find image 'arm32v7/debian:unstable-slim' locally
unstable-slim: Pulling from arm32v7/debian
docker: no matching manifest for linux/amd64 in the manifest list entries.
```
  • Loading branch information
k-okada committed Dec 9, 2024
1 parent 0f4b0c6 commit a2899d2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,28 @@ jobs:
if [[ "$QEMU" != "" ]]; then docker run --rm --privileged multiarch/qemu-user-static:register --reset; fi
if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt-get install -y -qq qemu-user-static; fi
if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then git clone http://github.com/euslisp/jskeus ${HOME}/jskeus; fi
if [[ "$QEMU" != "" ]]; export PLATFORM_OPTION="--platform linux/$QEMU"; fi
echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME on $QEMU_VOLUME"
docker run --rm $QEMU_VOLUME -v $HOME:$HOME -e "QEMU=$QEMU" -e "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "MAKEFLAGS=$MAKEFLAGS" -e "DOCKER_IMAGE=$DOCKER_IMAGE" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"
docker run $PLATFORM_OPTION --rm $QEMU_VOLUME -v $HOME:$HOME -e "QEMU=$QEMU" -e "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "MAKEFLAGS=$MAKEFLAGS" -e "DOCKER_IMAGE=$DOCKER_IMAGE" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"
debian-unstable:
strategy:
matrix:
include:
- DOCKER_IMAGE: amd64/debian:unstable-slim
DOCKER_PLATFORM: amd64
ARCH: Linux64
- DOCKER_IMAGE: arm32v7/debian:unstable-slim
DOCKER_PLATFORM: arm
ARCH: LinuxARM
- DOCKER_IMAGE: arm64v8/debian:unstable-slim
DOCKER_PLATFORM: aarch64
ARCH: LinuxARM
- DOCKER_IMAGE: s390x/debian:unstable-slim
DOCKER_PLATFORM: s390x
ARCH: Linux
- DOCKER_IMAGE: riscv64/debian:unstable-slim
DOCKER_PLATFORM: riscv64
ARCH: Linux

runs-on: ubuntu-latest
Expand All @@ -125,7 +131,7 @@ jobs:
# This step will execute the registering scripts
sudo apt install -y -qq qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --rm -v $(pwd):/ws/euslisp -e "ARCH=$ARCH" -t "$DOCKER_IMAGE" \
docker run --rm --platform linux/${{matrix.DOCKER_PLATFORM}} $(pwd):/ws/euslisp -e "ARCH=$ARCH" -t "$DOCKER_IMAGE" \
bash -c " \
set -x; set -e; \
apt update -qq; \
Expand Down

0 comments on commit a2899d2

Please sign in to comment.