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

Add arm64 atomics fix script #1788

Merged
merged 2 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CONTRACTS = "contracts/**/*.sol"
DIFFLINT_PY_RE = "( M|A ) (beamer/|scripts/)"
DIFFLINT_SOL_RE = "( M|A ) contracts/.*sol"
IMAGE_NAME := beamer
ARCH := $(shell uname -m)

all: lint

Expand Down Expand Up @@ -82,3 +83,13 @@ clean:
rm -rf deployments/dist
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type d -name .mypy_cache -exec rm -rf {} +

install:
yarn install
poetry install
ifeq ($(ARCH),arm64)
$(eval ATOMICS := $(shell poetry export | grep -E 'atomics==' | awk '{print $$1}'))
$(eval VENV := $(shell poetry run poetry env info -p))
istankovic marked this conversation as resolved.
Show resolved Hide resolved
poetry run pip uninstall atomics -y
poetry run pip install $(ATOMICS) --platform=universal2 --no-deps --target $(VENV)/lib/python*/site-packages
istankovic marked this conversation as resolved.
Show resolved Hide resolved
endif
12 changes: 4 additions & 8 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Requirements
------------

- `Python <https://www.python.org>`_ 3.10
- `poetry <https://python-poetry.org>`_
- `poetry <https://python-poetry.org>`_ 1.4
- `ganache <https://trufflesuite.com/ganache>`_ 7
- `jq <https://stedolan.github.io/jq/>`_
- `coreutils <https://formulae.brew.sh/formula/coreutils>`_
Expand All @@ -27,13 +27,9 @@ If you already have a repository, make sure the submodules are up to date::
Testing
-------

First make sure that the node dependencies are installed::
First install node and python dependencies::

yarn install

Then, install python dependencies::

poetry install
make install

Then enter the virtual environment::

Expand All @@ -49,7 +45,7 @@ Build the relayers::

Start ganache::

ganache --wallet.totalAccounts 10 --chain.hardfork london --miner.blockGasLimit 12000000 \
npx ganache --wallet.totalAccounts 10 --chain.hardfork london --miner.blockGasLimit 12000000 \
--wallet.mnemonic brownie --server.port 8545 --chain.chainId 1337

Create a JSON keyfile corresponding to one of the accounts pre-funded by ganache::
Expand Down