Skip to content

Commit

Permalink
Add non-nix installation instructions (#765)
Browse files Browse the repository at this point in the history
* Add non-nix installation instructions
* Enable building on PR to create workflow
  • Loading branch information
sveitser authored Nov 17, 2023
1 parent ed10e12 commit 4aa3fcb
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
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
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 [email protected]: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"

0 comments on commit 4aa3fcb

Please sign in to comment.