Skip to content

Commit

Permalink
Test architecture arm/v6 (part 4)
Browse files Browse the repository at this point in the history
  • Loading branch information
mansuf committed Jun 7, 2024
1 parent 76770f5 commit c5bffeb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
context: .
file: Dockerfile.optional
platforms: |
linux/arm/v7
linux/arm/v6
# push: true
tags: |
Expand Down
6 changes: 2 additions & 4 deletions Dockerfile.optional
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ COPY . /app
WORKDIR /app

# Workaround for arm/v6
RUN lscpu
RUN export "ARCHITECTURE=$(lscpu | grep Architecture | sed -e 's/Architecture:\s//g')"
RUN echo $ARCHITECTURE
RUN if [ $ARCHITECTURE = "arm/v6" ]; then echo "arm/v6 architecture"; fi
RUN chmod +x ./arm_v6_workaround.sh
RUN ./arm_v6_workaround.sh

# Setup rust
RUN apt update && apt install wget
Expand Down
8 changes: 8 additions & 0 deletions arm_v6_workaround.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Workaround to install rust for building Dockerfile.optional in ARM v6 machine CI
export ARCHITECTURE=$(lscpu | grep Architecture | sed -e 's/Architecture:\s//g')
echo $ARCHITECTURE
if [ "$ARCHITECTURE" = "armv71" ]; then
export QEMU_LD_PREFIX=/usr/arm-linux-gnueabi
else
raise_error_lol_command_not_found;
fi

0 comments on commit c5bffeb

Please sign in to comment.