Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ WORKDIR /root
RUN mkdir -p ./tools/scripts/lib_install
COPY ./tools/scripts/lib_install ./tools/scripts/lib_install

RUN ./tools/scripts/lib_install/linux/install-dev.sh
RUN ./tools/scripts/lib_install/ubuntu/install-dev-wolf.sh
RUN ./tools/scripts/lib_install/ubuntu/install-dev-huntsman.sh

# NOTE:
# `task` doesn't have an apt/yum package so we use its install script.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/code-linting-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"

- name: "Install dev dependencies"
run: "./tools/scripts/lib_install/linux/install-dev.sh"
run: "./tools/scripts/lib_install/ubuntu/install-dev-common.sh"

- run: "task lint:toml-check"

Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"

- name: "Install dev dependencies"
run: "./tools/scripts/lib_install/linux/install-dev.sh"
run: "./tools/scripts/lib_install/ubuntu/install-dev-wolf.sh"

- uses: "./tools/yscope-dev-utils/exports/github/actions/print-tool-versions"

Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"

- name: "Install dev dependencies"
run: "./tools/scripts/lib_install/linux/install-dev.sh"
run: "./tools/scripts/lib_install/ubuntu/install-dev-common.sh"

- run: "task lint:py-check"

Expand All @@ -174,7 +174,7 @@ jobs:
- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"

- name: "Install dev dependencies"
run: "./tools/scripts/lib_install/linux/install-dev.sh"
run: "./tools/scripts/lib_install/ubuntu/install-dev-huntsman.sh"

- run: "task lint:check-rust"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"

- name: "Install dev dependencies"
run: "./tools/scripts/lib_install/linux/install-dev.sh"
run: "./tools/scripts/lib_install/ubuntu/install-dev-wolf.sh"

- uses: "./tools/yscope-dev-utils/exports/github/actions/print-tool-versions"

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- uses: "./tools/yscope-dev-utils/exports/github/actions/install-uv"

- name: "Install dev dependencies"
run: "./tools/scripts/lib_install/linux/install-dev.sh"
run: "./tools/scripts/lib_install/ubuntu/install-dev-huntsman.sh"

- uses: "./tools/yscope-dev-utils/exports/github/actions/print-tool-versions"

Expand Down
29 changes: 29 additions & 0 deletions tools/scripts/lib_install/ubuntu/install-dev-common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

# Installs the dev dependencies shared by all versions of Spider.

# Exit on any error
set -e

# Error on undefined variable
set -u

echo "Checking for elevated privileges..."
privileged_command_prefix=""
if [ ${EUID:-$(id -u)} -ne 0 ] ; then
sudo echo "Script can elevate privileges."
privileged_command_prefix="${privileged_command_prefix} sudo"
fi

${privileged_command_prefix} apt-get update
DEBIAN_FRONTEND=noninteractive ${privileged_command_prefix} \
apt-get install --no-install-recommends -y \
ca-certificates \
curl \
git \
python3 \
python3-pip \
python3-venv

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
26 changes: 26 additions & 0 deletions tools/scripts/lib_install/ubuntu/install-dev-huntsman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

# Installs the dev dependencies for Spider Huntsman.

# Exit on any error
set -e

# Error on undefined variable
set -u

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
"$script_dir"/install-dev-common.sh

echo "Checking for elevated privileges..."
privileged_command_prefix=""
if [ ${EUID:-$(id -u)} -ne 0 ] ; then
sudo echo "Script can elevate privileges."
privileged_command_prefix="${privileged_command_prefix} sudo"
fi

# `gcc` and `libc6-dev` are required by `rustc`, which invokes the system C compiler driver to
# link binaries against libc.
DEBIAN_FRONTEND=noninteractive ${privileged_command_prefix} \
apt-get install --no-install-recommends -y \
gcc \
libc6-dev
Original file line number Diff line number Diff line change
@@ -1,42 +1,38 @@
#!/usr/bin/env bash

# Installs the dev dependencies for Spider Wolf.

# Exit on any error
set -e

# Error on undefined variable
set -u

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
"$script_dir"/install-dev-common.sh

echo "Checking for elevated privileges..."
privileged_command_prefix=""
if [ ${EUID:-$(id -u)} -ne 0 ] ; then
sudo echo "Script can elevate privileges."
privileged_command_prefix="${privileged_command_prefix} sudo"
fi
${privileged_command_prefix} apt-get update
DEBIAN_FRONTEND=noninteractive ${privileged_command_prefix} apt-get install --no-install-recommends -y \
ca-certificates \

DEBIAN_FRONTEND=noninteractive ${privileged_command_prefix} \
apt-get install --no-install-recommends -y \
checkinstall \
curl \
g++ \
gcc \
git \
jq \
libcurl4 \
libcurl4-openssl-dev \
libmariadb-dev \
libssl-dev \
make \
openjdk-11-jdk \
pkg-config \
python3 \
python3-pip \
python3-venv
pkg-config

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
lib_install_scripts_dir="$script_dir/.."
${privileged_command_prefix} "$lib_install_scripts_dir"/install-cmake.sh 3.23.5
# TODO https://github.com/y-scope/spider/issues/86
"$lib_install_scripts_dir"/check-cmake-version.sh

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
Loading