ci matrix strategy update
Some checks failed
build_docker / essential (pull_request) Successful in 0s
build_docker / build_cpu (linux/amd64) (pull_request) Failing after 4m8s
build_docker / build_cpu (linux/arm64) (pull_request) Has been cancelled
build_docker / build_gpu (pull_request) Has been cancelled

This commit is contained in:
2026-01-17 11:39:51 +01:00
parent 34e04a1639
commit ade3627804

View File

@@ -25,10 +25,15 @@ jobs:
echo "Version: 1.0.${{ gitea.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "Event: ${{ gitea.event_name }}" >> $GITHUB_STEP_SUMMARY
# CPU image: Multi-arch (amd64 + arm64)
# CPU image: Matrix build for amd64 and arm64 (each pushes as soon as done)
build_cpu:
runs-on: ubuntu-latest
needs: essential
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -46,16 +51,25 @@ jobs:
username: username
password: ${{ secrets.UNIR_REGISTRY_TOKEN }}
- name: Build and push CPU image (multi-arch)
- name: Get arch suffix
id: arch
run: |
if [ "${{ matrix.platform }}" = "linux/amd64" ]; then
echo "suffix=amd64" >> $GITHUB_OUTPUT
else
echo "suffix=arm64" >> $GITHUB_OUTPUT
fi
- name: Build and push CPU image (${{ matrix.platform }})
uses: docker/build-push-action@v5
with:
context: src/paddle_ocr
file: src/paddle_ocr/Dockerfile.cpu
platforms: linux/amd64,linux/arm64
platforms: ${{ matrix.platform }}
push: true
tags: |
${{ needs.essential.outputs.image_cpu }}:${{ needs.essential.outputs.Version }}
${{ needs.essential.outputs.image_cpu }}:latest
${{ needs.essential.outputs.image_cpu }}:${{ needs.essential.outputs.Version }}-${{ steps.arch.outputs.suffix }}
${{ needs.essential.outputs.image_cpu }}:${{ steps.arch.outputs.suffix }}
# GPU image: x86_64 only (PaddlePaddle GPU doesn't support ARM64)
build_gpu: