Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add non-nix installation instructions #765

Merged
merged 10 commits into from
Nov 17, 2023
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
27 changes: 27 additions & 0 deletions .github/workflows/ubuntu-install-without-nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Ubuntu install without nix

on:
schedule:
- cron: "0 0 * * MON"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:latest
steps:
- uses: actions/checkout@v4
- name: Install and test
# Execute all lines that start with four spaces, and remove leading 'sudo '
# because we're in a container and already root.
run: |
grep '^ ' doc/ubuntu.md \
| sed 's/^ //' \
| sed 's/^sudo //' \
| bash -exo pipefail
Comment on lines +24 to +27
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty nifty 👍

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ a dockerized Espresso Sequencer network with an example Layer 2 rollup applicati
- Obtain code: `git clone git@github.com:EspressoSystems/espresso-sequencer`.
- Make sure [nix](https://nixos.org/download.html) is installed.
- Activate the environment with `nix-shell`, or `nix develop`, or `direnv allow` if using [direnv](https://direnv.net/).
- For installation without nix please see [ubuntu.md](./doc/ubuntu.md).

## Run the tests

Expand Down
36 changes: 36 additions & 0 deletions doc/ubuntu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Installing on ubuntu (without nix)

<!-- Note that all lines that start with four spaces will be executed in the CI -->

## Install system dependencies

sudo apt-get update
sudo apt-get install -y curl cmake pkg-config libssl-dev protobuf-compiler git

## Install rustup

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
source $HOME/.cargo/env

## Install foundry

curl --proto '=https' --tlsv1.2 -sSf -L https://foundry.paradigm.xyz | bash
source $HOME/.bashrc
foundryup

## Clone the repository

git clone https://github.com/EspressoSystems/espresso-sequencer/
cd espresso-sequencer

## Run the rust tests

export RUSTFLAGS='--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"'
cargo test --release

## Run the foundry tests

cargo build --release --bin diff-test
export PATH=$PWD/target/release:$PATH
forge test -v

4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.73.0"
components = [ "rustfmt", "llvm-tools-preview", "rust-src", "clippy" ]
profile = "minimal"