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

chore: force the scratch buld on every push #735

Merged
merged 1 commit into from
Sep 10, 2024
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
51 changes: 51 additions & 0 deletions .github/workflows/deploy-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Run Local Build

on:
push:
workflow_dispatch: {}

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

steps:
- name: Checkout code
uses: actions/checkout@v2

run-local-build:
needs: prepare
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install lcov
run: |
sudo apt-get install lcov
id: lcov
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to pin a version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pinned 1.2.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahh, this doesn't work

only nightly is supported

per their docs;
Version to install, e.g. nightly or 1.0.0. Note: Foundry only has nightly builds for the time being.

All other versions 404

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm iirc they keep monthly versions around. But latest is fine actually it’s actually good to make sure our stuff is deployable with latest foundry

- name: Run forge install
run: forge install
- name: Start anvil and deploy
run: |
anvil --block-time 1 --chain-id 31337 &
ANVIL_PID=$!
echo "---Waiting for anvil to start..."
sleep 10 # Give Anvil some time to start
export RPC_URL="http://127.0.0.1:8545"
echo "Extracted PRIVATE_KEY: $PRIVATE_KEY"
echo "---Deploying Contracts"
RUST_LOG=forge,foundry=trace forge script script/deploy/local/Deploy_From_Scratch.s.sol \
--rpc-url $RPC_URL \
--private-key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" \
--broadcast \
--sig "run(string memory configFile)" \
-- local/deploy_from_scratch.anvil.config.json
kill $ANVIL_PID
38 changes: 0 additions & 38 deletions .github/workflows/run-deploy-scripts.yml

This file was deleted.

48 changes: 0 additions & 48 deletions script/configs/devnet/M1_deploy_devnet.config.json

This file was deleted.

44 changes: 0 additions & 44 deletions script/configs/devnet/M2_deploy_from_scratch.anvil.config.json

This file was deleted.

Loading
Loading