From abab4c1b07c7d94762d29a0bfb7409716408be36 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 7 Nov 2023 13:24:00 -0800 Subject: [PATCH 1/4] ci: remove stray yarn install --- proposals/49:smart-wallet-nft/eval.sh | 8 -------- proposals/55:statom-vaults/eval.sh | 6 ------ 2 files changed, 14 deletions(-) diff --git a/proposals/49:smart-wallet-nft/eval.sh b/proposals/49:smart-wallet-nft/eval.sh index 23cd4ae9..623ba7dc 100644 --- a/proposals/49:smart-wallet-nft/eval.sh +++ b/proposals/49:smart-wallet-nft/eval.sh @@ -7,13 +7,5 @@ source /usr/src/upgrade-test-scripts/env_setup.sh ls -al -yarn install --immutable - -# XXX to avoid rebuilding lower layers -# TODO clean up JS lib code so it's more independent -cp package.json yarn.lock /usr/src/upgrade-test-scripts/lib/ -cd /usr/src/upgrade-test-scripts/lib/ && yarn install --immutable -cd - - # XXX using Ava serial to script the core-eval yarn ava upgrade-wf.test.js diff --git a/proposals/55:statom-vaults/eval.sh b/proposals/55:statom-vaults/eval.sh index d2e17dca..fb0dcb92 100644 --- a/proposals/55:statom-vaults/eval.sh +++ b/proposals/55:statom-vaults/eval.sh @@ -7,11 +7,5 @@ source /usr/src/upgrade-test-scripts/env_setup.sh ls -al -# XXX to avoid rebuilding lower layers -# TODO clean up JS lib code so it's more independent -cp package.json yarn.lock /usr/src/upgrade-test-scripts/lib/ -cd /usr/src/upgrade-test-scripts/lib/ && yarn install --immutable -cd - - # XXX using Ava serial to script the core-eval yarn ava add-collateral.test.js From 9fd9793cb425772997d30625a5f8a2c6e69658d4 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 7 Nov 2023 16:04:41 -0800 Subject: [PATCH 2/4] ci: npm for global installs Yarn removed in 2+ https://github.com/yarnpkg/yarn/issues/7884 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79e298d9..5a7c5614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # The .ts scripts depend upon this - - run: yarn global add tsx + - run: npm install --global tsx - name: build test images run: | From d68de0169d603ad7bfb20dcda1dcb8997611b8f4 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 6 Nov 2023 09:04:12 -0800 Subject: [PATCH 3/4] docs: describe published images --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bfb1ec39..745e5b06 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Proposals run or planned for Mainnet (agoric-3) This repo serves several functions: - verify building an image with in which known proposals have executed -- publishing an image with all passed proposals (TODO: https://github.com/Agoric/agoric-3-proposals/issues/6) +- publishing an image with all passed proposals - verify that certain tests pass after each proposal # Design @@ -52,6 +52,8 @@ If the proposal is _pending_ and does not yet have a number, use a letter. The p # Usage +## Development + To build the test images, ``` @@ -72,7 +74,30 @@ To run the tests for particular proposals, ./runTestImages.ts --match upgrade ``` -To add a proposal, see [./CONTRIBUTING.md] +## Contributing + +To add a proposal, see [CONTRIBUTING.md](./CONTRIBUTING.md). + +## Images + +This repo publishes an image of the synthetic agoric-3 chain with all proposals that have "passed" (defined in this repo as having a proposal number). + +The CI builds on every push to the trunk branch, (`main`), or a PR branch. You can view all versions at https://github.com/agoric/agoric-3-proposals/pkgs/container/agoric-3-proposals/versions + +The versions built from the main branch are at: `ghcr.io/agoric/agoric-3-proposals:main`. For each PR, they're at a URL like `ghcr.io/agoric/agoric-3-proposals:pr-11`. + +If you RUN this image, you'll get a working chain running `agd` until you terminate, + +```sh +docker run ghcr.io/agoric/agoric-3-proposals:main +``` + +Or locally, + +``` +docker build -t ghrc.io/agoric/agoric-3-proposals:dev . +docker run ghrc.io/agoric/agoric-3-proposals:dev +``` ## Future work From c3997cb33c92909c109a7c0cdc98dae7820941b0 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 8 Nov 2023 15:11:53 -0800 Subject: [PATCH 4/4] build: skip run_use for proposals without use.sh --- proposals/49:smart-wallet-nft/use.sh | 8 -------- proposals/55:statom-vaults/use.sh | 8 -------- upgrade-test-scripts/run_use.sh | 22 +++++++++++++++++++--- 3 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 proposals/49:smart-wallet-nft/use.sh delete mode 100644 proposals/55:statom-vaults/use.sh diff --git a/proposals/49:smart-wallet-nft/use.sh b/proposals/49:smart-wallet-nft/use.sh deleted file mode 100644 index 0dc1342b..00000000 --- a/proposals/49:smart-wallet-nft/use.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Exit when any command fails -set -e - -source /usr/src/upgrade-test-scripts/env_setup.sh - -echo "Nothing to put into chain history for NFT smart wallet per se." diff --git a/proposals/55:statom-vaults/use.sh b/proposals/55:statom-vaults/use.sh deleted file mode 100644 index cdc6121c..00000000 --- a/proposals/55:statom-vaults/use.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Exit when any command fails -set -e - -source /usr/src/upgrade-test-scripts/env_setup.sh - -echo "TODO make an stATOM vault" diff --git a/upgrade-test-scripts/run_use.sh b/upgrade-test-scripts/run_use.sh index f6920fe4..c1a19076 100644 --- a/upgrade-test-scripts/run_use.sh +++ b/upgrade-test-scripts/run_use.sh @@ -4,16 +4,32 @@ set -e +ID=$1 +if [ -z "$ID" ]; then + echo "Must specify what proposal to use" + exit 1 +fi +PROPOSAL_PATH="/usr/src/proposals/$ID/" + +if [ ! -d "$PROPOSAL_PATH" ]; then + echo "Proposal $ID does not exist" + exit 1 +fi + +if [ ! -f "$PROPOSAL_PATH/use.sh" ]; then + echo "Proposal $ID does not have a use.sh. Skipping." + exit 0 +fi + source ./env_setup.sh export SLOGFILE=slog.slog -PROPOSAL_PATH=$1 - +echo "Starting agd in the background." startAgd echo "Agd started. Running use.sh." -cd /usr/src/proposals/"$PROPOSAL_PATH/" || exit +cd "$PROPOSAL_PATH" ./use.sh echo "Actions completed. Running for a few blocks and exiting."