File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "name" : " parallel-disk-usage (Rust only)" ,
3+ "image" : " mcr.microsoft.com/devcontainers/rust:1" ,
4+ "customizations" : {
5+ "vscode" : {
6+ "extensions" : [
7+ " rust-lang.rust-analyzer" ,
8+ " timonwong.shellcheck" ,
9+ " mkhl.shfmt"
10+ ]
11+ }
12+ },
13+ "postCreateCommand" : " bash .devcontainer/post-create.sh"
14+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " parallel-disk-usage (full)" ,
3+ "image" : " mcr.microsoft.com/devcontainers/rust:1" ,
4+ "features" : {
5+ "ghcr.io/devcontainers/features/node:1" : {
6+ "version" : " lts" ,
7+ "nodeGypDependencies" : true
8+ },
9+ "ghcr.io/devcontainers/features/python:1" : {
10+ "version" : " 3.12" ,
11+ "installTools" : true
12+ },
13+ "ghcr.io/devcontainers-contrib/features/shellcheck:1" : {},
14+ "ghcr.io/devcontainers-contrib/features/shfmt:1" : {}
15+ },
16+ "customizations" : {
17+ "vscode" : {
18+ "extensions" : [
19+ " rust-lang.rust-analyzer" ,
20+ " timonwong.shellcheck" ,
21+ " mkhl.shfmt"
22+ ]
23+ }
24+ },
25+ "postCreateCommand" : " bash .devcontainer/full/post-create.sh"
26+ }
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ echo " Installing Python dependencies..." >&2
5+ python3 -m pip install --user toml
6+
7+ echo " Installing pnpm and project Node dependencies..." >&2
8+ npm install -g pnpm@7.9.0
9+ (cd ci/github-actions && pnpm install --frozen-lockfile)
10+
11+ bash " $( dirname " $0 " ) /../install-rust-toolchain.sh"
12+ bash " $( dirname " $0 " ) /../install-hyperfine.sh"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Shared helper: install hyperfine binary from GitHub releases into ~/.local/bin
3+ set -euo pipefail
4+
5+ arch=" $( uname -m) "
6+ case " $arch " in
7+ x86_64) hyperfine_target=" x86_64-unknown-linux-musl" ;;
8+ aarch64) hyperfine_target=" aarch64-unknown-linux-musl" ;;
9+ * )
10+ echo " ERROR: Unsupported architecture for hyperfine prebuilt binary: $arch " >&2
11+ exit 1
12+ ;;
13+ esac
14+
15+ mkdir -p " $HOME /.local/bin"
16+
17+ echo " Installing hyperfine from GitHub release..." >&2
18+ hyperfine_version=" 1.20.0"
19+ hyperfine_archive=" hyperfine-v${hyperfine_version} -${hyperfine_target} "
20+ hyperfine_url=" https://github.com/sharkdp/hyperfine/releases/download/v${hyperfine_version} /${hyperfine_archive} .tar.gz"
21+ curl -fsSL " $hyperfine_url " | tar -xz --strip-components=1 -C " $HOME /.local/bin" " ${hyperfine_archive} /hyperfine"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ REPO_ROOT=" $( cd " $( dirname " $0 " ) /.." && pwd) "
5+
6+ echo " Installing Rust toolchain from rust-toolchain..." >&2
7+ rustup toolchain install " $( < " $REPO_ROOT /rust-toolchain" ) "
8+ rustup component add clippy rustfmt rust-analyzer
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ mkdir -p " $HOME /.local/bin"
5+
6+ bash " $( dirname " $0 " ) /install-rust-toolchain.sh"
7+ bash " $( dirname " $0 " ) /install-hyperfine.sh"
8+
9+ arch=" $( uname -m) "
10+
11+ echo " Installing shellcheck from GitHub release..." >&2
12+ shellcheck_version=" 0.11.0"
13+ case " $arch " in
14+ x86_64) shellcheck_arch=" linux.x86_64" ;;
15+ aarch64) shellcheck_arch=" linux.aarch64" ;;
16+ * )
17+ echo " ERROR: Unsupported architecture for shellcheck prebuilt binary: $arch " >&2
18+ exit 1
19+ ;;
20+ esac
21+ shellcheck_archive=" shellcheck-v${shellcheck_version} .${shellcheck_arch} "
22+ shellcheck_url=" https://github.com/koalaman/shellcheck/releases/download/v${shellcheck_version} /${shellcheck_archive} .tar.gz"
23+ curl -fsSL " $shellcheck_url " | tar -xz --strip-components=1 -C " $HOME /.local/bin" " shellcheck-v${shellcheck_version} /shellcheck"
24+
25+ echo " Installing shfmt from GitHub release..." >&2
26+ shfmt_version=" 3.13.0"
27+ case " $arch " in
28+ x86_64) shfmt_arch=" linux_amd64" ;;
29+ aarch64) shfmt_arch=" linux_arm64" ;;
30+ * )
31+ echo " ERROR: Unsupported architecture for shfmt prebuilt binary: $arch " >&2
32+ exit 1
33+ ;;
34+ esac
35+ shfmt_url=" https://github.com/mvdan/sh/releases/download/v${shfmt_version} /shfmt_v${shfmt_version} _${shfmt_arch} "
36+ curl -fsSL " $shfmt_url " -o " $HOME /.local/bin/shfmt"
37+ chmod +x " $HOME /.local/bin/shfmt"
You can’t perform that action at this time.
0 commit comments