From 8da4ef3b503b5459274c73ea40bc0926b61dbae9 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 18 Mar 2024 10:38:21 +0100 Subject: [PATCH 1/2] Remove what's left of setup_dev.sh & setup.sh --- BUILD.md | 14 ++++++----- ci_docker/Dockerfile | 1 - scripts/setup.sh | 60 -------------------------------------------- scripts/setup_dev.sh | 40 ----------------------------- 4 files changed, 8 insertions(+), 107 deletions(-) delete mode 100755 scripts/setup.sh delete mode 100755 scripts/setup_dev.sh diff --git a/BUILD.md b/BUILD.md index 533f464f7a1a..0ad2342b755f 100644 --- a/BUILD.md +++ b/BUILD.md @@ -23,12 +23,6 @@ cd rerun Now install the `pixi` package manager: -Finally, run the following script to install the dependencies and CLI tools needed for Rerun's build environment: - -```sh -./scripts/setup_dev.sh -``` - Make sure `cargo --version` prints `1.74.0` once you are done. If you are using an Apple-silicon Mac (M1, M2), make sure `rustc -vV` outputs `host: aarch64-apple-darwin`. If not, this should fix it: @@ -37,6 +31,14 @@ If you are using an Apple-silicon Mac (M1, M2), make sure `rustc -vV` outputs `h rustup set default-host aarch64-apple-darwin && rustup install 1.74.0 ``` +Additionally, we use [Cargo-Cranky](https://github.com/ericseppanen/cargo-cranky) for defining which Clippy lints are active and [Cargo-Deny](https://github.com/EmbarkStudios/cargo-deny) for linting crate versions. +You don't need to install these for building, but it's highly recommended when contributing changes to +Rust code. +```sh +cargo install cargo-cranky +cargo install --locked cargo-deny +``` + ## Building and running the viewer Use this command for building and running the viewer: diff --git a/ci_docker/Dockerfile b/ci_docker/Dockerfile index 68d94fc8fb96..e5e4acfab46f 100644 --- a/ci_docker/Dockerfile +++ b/ci_docker/Dockerfile @@ -6,7 +6,6 @@ LABEL version="0.11.0" LABEL description="Docker image used for the CI of https://github.com/rerun-io/rerun" # Install the ubuntu package dependencies -# This mirrors scripts/setup.sh ENV DEBIAN_FRONTEND=noninteractive RUN set -eux; \ apt-get update; \ diff --git a/scripts/setup.sh b/scripts/setup.sh deleted file mode 100755 index c70b90de0823..000000000000 --- a/scripts/setup.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash -# Setup required to build rerun. -# This file is largly mirrored in ci_docker/Dockerfile. - -set -eu -script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) -cd "$script_path/.." -set -x - -# eframe dependencies needed on run on Linux and Fedora Rawhide: -if [ -x "$(command -v apt-get)" ]; then - sudo apt-get -y install \ - libatk-bridge2.0 \ - libfontconfig1-dev \ - libfreetype6-dev \ - libglib2.0-dev \ - libgtk-3-dev \ - libssl-dev \ - libxcb-render0-dev \ - libxcb-shape0-dev \ - libxcb-xfixes0-dev \ - libxkbcommon-dev \ - patchelf -elif [ -x "$(command -v dnf)" ]; then - sudo dnf install \ - clang \ - clang-devel \ - clang-tools-extra \ - libxcb-devel \ - libxkbcommon-devel \ - openssl-devel \ - pkg-config -fi - -# C++ SDK requires `cmake` and `apache-arrow` -# Note that this may look different for different package managers. -# If you have issues installing arrow, check https://arrow.apache.org/install/ -packagesNeeded='cmake apache-arrow' -if [ -x "$(command -v brew)" ]; then brew install $packagesNeeded -elif [ -x "$(command -v port)" ]; then sudo port install $packagesNeeded -elif [ -x "$(command -v apt-get)" ]; then - sudo apt-get install -y -V ca-certificates lsb-release wget - wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb - sudo apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb - sudo apt-get update - sudo apt-get -y install 'cmake libarrow-dev' -elif [ -x "$(command -v dnf)" ]; then sudo dnf install $packagesNeeded -elif [ -x "$(command -v zypper)" ]; then sudo zypper install $packagesNeeded -elif [ -x "$(command -v apk)" ]; then sudo apk add --no-cache $packagesNeeded -elif [ -x "$(command -v winget)" ]; then sudo winget add --no-cache $packagesNeeded -elif [ -x "$(command -v pacman)" ]; then sudo pacman -S 'cmake arrow' -else - echo "FAILED TO INSTALL PACKAGE: Package manager not found. You must manually install: $packagesNeeded">&2; - exit 1 -fi - -# Needed to compile and check the code: -rustup install 1.74.0 - -echo "setup.sh completed!" diff --git a/scripts/setup_dev.sh b/scripts/setup_dev.sh deleted file mode 100755 index 85163008b7f2..000000000000 --- a/scripts/setup_dev.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# Run all the setup required to work as a developer in the rerun repository. - -set -eu -script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) -cd "$script_path/.." -set -x - -./scripts/setup.sh - -# Install -curl -fsSL https://pixi.sh/install.sh | bash - -cargo install cargo-cranky # Uses lints defined in Cranky.toml. See https://github.com/ericseppanen/cargo-cranky -cargo install --locked cargo-deny # https://github.com/EmbarkStudios/cargo-deny -cargo install just # https://github.com/casey/just - a command runner - - -packagesNeeded='pngcrush pipx clang-format flatbuffers' -if [ -x "$(command -v brew)" ]; then brew install $packagesNeeded -elif [ -x "$(command -v port)" ]; then sudo port install $packagesNeeded -elif [ -x "$(command -v apt-get)" ]; then sudo apt-get -y install $packagesNeeded -elif [ -x "$(command -v dnf)" ]; then sudo dnf install $packagesNeeded -elif [ -x "$(command -v zypper)" ]; then sudo zypper install $packagesNeeded -elif [ -x "$(command -v apk)" ]; then sudo apk add --no-cache $packagesNeeded -elif [ -x "$(command -v winget)" ]; then sudo winget add --no-cache $packagesNeeded -elif [ -x "$(command -v pacman)" ]; then sudo pacman -S $packagesNeeded -else - echo "FAILED TO INSTALL PACKAGE: Package manager not found. You must manually install: $packagesNeeded">&2; - exit 1 -fi - -# ensure pipx is on the path -pipx ensurepath - -# install nox for python testing automation -# https://nox.thea.codes/en/stable/ -pipx install nox - -echo "setup_dev.sh completed!" From bef612c5a58adaee99d9df0276fc1391fa2a8819 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 18 Mar 2024 11:00:16 +0100 Subject: [PATCH 2/2] less capitilization! Co-authored-by: Emil Ernerfeldt --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 0ad2342b755f..e9a11cbabc69 100644 --- a/BUILD.md +++ b/BUILD.md @@ -31,7 +31,7 @@ If you are using an Apple-silicon Mac (M1, M2), make sure `rustc -vV` outputs `h rustup set default-host aarch64-apple-darwin && rustup install 1.74.0 ``` -Additionally, we use [Cargo-Cranky](https://github.com/ericseppanen/cargo-cranky) for defining which Clippy lints are active and [Cargo-Deny](https://github.com/EmbarkStudios/cargo-deny) for linting crate versions. +Additionally, we use [cargo-cranky](https://github.com/ericseppanen/cargo-cranky) for defining which Clippy lints are active and [cargo-deny](https://github.com/EmbarkStudios/cargo-deny) for linting crate versions. You don't need to install these for building, but it's highly recommended when contributing changes to Rust code. ```sh