Skip to content

Commit

Permalink
feat: arm64 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Jun 3, 2024
1 parent ba0a35d commit 6013a00
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
File renamed without changes.
34 changes: 12 additions & 22 deletions .github/workflows/tests-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,23 @@ on:

jobs:
simulate-arm-linux:
runs-on: macos-13
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Docker
run: |
brew install --cask docker
open --background -a /Applications/Docker.app
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Pull ARM64 Docker image
run: |
docker pull --platform linux/arm64 ubuntu:20.04
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run ARM64 Docker container
run: |
docker run --privileged --rm --platform linux/arm64 -v $(pwd):/workspace -w /workspace ubuntu:20.04 /bin/bash -c "
apt-get update &&
apt-get install -y qemu-user-static binfmt-support &&
# Your ARM-specific commands go here
echo 'Running on ARM architecture'
"
- name: Create Docker Buildx Builder
run: docker buildx create --name mybuilder

- name: Run your tasks in the ARM container
run: |
docker run --privileged --rm --platform linux/arm64 -v $(pwd):/workspace -w /workspace ubuntu:20.04 /bin/bash -c "
# Execute your test commands or build scripts here
./your-script.sh
"
- name: Build Empty ARM64 Image
run: docker buildx build --platform linux/arm64 -t empty-arm64 --load .

- name: Run command in ARM64 container
run: docker run --rm empty-arm64 ls -l

0 comments on commit 6013a00

Please sign in to comment.