From 64fdf7c5285be17f7254f07ae3f91ab8a14800bd Mon Sep 17 00:00:00 2001 From: Stephen Balogh <10469527+sgbalogh@users.noreply.github.com> Date: Wed, 9 Sep 2026 05:16:40 +0000 Subject: [PATCH 1/2] chore: add .company/environment.json for cloud environments --- .company/environment.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .company/environment.json diff --git a/.company/environment.json b/.company/environment.json new file mode 100644 index 00000000..85b92c49 --- /dev/null +++ b/.company/environment.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://api.thecompany.company/schemas/v1/environment.json", + "scripts": { + "install": { + "command": "set -euo pipefail\n\nSUDO=\"\"\nif [ \"$(id -u)\" -ne 0 ]; then SUDO=\"sudo\"; fi\n\n# System build dependencies: a C toolchain for crates with native code, and\n# protoc for s2-api's optional `codegen` feature (enabled by --all-features).\n$SUDO apt-get update\n$SUDO DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \\\n build-essential pkg-config protobuf-compiler curl ca-certificates git\n\n# Rust toolchains. Stable builds and tests the workspace; nightly is required\n# for `just fmt` because .rustfmt.toml uses unstable rustfmt options.\nif [ ! -x \"$HOME/.cargo/bin/rustup\" ]; then\n curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \\\n | sh -s -- -y --profile minimal --default-toolchain stable\nfi\n. \"$HOME/.cargo/env\"\nrustup component add clippy rustfmt\nrustup toolchain install nightly --profile minimal --component rustfmt\n\n# Cargo tools required by the justfile recipes and CI checks. nextest ships a\n# prebuilt binary; the rest are quick to compile from source.\ncargo install --locked just cargo-sort cargo-deny\ncurl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C \"$HOME/.cargo/bin\"\n\n# Expose the toolchain to shells that do not source the cargo env.\nfor b in \"$HOME/.cargo/bin\"/*; do\n $SUDO ln -sf \"$b\" /usr/local/bin/\ndone\n\n# Fetch the api/specs submodule and warm the dependency cache for the\n# workspace and the standalone simulator.\ngit submodule update --init --recursive\ncargo fetch --locked\ncargo fetch --manifest-path sim/Cargo.toml\n", + "timeout": 3600 + }, + "prepare": { + "command": "set -euo pipefail\n\n# Reconcile submodules and the dependency cache with the checked-out commit.\ngit submodule update --init --recursive\ncargo fetch --locked\n", + "timeout": 600 + } + } +} From 66989f6aed834086a034ac5d166eb3a3e6039f42 Mon Sep 17 00:00:00 2001 From: Stephen Balogh <10469527+sgbalogh@users.noreply.github.com> Date: Wed, 9 Sep 2026 05:22:26 +0000 Subject: [PATCH 2/2] chore: fix root install path and use prebuilt cargo tools --- .company/environment.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.company/environment.json b/.company/environment.json index 85b92c49..bec95914 100644 --- a/.company/environment.json +++ b/.company/environment.json @@ -2,8 +2,8 @@ "$schema": "https://api.thecompany.company/schemas/v1/environment.json", "scripts": { "install": { - "command": "set -euo pipefail\n\nSUDO=\"\"\nif [ \"$(id -u)\" -ne 0 ]; then SUDO=\"sudo\"; fi\n\n# System build dependencies: a C toolchain for crates with native code, and\n# protoc for s2-api's optional `codegen` feature (enabled by --all-features).\n$SUDO apt-get update\n$SUDO DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \\\n build-essential pkg-config protobuf-compiler curl ca-certificates git\n\n# Rust toolchains. Stable builds and tests the workspace; nightly is required\n# for `just fmt` because .rustfmt.toml uses unstable rustfmt options.\nif [ ! -x \"$HOME/.cargo/bin/rustup\" ]; then\n curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \\\n | sh -s -- -y --profile minimal --default-toolchain stable\nfi\n. \"$HOME/.cargo/env\"\nrustup component add clippy rustfmt\nrustup toolchain install nightly --profile minimal --component rustfmt\n\n# Cargo tools required by the justfile recipes and CI checks. nextest ships a\n# prebuilt binary; the rest are quick to compile from source.\ncargo install --locked just cargo-sort cargo-deny\ncurl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C \"$HOME/.cargo/bin\"\n\n# Expose the toolchain to shells that do not source the cargo env.\nfor b in \"$HOME/.cargo/bin\"/*; do\n $SUDO ln -sf \"$b\" /usr/local/bin/\ndone\n\n# Fetch the api/specs submodule and warm the dependency cache for the\n# workspace and the standalone simulator.\ngit submodule update --init --recursive\ncargo fetch --locked\ncargo fetch --manifest-path sim/Cargo.toml\n", - "timeout": 3600 + "command": "set -euo pipefail\n\nSUDO=\"\"\nif [ \"$(id -u)\" -ne 0 ]; then SUDO=\"sudo\"; fi\n\n# System build dependencies: a C toolchain for crates with native code, and\n# protoc for s2-api's optional `codegen` feature (enabled by --all-features).\n# `env` keeps the assignment valid when SUDO is empty (root-based images).\n$SUDO apt-get update\n$SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \\\n build-essential pkg-config protobuf-compiler curl ca-certificates git\n\n# Rust toolchains. Stable builds and tests the workspace; nightly is required\n# for `just fmt` because .rustfmt.toml uses unstable rustfmt options.\nif [ ! -x \"$HOME/.cargo/bin/rustup\" ]; then\n curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \\\n | sh -s -- -y --profile minimal --default-toolchain stable\nfi\n. \"$HOME/.cargo/env\"\nrustup component add clippy rustfmt\nrustup toolchain install nightly --profile minimal --component rustfmt\n\n# Cargo tools required by the justfile recipes and CI checks. Installed as\n# pinned prebuilt binaries: AGENTS.md prohibits `cargo install` of tools.\ncurl -LsSf https://get.nexte.st/0.9.143/linux \\\n | tar zxf - -C \"$HOME/.cargo/bin\"\ncurl -LsSf https://github.com/casey/just/releases/download/1.58.0/just-1.58.0-x86_64-unknown-linux-musl.tar.gz \\\n | tar zxf - -C \"$HOME/.cargo/bin\" just\ncurl -LsSf https://github.com/EmbarkStudios/cargo-deny/releases/download/0.20.2/cargo-deny-0.20.2-x86_64-unknown-linux-musl.tar.gz \\\n | tar zxf - -C \"$HOME/.cargo/bin\" --strip-components=1 --wildcards '*/cargo-deny'\ncurl -LsSf https://github.com/DevinR528/cargo-sort/releases/download/v2.1.4/cargo-sort-x86_64-unknown-linux-gnu.tar.gz \\\n | tar zxf - -C \"$HOME/.cargo/bin\" cargo-sort\n\n# Expose the toolchain to shells that do not source the cargo env.\nfor b in \"$HOME/.cargo/bin\"/*; do\n $SUDO ln -sf \"$b\" /usr/local/bin/\ndone\n\n# Fetch the api/specs submodule and warm the dependency cache for the\n# workspace and the standalone simulator.\ngit submodule update --init --recursive\ncargo fetch --locked\ncargo fetch --manifest-path sim/Cargo.toml\n", + "timeout": 1800 }, "prepare": { "command": "set -euo pipefail\n\n# Reconcile submodules and the dependency cache with the checked-out commit.\ngit submodule update --init --recursive\ncargo fetch --locked\n",