Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c8aa306
feat: add all-in-one foundry-cicd reusable workflow
RonTuretzky Nov 30, 2025
be6eb8b
fix: verification step passes RPC_URL and fails properly
RonTuretzky Nov 30, 2025
a02d53b
fix: use fully qualified contract names for verification
RonTuretzky Nov 30, 2025
7edff35
fix: use upgrades-path for fallback to fix path resolution
RonTuretzky Nov 30, 2025
89122db
refactor: run upgrade validation via OZ CLI instead of script
RonTuretzky Nov 30, 2025
cb2c8da
refactor: use forge script for upgrade validation instead of npx
RonTuretzky Nov 30, 2025
7d62ff6
fix: allow baseline init even when deploy-on-main is disabled
RonTuretzky Nov 30, 2025
36739d2
feat: add init-baseline-without-deploy flag for explicit baseline ini…
RonTuretzky Nov 30, 2025
42452da
feat: add GitHub releases for testnet/mainnet deployments
RonTuretzky Nov 30, 2025
4f57a8a
refactor: only create releases on merge to main
RonTuretzky Nov 30, 2025
1cca5ea
refactor: replace network config JSON with direct inputs
RonTuretzky Nov 30, 2025
3e6e930
feat: add compiler config validation
RonTuretzky Nov 30, 2025
0560626
feat: add deployment artifacts JSON
RonTuretzky Dec 4, 2025
245d825
merge: integrate change detection from main
RonTuretzky Dec 20, 2025
4a61900
refactor: split workflow into modular sub-workflows
RonTuretzky Dec 20, 2025
83fb1d1
feat: add integration testing with example repo submodule
RonTuretzky Dec 20, 2025
5213ede
fix: correct upgrade safety paths to be relative to working-directory
RonTuretzky Dec 20, 2025
25ed9b3
docs: add development workflow and update submodule
RonTuretzky Dec 20, 2025
44f66bd
fix: correct artifact path resolution for upgrade safety validation
RonTuretzky Dec 20, 2025
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
86 changes: 86 additions & 0 deletions .github/workflows/_foundry-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Foundry CI - Build, Test, Format Check, Compiler Validation
# Usage: jobs.<job>.uses: BreadchainCoop/etherform/.github/workflows/_foundry-ci.yml@main
name: Foundry CI

on:
workflow_call:
inputs:
check-formatting:
description: 'Run forge fmt --check'
type: boolean
default: true
test-verbosity:
description: 'Test verbosity level (v, vv, vvv, vvvv)'
type: string
default: 'vvv'
validate-compiler-config:
description: 'Validate bytecode_hash and cbor_metadata settings'
type: boolean
default: true
working-directory:
description: 'Working directory for Foundry commands'
type: string
default: '.'

jobs:
ci:
name: Build & Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Show Forge version
run: forge --version

- name: Validate compiler config
if: inputs.validate-compiler-config
run: |
set -euo pipefail

ERRORS=0

# Check bytecode_hash = "none"
if grep -q 'bytecode_hash\s*=\s*"none"' foundry.toml; then
echo "✓ bytecode_hash = \"none\""
else
echo "::error::foundry.toml must set bytecode_hash = \"none\" for deterministic bytecode"
ERRORS=1
fi

# Check cbor_metadata = false
if grep -q 'cbor_metadata\s*=\s*false' foundry.toml; then
echo "✓ cbor_metadata = false"
else
echo "::error::foundry.toml must set cbor_metadata = false for deterministic bytecode"
ERRORS=1
fi

if [[ $ERRORS -eq 1 ]]; then
echo ""
echo "Required foundry.toml settings for CI/CD:"
echo " [profile.default]"
echo " bytecode_hash = \"none\""
echo " cbor_metadata = false"
exit 1
fi

echo "Compiler config validated successfully"

- name: Check formatting
if: inputs.check-formatting
run: forge fmt --check

- name: Build contracts
run: forge build

- name: Run tests
run: forge test -${{ inputs.test-verbosity }}
Loading