forked from EspressoSystems/espresso-sequencer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ubuntu build (EspressoSystems#1214)
* Fix ubuntu build - Install postgres client, just - Make it easier to test locally with docker - Run with code in repo - Fix contracts script name for latest foundry - Skip SQL tests - Less fuzz runs
- Loading branch information
Showing
7 changed files
with
89 additions
and
23 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
# This script is to test the installation instructions in doc/ubuntu.md without | ||
# using Nix on ubuntu. It's not recommended to run it outside of a container or | ||
# otherwise ephemeral environment like the CI. | ||
set -e | ||
# | ||
# Execute the ubuntu installation instructions from doc/ubuntu.md | ||
# | ||
# Skip cloning the repo and changing directories, because we want to test with | ||
# the current code and not what's in the main branch. | ||
SCRIPT="$(grep '^ ' doc/ubuntu.md | sed 's/^ //' | sed 's/^cd .*//' | sed 's/^git clone .*//')" | ||
|
||
# Remove sudo if we're already root | ||
if [ "$(whoami)" == root ]; then | ||
SCRIPT="$(echo "$SCRIPT" | sed 's/^sudo //' | sed 's/| sudo /| /')" | ||
fi | ||
|
||
# Workaround: foundryup installs into XDG_CONFIG_HOME if that's set HOME otherwise. | ||
export XDG_CONFIG_HOME=$HOME | ||
|
||
echo "Will execute:" | ||
echo "$SCRIPT" | ||
echo | ||
|
||
echo "$SCRIPT" | bash -exo pipefail |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
# This script is to test the ubuntu installation instructions locally on | ||
# non-ubuntu machines by running through the installation and tests inside an | ||
# ubuntu docker contrainer. | ||
set -e | ||
|
||
# Create a temporary copy of the repository to be mounted into the container. | ||
REPO_COPY_DIR="$(mktemp -d)" | ||
|
||
# Remove repo copy on exit, error etc. | ||
trap "exit" INT TERM | ||
trap cleanup EXIT | ||
cleanup(){ | ||
echo "Cleaning up repo copy: $REPO_COPY_DIR, need sudo" | ||
sudo rm -rf "$REPO_COPY_DIR" | ||
} | ||
|
||
git clone --recursive . "$REPO_COPY_DIR" | ||
|
||
# Run the installation and tests inside the container. | ||
docker run -it --rm \ | ||
-v "$REPO_COPY_DIR:/code" \ | ||
ubuntu:latest \ | ||
bash -c "cd /code && ./scripts/ubuntu-install-test-no-nix" |