Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: bump node up to 18 in scheduled script #975

Merged
merged 25 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
17 changes: 16 additions & 1 deletion .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ jobs:
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v4
- run: cargo make build-contracts
- name: Update Node and Yarn
run: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 18 && nvm alias default 18
npm install -g yarn
echo "$(dirname $(nvm which node))" >> $GITHUB_PATH
- name: Build contracts
run: cargo make build-contracts
- name: Run Contract cargo clippy
run: cargo make clippy
udeps:
Expand All @@ -51,6 +59,13 @@ jobs:
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v4
- name: Update Node and Yarn
run: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 18 && nvm alias default 18
npm install -g yarn
echo "$(dirname $(nvm which node))" >> $GITHUB_PATH
- name: Run yarn lint
run: cargo make check-contracts
- name: Check committed EvmErc20.bin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scheduled_lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- name: Setup Node and cache
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'yarn'
node-version: 18
aleksuss marked this conversation as resolved.
Show resolved Hide resolved
cache: yarn
cache-dependency-path: |
etc/eth-contracts
etc/tests/uniswap
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
cache: yarn
cache-dependency-path: |
etc/eth-contracts
etc/tests/uniswap
Expand Down
5 changes: 3 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ args = [

[tasks.udeps]
category = "Check"
env = { "CARGO_MAKE_RUST_CHANNEL" = "nightly", "CARGO_MAKE_CRATE_INSTALLATION_LOCKED" = "true" }
install_crate = { crate_name = "cargo-udeps", binary = "cargo", min_version = "0.1.41", test_arg = ["udeps", "-h"], force = true }
env = { "CARGO_MAKE_CRATE_INSTALLATION_LOCKED" = "true" }
toolchain = "nightly"
install_crate = { crate_name = "cargo-udeps", binary = "cargo", min_version = "0.1.52", test_arg = ["udeps", "-h"], force = true }
command = "${CARGO}"
args = [
"udeps",
Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/tests/promise_results_precompile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fn test_promise_result_gas_cost() {

assert!(
utils::within_x_percent(
5,
10,
aleksuss marked this conversation as resolved.
Show resolved Hide resolved
base_cost.as_u64(),
costs::PROMISE_RESULT_BASE_COST.as_u64(),
),
Expand Down
7 changes: 6 additions & 1 deletion engine-tests/src/utils/one_inch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ pub static LIMIT_ORDER_PROTOCOL_PATH: LazyLock<PathBuf> =

fn download_and_compile_solidity_sources(repo_name: &str) -> PathBuf {
let sources_dir = Path::new(env!("CARGO_MANIFEST_DIR"))
.parent()
.unwrap()
.join("target")
.join(repo_name);
// Contracts not already present, so download and compile them (but only once, even
Expand All @@ -33,7 +35,10 @@ fn download_and_compile_solidity_sources(repo_name: &str) -> PathBuf {
// install packages
let output = Command::new("/usr/bin/env")
.current_dir(&sources_dir)
.args(["yarn", "install"])
// The `--cache-folder` argument should be provided because there could be a case when
// two instances of yarn are running in parallel, and they are trying to install
// the same dependencies.
.args(["yarn", "install", "--cache-folder", repo_name])
.output()
.unwrap();
assert!(
Expand Down
2 changes: 1 addition & 1 deletion etc/eth-contracts/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const privateKey = process.env.PRIVATE_KEY || '';
module.exports = {
newStorageLayoutPath: './storageLayout',
solidity: {
version: '0.8.15',
version: '0.8.15', // london hardfork
settings: {
optimizer: {
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion etc/eth-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"eth-gas-reporter": "^0.2.25",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.6.9",
"hardhat": "^2.12.7",
"hardhat": "^2.12.15",
"hardhat-storage-layout": "^0.1.6",
"rainbow-bridge-lib": "^3.0.0",
"solc": "0.8.15",
Expand Down
Loading
Loading