From b9c678923e73c8c9f709353734ec1b1b1caccea8 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Mon, 26 May 2025 19:52:58 -0600 Subject: [PATCH] use multiple runners for the multi-arch build --- .aider.chat.history.md | 52 +++++++++++++++++++ .aider.input.history | 6 +++ .aider.tags.cache.v4/cache.db | Bin 0 -> 32768 bytes .gitea/workflows/ci.yml | 91 +++++++++++++++++++++++++--------- 4 files changed, 126 insertions(+), 23 deletions(-) create mode 100644 .aider.chat.history.md create mode 100644 .aider.input.history create mode 100644 .aider.tags.cache.v4/cache.db diff --git a/.aider.chat.history.md b/.aider.chat.history.md new file mode 100644 index 0000000..2d975b4 --- /dev/null +++ b/.aider.chat.history.md @@ -0,0 +1,52 @@ + +# aider chat started at 2025-06-14 08:29:17 + +> You can skip this check with --no-gitignore +> Add .aider* to .gitignore (recommended)? (Y)es/(N)o [Yes]: y +> Added .aider* to .gitignore +> /Users/brian/.local/bin/aider +> No LLM model was specified and no API keys were provided. +> OpenRouter provides free and paid access to many LLMs. +> Login to OpenRouter or create a free account? (Y)es/(N)o [Yes]: n +> https://aider.chat/docs/troubleshooting/models-and-keys.html +> Open documentation URL for more info? (Y)es/(N)o/(D)on't ask again [Yes]: n + +# aider chat started at 2025-06-14 08:32:59 + +> /Users/brian/.local/bin/aider --model ollama_chat/qwen2.5-coder +> Warning: ollama_chat/qwen2.5-coder expects these environment variables +> - OLLAMA_API_BASE: Not set +> Warning for ollama_chat/qwen2.5-coder: Unknown context window size and costs, using sane defaults. +> You can skip this check with --no-show-model-warnings +> https://aider.chat/docs/llms/warnings.html +> Open documentation url for more info? (Y)es/(N)o/(D)on't ask again [Yes]: y +> Aider v0.84.0 +> Model: ollama_chat/qwen2.5-coder with whole edit format +> Git repo: .git with 36 files +> Repo-map: using 1024 tokens, auto refresh + +# aider chat started at 2025-06-14 08:34:37 + +> /Users/brian/.local/bin/aider --model ollama_chat/qwen2.5-coder:8b +> Warning: ollama_chat/qwen2.5-coder:8b expects these environment variables +> - OLLAMA_API_BASE: Not set +> Warning for ollama_chat/qwen2.5-coder:8b: Unknown context window size and costs, using sane defaults. +> You can skip this check with --no-show-model-warnings +> https://aider.chat/docs/llms/warnings.html +> Open documentation url for more info? (Y)es/(N)o/(D)on't ask again [Yes]: n +> Aider v0.84.0 +> Model: ollama_chat/qwen2.5-coder:8b with whole edit format +> Git repo: .git with 36 files +> Repo-map: using 1024 tokens, auto refresh + +# aider chat started at 2025-06-14 08:34:57 + +> /Users/brian/.local/bin/aider --model ollama_chat/qwen2.5-coder:8b +> Warning for ollama_chat/qwen2.5-coder:8b: Unknown context window size and costs, using sane defaults. +> You can skip this check with --no-show-model-warnings +> https://aider.chat/docs/llms/warnings.html +> Open documentation url for more info? (Y)es/(N)o/(D)on't ask again [Yes]: y +> Aider v0.84.0 +> Model: ollama_chat/qwen2.5-coder:8b with whole edit format +> Git repo: .git with 36 files +> Repo-map: using 1024 tokens, auto refresh diff --git a/.aider.input.history b/.aider.input.history new file mode 100644 index 0000000..199a027 --- /dev/null +++ b/.aider.input.history @@ -0,0 +1,6 @@ + +# 2025-06-14 08:30:54.749653 ++N + +# 2025-06-14 08:34:51.295609 ++n diff --git a/.aider.tags.cache.v4/cache.db b/.aider.tags.cache.v4/cache.db new file mode 100644 index 0000000000000000000000000000000000000000..8f2dbd7368f27fdee7d8a90f06a809c02ff25a01 GIT binary patch literal 32768 zcmeI)%}?8A90zcl2a*sPKU9nwR8byiDIk(E1XU|llgf*s(bA+1L9~a-@*EdDoH&gg zD3dm|-D!Wp&O7b2^CXVF?6e(ssiqxv+O*3Kn|7M^_>Gtj7*aQ>i@uRUoX3xUexA?s z_(9KO!}|S#=^E^j-K=RYn-}_pt}fv=V}c+M{!a0C^h)!M?(mD3E=D^}`6R-%j~`~} zA3|U6fj}SAuca+%AajtZp8K-z_r6={7Ei_t0uX=z1Rwwb2teRW0?%&tB`;o=Q_pAJ zrn$9cG}jH+HS1fB>X;uIYSpj|*I3r{ZDYBtELId&Dd*SLlrl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=5P$##AOL~C05WFdR{#J2 literal 0 HcmV?d00001 diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e8689e1..625a873 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -63,21 +63,78 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} build: name: Build and push image - runs-on: ${{ matrix.runner }} + runs-on: ${{ matrix.arch.runner }} strategy: + fail-fast: false matrix: - runner: [ubuntu-latest, ubuntu-arm-latest] + arch: + - runner: ubuntu-latest + platform: linux/amd64 + - runner: ubuntu-arm-latest + platform: linux/arm64 permissions: packages: write needs: tests steps: - uses: actions/checkout@v4 - - name: Login to the Container Registry + - name: Prepare + run: | + platform=${{ matrix.arch.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + - name: Generate metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Login to the container registry uses: docker/login-action@v3 with: registry: brosner.dev username: brosner password: ${{ secrets.CI_TOKEN }} + - name: Setup docker buildx + uses: docker/setup-buildx-action@v3 + - name: Build image + id: build + uses: docker/build-push-action@v6 + with: + labels: ${{ steps.meta.outputs.labels }} + annotations: ${{ steps.meta.outputs.annotations }} + target: prod + platforms: ${{ matrix.arch.platform }} + outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p ${{ runner.temp }}/digests + digest="${{ steps.build.outputs.digest }}" + touch "${{ runner.temp }}/digests/${digest#sha256:}" + - name: Upload digest + uses: christopherhx/gitea-upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: ${{ runner.temp }}/digests/* + if-no-files-found: error + retention-days: 1 + merge: + name: Create docker manifest + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download digests + uses: christopherhx/gitea-download-artifact@v4 + with: + path: ${{ runner.temp }}/digests + pattern: digests-* + merge-multiple: true + - name: Login to the container registry + uses: docker/login-action@v3 + with: + registry: brosner.dev + username: brosner + password: ${{ secrets.CI_TOKEN }} + - name: Setup docker buildx + uses: docker/setup-buildx-action@v3 - name: Generate metadata id: meta uses: docker/metadata-action@v5 @@ -85,24 +142,12 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch - type=ref,event=pr type=sha - labels: | - org.opencontainers.image.title=teufa - org.opencontainers.image.description=teufa container image - org.opencontainers.image.source=https://brosner.dev/brosner/teufa - org.opencontainers.image.licenses=MIT - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Setup docker buildx - uses: docker/setup-buildx-action@v3 - - name: Build image - uses: docker/build-push-action@v6 - if: gitea.ref == 'refs/heads/main' - with: - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - annotations: ${{ steps.meta.outputs.annotations }} - target: prod - platforms: ${{ matrix.runner == 'ubuntu-latest' && 'linux/amd64' || 'linux/arm64' }} - push: true + - name: Create manifest list and push + working-directory: ${{ runner.temp }}/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} -- 2.43.0