diff --git a/.github/workflows/docker-matrix-wheels.yml b/.github/workflows/docker-matrix-wheels.yml index b4418cb..e73175d 100644 --- a/.github/workflows/docker-matrix-wheels.yml +++ b/.github/workflows/docker-matrix-wheels.yml @@ -47,10 +47,43 @@ jobs: platforms: linux/amd64,linux/arm/v6,linux/arm/v7 push: false target: base - cache-to: type=gha,mode=min,scope=base_stage_cross cache-from: | - type=gha,scope=base_stage_cross + type=gha,scope=base_stage_amd64 + type=gha,scope=base_stage_armv7 + type=gha,scope=base_stage_armv6 + - name: cache base image amd64 + uses: docker/build-push-action@v3.2.0 + with: + context: . + file: Dockerfile + platforms: linux/amd64 + push: false + target: base + cache-to: type=gha,mode=min,scope=base_stage_amd64 + cache-from: type=gha,scope=base_stage_amd64 + + - name: cache base image armv7 + uses: docker/build-push-action@v3.2.0 + with: + context: . + file: Dockerfile + platforms: linux/arm/v7 + push: false + target: base + cache-to: type=gha,mode=min,scope=base_stage_armv7 + cache-from: type=gha,scope=base_stage_armv7 + + - name: cache base image armv6 + uses: docker/build-push-action@v3.2.0 + with: + context: . + file: Dockerfile + platforms: linux/arm/v6 + push: false + target: base + cache-to: type=gha,mode=min,scope=base_stage_armv6 + cache-from: type=gha,scope=base_stage_armv6 prepare_matrix: # name: Find fhempy modules @@ -82,9 +115,9 @@ jobs: do REQS=$(jq -cr 'select(.requirements != []).requirements' ./"$i"/manifest.json) ## Just for testing the pipeline with a subset of modules - ## if ! [[ "$i" =~ ^(googlecast|geizhals|fhem_forum|bt_presence)$ ]]; then - ## continue - ## fi + if ! [[ "$i" =~ ^(googlecast|geizhals|fhem_forum|bt_presence)$ ]]; then + continue + fi ## End of test if [[ -z $REQS ]]; then continue @@ -177,13 +210,12 @@ jobs: push: false load: true target: runtime - cache-to: type=gha,scope=runtime-stage_cross-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }},ignore-error=true + cache-to: type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-amd64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: | - type=gha,scope=base_stage_cross - type=gha,scope=runtime-stage_cross-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }} - # type=gha,scope=runtime-stage_cross + type=gha,scope=base_stage_amd64 + type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-amd64 build-args: | PKGS=${{ matrix.PKGS }} @@ -234,14 +266,17 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} target: runtime - cache-to: type=gha,scope=runtime-stage_cross-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }},mode=max + #cache-to: type=gha,scope=runtime-stage_cross-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }},mode=max + cache-to: type=local,dest=/tmp/.buildx-cache,mode=max cache-from: | - type=gha,scope=base_stage_cross - type=gha,scope=runtime-stage_cross - type=gha,scope=runtime-stage_cross-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }} + type=gha,scope=base_stage_amd64 + type=gha,scope=base_stage_armv6 + type=gha,scope=base_stage_armv7 + type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-amd64 + type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-armv7 build-args: | PKGS=${{ matrix.PKGS }} - + - name: show image details run: | echo "${{ steps.docker_build_runtime_cross.outputs.imageid }}" @@ -275,6 +310,32 @@ jobs: path: matrix_result.md if-no-files-found: warn + - name: cache armv7 image + uses: docker/build-push-action@v3.2.0 + with: + context: . + platforms: linux/arm/v7 + push: false + load: false + target: runtime + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-armv7 + build-args: | + PKGS=${{ matrix.PKGS }} + + - name: cache amd64 image + uses: docker/build-push-action@v3.2.0 + with: + context: . + platforms: linux/amd64 + push: false + load: false + target: runtime + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-amd64 + build-args: | + PKGS=${{ matrix.PKGS }} + check-matrix: runs-on: ubuntu-latest needs: [buildImages,prepare_build]