-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try local build workflow with fixed foundry & pnpm versions
- Loading branch information
1 parent
3f09c8f
commit 5acd5a9
Showing
5 changed files
with
71 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: "Build a Forge project" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cache-path: | ||
default: | | ||
cache | ||
node_modules | ||
out | ||
out-optimized | ||
required: false | ||
type: "string" | ||
|
||
save-cache: | ||
default: true | ||
required: false | ||
type: boolean | ||
|
||
store-artifacts: | ||
default: true | ||
required: false | ||
type: boolean | ||
|
||
jobs: | ||
forge-build: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
with: | ||
version: nightly-ea2eff95b5c17edd3ffbdfc6daab5ce5cc80afc0 | ||
|
||
- name: "Install NodeJS" | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
version: 9.1.2 | ||
run_install: false | ||
|
||
- name: "Install the Node.js dependencies" | ||
run: "pnpm install" | ||
|
||
- name: "Show the Forge config" | ||
run: "forge config" | ||
|
||
- name: "Build the production contracts" | ||
run: "forge build" | ||
|
||
- name: "Cache the contracts and the node modules so that they can be re-used by the other jobs" | ||
if: ${{ inputs.save-cache }} | ||
uses: "actions/cache/save@v4" | ||
with: | ||
key: "build-and-modules-${{ github.sha }}" | ||
path: ${{ inputs.cache-path }} | ||
|
||
- name: "Add summary" | ||
run: | | ||
echo "## Build result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"solidity.compileUsingRemoteVersion": "v0.8.23+commit.f704f362" | ||
"solidity.compileUsingRemoteVersion": "v0.8.25+commit.b61c2a91" | ||
} |
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