File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,20 +23,12 @@ USER vscode
2323
2424# Set CARGO_HOME to a location in user home to avoid permission issues in CI
2525# and add it to PATH
26- ENV CARGO_HOME=/home/vscode/.cargo
26+ # ENV CARGO_HOME=/home/vscode/.cargo (Deferred until runtime)
2727ENV PATH=$CARGO_HOME/bin:$PATH
2828# Set CARGO_TARGET_DIR to a location in user home that is safe from volume mounts
2929ENV CARGO_TARGET_DIR=/home/vscode/.cargo-target
3030
31- # Pre-build dependencies to cache them in the image (as vscode)
32- RUN mkdir -p /tmp/build/src /tmp/build/benches
33- WORKDIR /tmp/build
34- COPY Cargo.toml Cargo.lock ./
35- RUN echo "fn main() {}" > src/main.rs \
36- && echo "fn main() {}" > benches/performance.rs \
37- && cargo build --release \
38- && cargo build \
39- && cd / && rm -rf /tmp/build
31+ # No pre-build (cache is disabled by user request)
4032
4133# Install cargo-binstall as vscode
4234RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4+ # Fix permissions for CI environment where volume mounts may be root-owned
5+ sudo chown -R vscode:vscode /usr/local/cargo
6+
47echo " Installing VSIX dependencies..."
58npm install --prefix vsix
69(cd vsix && npx vsce package -o ../docgraph.vsix)
You can’t perform that action at this time.
0 commit comments