ci matrix strategy update
Some checks failed
Some checks failed
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user