Runner base image installs Cargo when the runner's image has none #486
Mergeds
syntaqx merged runner-base-cargo into main
3 files+50−391 file not counted0/3 viewed
| 12 | 12 | # own machines have Docker now, but this build's own downloads (Docker's | |
| 13 | 13 | # apt repository over HTTPS) do not yet trust a guarded job's egress | |
| 14 | 14 | # certificate, so it stays where the network is open. The job runs in the | |
| 15 | − | # runner's default image, so it installs Docker's buildx plugin first. | |
| 15 | + | # runner's default image, so it installs Docker's buildx plugin and Cargo | |
| 16 | + | # first. | |
| 16 | 17 | # Without such a runner, run the same thing by hand on a machine with Docker: | |
| 17 | 18 | # | |
| 18 | 19 | # node scripts/deploy.mjs build-base | |
| ⋯ | |||
| 79 | 80 | curl -fsSL -o ~/.docker/cli-plugins/docker-buildx "https://github.com/docker/buildx/releases/download/$BUILDX_VERSION/buildx-$BUILDX_VERSION.linux-amd64" | |
| 80 | 81 | chmod +x ~/.docker/cli-plugins/docker-buildx | |
| 81 | 82 | docker buildx version | |
| 83 | + | # The deploy tool reads the workspace's crates with `cargo metadata` | |
| 84 | + | # (scripts/deploy/stack.mjs); the runner's default image has no Rust. | |
| 85 | + | - name: Cargo | |
| 86 | + | run: | | |
| 87 | + | if ! command -v cargo >/dev/null 2>&1; then | |
| 88 | + | curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --no-modify-path | |
| 89 | + | echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| 90 | + | "$HOME/.cargo/bin/cargo" --version | |
| 91 | + | else | |
| 92 | + | cargo --version | |
| 93 | + | fi | |
| 82 | 94 | - name: Install Wrangler | |
| 83 | 95 | run: node scripts/deploy/npm-ci.mjs --workspaces=false --no-audit --no-fund | |
| 84 | 96 | - name: Build and push | |
Too large, or too much of it changed, to compare line by line here.
| 1 | 1 | { | |
| 2 | − | "name": "g1t-monorepo", | |
| 3 | − | "private": true, | |
| 4 | − | "type": "module", | |
| 5 | − | "engines": { | |
| 6 | − | "node": ">=24" | |
| 7 | − | }, | |
| 8 | − | "workspaces": [ | |
| 9 | − | "apps/*", | |
| 10 | − | "services/*", | |
| 11 | − | "packages/*" | |
| 12 | − | ], | |
| 13 | − | "scripts": { | |
| 14 | − | "format": "prettier --write", | |
| 15 | − | "format:check": "prettier --check", | |
| 16 | − | "typecheck": "npm run typecheck --workspaces --if-present", | |
| 17 | − | "deploy": "npm run deploy -w @g1t/web", | |
| 18 | − | "test:deploy": "node --test \"scripts/deploy/*.test.mjs\"", | |
| 19 | − | "test:ops": "node --test \"scripts/ops/*.test.mjs\"", | |
| 20 | − | "test:conformance": "node --test \"conformance/*.test.mjs\"", | |
| 21 | − | "test:agent-readiness": "npm run build -w @g1t/docs && node --test \"scripts/agent-resources.test.mjs\" \"scripts/mcp-readiness.test.mjs\"", | |
| 22 | − | "test:release": "node --test \"scripts/cli-homebrew.test.mjs\" \"scripts/desktop-release.test.mjs\" \"scripts/mobile-release.test.mjs\" \"scripts/cli-release.test.mjs\" \"scripts/plugins-release.test.mjs\" \"scripts/runner-release.test.mjs\" \"scripts/hosted-image.test.mjs\"" | |
| 23 | − | }, | |
| 24 | − | "devDependencies": { | |
| 25 | − | "prettier": "3.6.2", | |
| 26 | − | "typescript": "^5.9.3", | |
| 27 | − | "wrangler": "^4.146.0" | |
| 28 | − | }, | |
| 29 | − | "overrides": { | |
| 30 | − | "basic-ftp": "^6.2.1", | |
| 31 | − | "fflate": "^0.7.5", | |
| 32 | − | "katex": "^0.19.0", | |
| 33 | − | "postcss-selector-parser": "^7.1.6", | |
| 34 | − | "query-string": "^9.5.1", | |
| 35 | − | "sharp": "^0.35.5", | |
| 36 | − | "xcode": { | |
| 37 | − | "uuid": "^11.1.1" | |
| 38 | − | }, | |
| 39 | − | "undici": "8.12.2" | |
| 2 | + | "name": "g1t-monorepo", | |
| 3 | + | "private": true, | |
| 4 | + | "type": "module", | |
| 5 | + | "engines": { | |
| 6 | + | "node": ">=24" | |
| 7 | + | }, | |
| 8 | + | "workspaces": [ | |
| 9 | + | "apps/*", | |
| 10 | + | "services/*", | |
| 11 | + | "packages/*" | |
| 12 | + | ], | |
| 13 | + | "scripts": { | |
| 14 | + | "format": "prettier --write", | |
| 15 | + | "format:check": "prettier --check", | |
| 16 | + | "typecheck": "npm run typecheck --workspaces --if-present", | |
| 17 | + | "deploy": "npm run deploy -w @g1t/web", | |
| 18 | + | "test:deploy": "node --test \"scripts/deploy/*.test.mjs\"", | |
| 19 | + | "test:ops": "node --test \"scripts/ops/*.test.mjs\"", | |
| 20 | + | "test:conformance": "node --test \"conformance/*.test.mjs\"", | |
| 21 | + | "test:agent-readiness": "npm run build -w @g1t/docs && node --test \"scripts/agent-resources.test.mjs\" \"scripts/mcp-readiness.test.mjs\"", | |
| 22 | + | "test:release": "node --test \"scripts/cli-homebrew.test.mjs\" \"scripts/desktop-release.test.mjs\" \"scripts/mobile-release.test.mjs\" \"scripts/cli-release.test.mjs\" \"scripts/plugins-release.test.mjs\" \"scripts/runner-release.test.mjs\" \"scripts/hosted-image.test.mjs\"" | |
| 23 | + | }, | |
| 24 | + | "devDependencies": { | |
| 25 | + | "prettier": "3.6.2", | |
| 26 | + | "typescript": "^5.9.3", | |
| 27 | + | "wrangler": "^4.146.0" | |
| 28 | + | }, | |
| 29 | + | "overrides": { | |
| 30 | + | "basic-ftp": "^6.2.1", | |
| 31 | + | "fflate": "^0.7.5", | |
| 32 | + | "katex": "^0.19.0", | |
| 33 | + | "postcss-selector-parser": "^7.1.6", | |
| 34 | + | "query-string": "^9.5.1", | |
| 35 | + | "sharp": "^0.35.5", | |
| 36 | + | "xcode": { | |
| 37 | + | "uuid": "^11.1.1" | |
| 40 | 38 | } | |
| 39 | + | } | |
| 41 | 40 | } |