Skip to content

Commit

Permalink
Try local build workflow with fixed foundry & pnpm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGuilding committed Jun 3, 2024
1 parent 3f09c8f commit 5acd5a9
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 4 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/forge-build.yml
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
build:
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-build.yaml@main"
uses: "./.github/workflows/forge-build.yml"

test:
needs: ["build"]
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ abstract contract OwnableValidatorBase is IntegrationBase {
// console2.log("recoveryModule: ", recoveryModule);

string memory subject =
"Recover account 0x19F55F3fE4c8915F21cc92852CD8E924998fDa38 to new owner 0x7240b687730BE024bcfD084621f794C2e4F8408f using recovery module 0xE98A1D4388fb2354016e56bFDb8dA7c55cDdae98";
"Recover account 0x19F55F3fE4c8915F21cc92852CD8E924998fDa38 to new owner 0x7240b687730BE024bcfD084621f794C2e4F8408f using recovery module 0xbF6064f750F31Dc9c9E7347E0C2236Be80B014B4";
address router = zkEmailRecovery.getRouterForAccount(accountAddress);
bytes32 nullifier = keccak256(abi.encode("nullifier 2"));
uint256 templateIdx = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/UnitBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ abstract contract UnitBase is RhinestoneModuleKit, Test {

address router = zkEmailRecovery.getRouterForAccount(accountAddress);
string memory subject =
"Recover account 0x50Bc6f1F08ff752F7F5d687F35a0fA25Ab20EF52 to new owner 0x7240b687730BE024bcfD084621f794C2e4F8408f using recovery module 0x0957519DC28b1d289F4721244416C3F00033747c";
"Recover account 0x50Bc6f1F08ff752F7F5d687F35a0fA25Ab20EF52 to new owner 0x7240b687730BE024bcfD084621f794C2e4F8408f using recovery module 0x07859195125c40eE1f7dA0A9B88D2eF19b633947";
bytes32 nullifier = keccak256(abi.encode("nullifier 2"));
EmailProof memory emailProof = generateMockEmailProof(subject, nullifier, accountSalt);

Expand Down

0 comments on commit 5acd5a9

Please sign in to comment.