-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install dependencies with Node.js instead of git modules (#734)
* build: install deps only with Node.js build: remove .gitmodules build: remove lib dir build: include test/utils in files published docs: specify recommended installation method on README chore: update remappings accordingly ci: install deps with pnpm install and remove "recursive" * feat: remove re-exported types * style: add line * ci: install pnpm and Node.js on each job * chore: update Slither config * test: update Precompiles bytecode * build: include remappings.txt file in the package * ci: cache the node modules and re use them * docs: improve README * build: remove unnecessary remmapings file from package * ci: rename cached key ci: restore the node modules in coverage job * ci: consistent caching keys chore: fix formatting in CI files chore: improve wording in CI files ci: remove redundant "pnpm install" steps * build: set peer dep version to "4.0.x" --------- Co-authored-by: Paul Razvan Berg <[email protected]>
- Loading branch information
1 parent
02c8774
commit a1e36f7
Showing
36 changed files
with
507 additions
and
247 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
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 |
---|---|---|
|
@@ -53,8 +53,6 @@ jobs: | |
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
@@ -78,16 +76,17 @@ jobs: | |
|
||
- name: "Generate and prepare the contract artifacts" | ||
run: "./shell/prepare-artifacts.sh" | ||
|
||
- name: "Build the test contracts" | ||
run: "FOUNDRY_PROFILE=test-optimized forge build" | ||
|
||
- name: "Cache the build so that it can be re-used by the other jobs" | ||
- name: "Cache the build and the node modules so that they can be re-used by the other jobs" | ||
uses: "actions/cache/save@v3" | ||
with: | ||
key: "foundry-build-${{ github.sha }}" | ||
key: "build-and-modules-${{ github.sha }}" | ||
path: | | ||
cache | ||
node_modules | ||
out | ||
out-optimized | ||
|
@@ -109,19 +108,29 @@ jobs: | |
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Restore the cached build" | ||
- name: "Install Pnpm" | ||
uses: "pnpm/action-setup@v2" | ||
with: | ||
version: "8" | ||
|
||
- name: "Install Node.js" | ||
uses: "actions/setup-node@v3" | ||
with: | ||
cache: "pnpm" | ||
node-version: "lts/*" | ||
|
||
- name: "Restore the cached build and the node modules" | ||
uses: "actions/cache/restore@v3" | ||
with: | ||
fail-on-cache-miss: true | ||
key: "foundry-build-${{ github.sha }}" | ||
key: "build-and-modules-${{ github.sha }}" | ||
path: | | ||
cache | ||
node_modules | ||
out | ||
out-optimized | ||
|
@@ -141,19 +150,18 @@ jobs: | |
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Restore the cached build" | ||
- name: "Restore the cached build and the node modules" | ||
uses: "actions/cache/restore@v3" | ||
with: | ||
fail-on-cache-miss: true | ||
key: "foundry-build-${{ github.sha }}" | ||
key: "build-and-modules-${{ github.sha }}" | ||
path: | | ||
cache | ||
node_modules | ||
out | ||
out-optimized | ||
|
@@ -171,19 +179,18 @@ jobs: | |
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Restore the cached build" | ||
- name: "Restore the cached build and the node modules" | ||
uses: "actions/cache/restore@v3" | ||
with: | ||
fail-on-cache-miss: true | ||
key: "foundry-build-${{ github.sha }}" | ||
key: "build-and-modules-${{ github.sha }}" | ||
path: | | ||
cache | ||
node_modules | ||
out | ||
out-optimized | ||
|
@@ -201,19 +208,18 @@ jobs: | |
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Restore the cached build" | ||
- name: "Restore the cached build and the node modules" | ||
uses: "actions/cache/restore@v3" | ||
with: | ||
fail-on-cache-miss: true | ||
key: "foundry-build-${{ github.sha }}" | ||
key: "build-and-modules-${{ github.sha }}" | ||
path: | | ||
cache | ||
node_modules | ||
out | ||
out-optimized | ||
|
@@ -233,19 +239,18 @@ jobs: | |
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Restore the cached build" | ||
- name: "Restore the cached build and the node modules" | ||
uses: "actions/cache/restore@v3" | ||
with: | ||
fail-on-cache-miss: true | ||
key: "foundry-build-${{ github.sha }}" | ||
key: "build-and-modules-${{ github.sha }}" | ||
path: | | ||
cache | ||
node_modules | ||
out | ||
out-optimized | ||
|
@@ -267,12 +272,21 @@ jobs: | |
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Restore the cached build and the node modules" | ||
uses: "actions/cache/restore@v3" | ||
with: | ||
fail-on-cache-miss: true | ||
key: "build-and-modules-${{ github.sha }}" | ||
path: | | ||
cache | ||
node_modules | ||
out | ||
out-optimized | ||
- name: "Generate the coverage report using the unit and the integration tests" | ||
run: "forge coverage --match-path \"test/{unit,integration}/**/*.sol\" --report lcov" | ||
|
||
|
@@ -296,8 +310,20 @@ jobs: | |
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install Pnpm" | ||
uses: "pnpm/action-setup@v2" | ||
with: | ||
submodules: "recursive" | ||
version: "8" | ||
|
||
- name: "Install Node.js" | ||
uses: "actions/setup-node@v3" | ||
with: | ||
cache: "pnpm" | ||
node-version: "lts/*" | ||
|
||
- name: "Install the Node.js dependencies" | ||
run: "pnpm install" | ||
|
||
- name: "Run Slither analysis" | ||
uses: "crytic/[email protected]" | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.