Yeuoly преди 1 година
родител
ревизия
6013a00c72
променени са 2 файла, в които са добавени 12 реда и са изтрити 22 реда
  1. 0 0
      .github/workflows/tests-amd64.yml
  2. 12 22
      .github/workflows/tests-arm64.yml

.github/workflows/tests.yml → .github/workflows/tests-amd64.yml


+ 12 - 22
.github/workflows/tests-arm64.yml

@@ -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