Last active
June 21, 2022 12:01
-
-
Save woss/8f1b5b88563dcc77f243988172f22409 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks: | |
- name: prep env | |
init: > | |
bash devops/install-deps.sh && cp env.sample .env && node common/scripts/install-run-rush.js update && exit | |
- name: Start mongodb container | |
command: docker-compose up -d ipfs db && exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
set -x | |
PROJECT_ROOT=$(git rev-parse --show-toplevel) | |
USER=$(whoami) | |
echo "***** Adding doppler sigs" | |
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | sudo apt-key add - | |
echo "deb https://packages.doppler.com/public/cli/deb/debian any-version main" | sudo tee /etc/apt/sources.list.d/doppler-cli.list | |
mkdir -p $HOME/.doppler | |
sudo chown $USER:$USER $HOME/.doppler | |
echo "***** INSTALLING DEPS *****" | |
sudo apt-get update | |
# && apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" \ | |
sudo apt-get install -y --no-install-recommends \ | |
git \ | |
libssl-dev \ | |
clang \ | |
cmake \ | |
libclang-dev \ | |
musl-tools \ | |
libffi-dev \ | |
pkg-config \ | |
gcc \ | |
build-essential \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
wget \ | |
gnupg \ | |
doppler \ | |
tmux \ | |
iputils-ping \ | |
direnv | |
# install pnpm | |
echo "Installing pnpm" | |
# remove gitpod pnpm installation, it's usually newer than what we need | |
npm install -g pnpm@6.30.0 | |
# npm 7.x part | |
# export PNPM_HOME=$HOME/.pnpm | |
# export PATH="$PNPM_HOME:$PATH" | |
# # set the pnpm store path to the rush one so we can just pnpm stuff | |
# pnpm config set store-dir $PROJECT_ROOT/common/temp/pnpm-store | |
# # install the rush | |
# npm 7.x part | |
# pnpm 6.x part | |
# this doesn't work for some reason | |
# sudo sh -c 'curl https://ipfs.anagolay.network/ipfs/QmeCUX9cK4YKdTbNVq3jg5cJPvz8uQiQmb4AKKd7niy4kY > /usr/local/bin/pnpm && chmod +x /usr/local/bin/pnpm' | |
# pnpm set registry https://npm-registry.anagolay.network/ | |
pnpm env use --global 16 | |
# pnpm 6.x part | |
pnpm add -g json @microsoft/rush@5.71.0 | |
########################## | |
####### RUST PART ######## | |
########################## | |
echo "\n ***** INSTALLING RUST RELATED PACKAGES *****" | |
# curl https://ipfs.anagolay.network/ipfs/bafybeifsdbwxkaidfw4hwjzeghkerqwr4jwruvcbyddarl44ucmrdgihky >/usr/local/bin/cargo-chef | |
# curl https://ipfs.anagolay.network/ipfs/bafybeigocpf3bgi24ytoeosa4muxltoxsw3ftbzq2t7zvpwrw2k6r6bqt4 >/usr/local/bin/makers | |
# curl https://ipfs.anagolay.network/ipfs/bafybeihxmsqdck7os7pplccqmqe2mrilp5ftsb6s3jxa2qyoih3p5akboa >/usr/local/bin/wasm-pack | |
echo "\nInstalling sccache" | |
sudo sh -c "curl https://ipfs.anagolay.network/ipfs/bafybeibsxtln53slskrmv6avwnjofxu5qfpmawezh7xzxuxhrhpe23nkym >/usr/local/bin/sccache && chmod +x /usr/local/bin/sccache" | |
echo $$RUSTC_WRAPPER | |
sccache --show-stats | |
if [ -z $CI_PROJECT_NAME ]; then | |
rustup update nightly | |
rustup update stable | |
# make sure rust-std for wasm32 target is installed | |
rustup target add wasm32-unknown-unknown | |
fi | |
echo "\n****** Download and install binaryen" | |
wget https://github.com/WebAssembly/binaryen/releases/download/version_90/binaryen-version_90-x86-linux.tar.gz | |
tar xvf binaryen-version_90-x86-linux.tar.gz | |
mv $PROJECT_ROOT/binaryen-version_90/* $CARGO_HOME/bin/ | |
rm -rf binaryen-version_90-x86-linux.tar.gz $PROJECT_ROOT/binaryen-version_90 | |
mkdir -p $CARGO_HOME/bin/ | |
echo "***** INSTALLING COMMON CARGO PACKAGES *****" | |
cargo install --force wasm-bindgen-cli taplo-cli cargo-make wasm-pack | |
########################## | |
####### RUST PART ######## | |
########################## | |
echo "\n*****Installing homegrew packages" | |
brew install fzf neovim | |
echo "\n***** Installing the Anagolay IPFS upload" | |
sudo wget https://ipfs.anagolay.network/ipfs/bafybeifnjzcbu76ivm22w3x37pnqqnha753ity5divosgvdnfu5ybsquji -O /usr/local/bin/ipfsCli | |
sudo chmod +x /usr/local/bin/ipfsCli | |
echo "\n***** Installing the Remote Signer" | |
sudo wget https://ipfs.anagolay.network/ipfs/bafybeiarhwobvpvz76iy6clqaf3ub7yc4rvvkydmimh652r2svdaznubrq -O /usr/local/bin/remote-signer | |
sudo chmod +x /usr/local/bin/remote-signer | |
git config --global gpg.program "remote-signer" | |
git config --global commit.gpgsign true | |
git config --global pull.rebase true | |
# ln -fs $PWD/.devcontainer/.zshrc $HOME/.zshrc | |
if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then | |
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm | |
fi | |
if [ ! -f "$HOME/.tmux.conf" ]; then | |
# wget https://ipfs.anagolay.network/ipfs/QmdZFrnc6NwzKSQdxkZfxHaBXMDH3ndhtwSm7dB7L1NXvM -O $HOME/.tmux.conf | |
ln -fs $PWD/.devcontainer/.tmux.conf $HOME/.tmux.conf | |
fi | |
echo "Smoke test" | |
rustup --version && | |
rustc --version && | |
cargo --version && | |
git --version && | |
tar --version && | |
pnpm --version && | |
node --version && | |
makers --version && | |
wasm-pack --version && | |
wasm-bindgen --version && | |
ipfsCli --version && | |
sccache --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment