From fbafad2d3861a0e6c8f62d4d85537046aa8f7f58 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Fri, 3 Jul 2026 12:12:29 -0700 Subject: [PATCH] ci(docker): carry vendored tinyagents into core image builds The [patch.crates-io] path override made vendor/tinyagents part of the cargo graph; the Dockerfile now COPYs vendor/ (needed already at the dep-cache stage) and both docker jobs init just that submodule after checkout (targeted init skips the large tauri-cef fork the core image does not need). All other cargo-running CI jobs already checkout with submodules: recursive/true; the mobile crates do not depend on the core crate, so their submodules:false stays. Claude-Session: https://claude.ai/code/session_013uVSkcdR2eP7hW4xm54wb4 --- .github/workflows/release-production.yml | 5 +++++ .github/workflows/release-staging.yml | 5 +++++ Dockerfile | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.github/workflows/release-production.yml b/.github/workflows/release-production.yml index 7e444875a..c50157c2b 100644 --- a/.github/workflows/release-production.yml +++ b/.github/workflows/release-production.yml @@ -372,6 +372,11 @@ jobs: with: ref: ${{ needs.prepare-build.outputs.build_ref }} fetch-depth: 1 + # Targeted init (not `submodules: true`) so we skip the large tauri-cef + # fork the core image doesn't need. The Dockerfile COPYs vendor/ because + # [patch.crates-io] resolves tinyagents from vendor/tinyagents. + - name: Init tinyagents submodule + run: git submodule update --init vendor/tinyagents - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to GHCR diff --git a/.github/workflows/release-staging.yml b/.github/workflows/release-staging.yml index 22b26dd93..8fb162fa6 100644 --- a/.github/workflows/release-staging.yml +++ b/.github/workflows/release-staging.yml @@ -265,6 +265,11 @@ jobs: with: ref: ${{ needs.prepare-build.outputs.build_ref }} fetch-depth: 1 + # Targeted init (not `submodules: true`) so we skip the large tauri-cef + # fork the core image doesn't need. The Dockerfile COPYs vendor/ because + # [patch.crates-io] resolves tinyagents from vendor/tinyagents. + - name: Init tinyagents submodule + run: git submodule update --init vendor/tinyagents - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build image (no push) diff --git a/Dockerfile b/Dockerfile index 00be4887c..477f8e603 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,11 @@ WORKDIR /build # Cache dependencies — copy only manifests first COPY Cargo.toml Cargo.lock rust-toolchain.toml ./ +# Vendored TinyAgents SDK (git submodule; [patch.crates-io] points here, so +# the dep-cache build below already resolves it). CI must init the submodule +# before docker build — see the "Init tinyagents submodule" steps in +# release-production.yml / release-staging.yml. +COPY vendor/ vendor/ # Create a dummy src to build deps RUN mkdir -p src && \ echo 'fn main() {}' > src/main.rs && \