fix(progmem): use __builtin_memcpy to eliminate function call overhead #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Compiler Build Template | |
| on: | |
| push: | |
| paths: | |
| - 'ci/docker/**' | |
| - '.github/workflows/docker_build_compiler.yml' | |
| workflow_call: | |
| secrets: | |
| env_vars: | |
| required: true | |
| inputs: | |
| runs_on: | |
| required: true | |
| type: string | |
| platform: | |
| required: true | |
| type: string | |
| dockerfile: | |
| required: true | |
| type: string | |
| tag: | |
| default: latest | |
| type: string | |
| group: | |
| required: true | |
| type: string | |
| platforms: | |
| required: true | |
| type: string | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| runs-on: ${{ inputs.runs_on }} | |
| env: | |
| env_vars: ${{ secrets.env_vars }} | |
| steps: | |
| - name: Decode credentials as environment variables | |
| id: check | |
| run: | | |
| for line in $env_vars; do | |
| key=$(echo "$line" | sed 's/=.*//g') | |
| encoded_value=$(echo "$line" | sed 's/^[^=]*=//') | |
| value=$(echo "$encoded_value" | base64 -d | base64 -d) | |
| echo "::add-mask::$value" | |
| echo "$key=$value" >> $GITHUB_ENV | |
| done | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare | |
| run: | | |
| platform=${{ inputs.platform }} | |
| echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
| - name: Display target Docker image | |
| run: | | |
| echo "================================" | |
| echo "Building Docker image: ${{ env.docker_registry_image }}" | |
| echo "Group: ${{ inputs.group }}" | |
| echo "Platforms: ${{ inputs.platforms }}" | |
| echo "Architecture: ${{ inputs.platform }}" | |
| echo "================================" | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.docker_registry_image }} | |
| tags: | | |
| type=raw,value=${{inputs.tag}},enable={{is_default_branch}} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ env.docker_username }} | |
| password: ${{ env.docker_password }} | |
| - name: Build and push by digest | |
| id: build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| platforms: ${{ inputs.platform }} | |
| context: . | |
| file: ./ci/docker/${{ inputs.dockerfile }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| outputs: type=image,name=${{ env.docker_registry_image }},push-by-digest=true,name-canonical=true,push=true | |
| build-args: | | |
| PLATFORMS=${{ inputs.platforms }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max,compression=zstd | |
| - name: Export digest | |
| run: | | |
| mkdir -p /tmp/digests | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "/tmp/digests/${digest#sha256:}" | |
| - name: Upload digest | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: digests-${{ inputs.group }}-${{ env.PLATFORM_PAIR }} | |
| path: /tmp/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 |