FOUNDRY INSTALLATION FIX: Resolve PATH and installation problems
Issues Fixed:
❌ forge: command not found after foundryup installation
❌ PATH not properly set in CI environment
❌ Shell environment not sourced correctly
Solution Applied:
✅ Enhanced foundryup installation with fallback method
✅ Explicit PATH setup in all Foundry steps
✅ Shell environment sourcing (.bashrc/.zshrc)
✅ Alternative direct installation method
✅ PATH persistence across all workflow steps
Changes Made:
1. Installation Step:
- Added shell sourcing after foundryup
- Added PATH to ~/.bashrc for persistence
- Added fallback direct installation method
- Enhanced verification logic
2. All Foundry Steps:
- Added explicit PATH export
- Added shell sourcing
- Ensured forge/cast availability
3. Error Handling:
- Better error messages
- Fallback installation methods
- Graceful failure handling
Impact:
- Foundry tools now install correctly in CI
- All smart contract tests can run properly
- Gas optimization and security analysis work
- Contract compilation and testing functional
This resolves the critical issue where Foundry tools
were not available after installation in the CI environment.