forked from midnightntwrk/midnight-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.envrc
More file actions
47 lines (41 loc) · 2.01 KB
/
.envrc
File metadata and controls
47 lines (41 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# point out to users at commit time that commits need to be signed,
# not once they've done many commits and are trying to push a PR:
git config --local commit.gpgSign true
git config --local tag.gpgSign true
## exports that are required to get it running
export MOCK_REGISTRATIONS_FILE="${MOCK_REGISTRATIONS_FILE:=./res/mock-bridge-data/default-registrations.json}"
export ADDRESSES_JSON="${ADDRESSES_JSON:=./res/qanet/addresses.json}"
export CHAIN_SPEC="${CHAIN_SPEC:=local}"
export EARTHLY_CONFIG=$PWD/.earthly/config.yml
## for making sure the npm test works
export COMPACTC_VERSION=$(cat COMPACTC_VERSION)
## macOS LLVM setup for WASM compilation
## We need this because the default XCode installation of LLVM does not support WASM build targets.
if [[ "$(uname)" == "Darwin" ]]; then
if [[ -d "/opt/homebrew/opt/llvm" ]]; then
# Apple Silicon Homebrew path
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
elif [[ -d "/usr/local/opt/llvm" ]]; then
# Intel Mac Homebrew path
export PATH="/usr/local/opt/llvm/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
else
printf "WARNING: Homebrew LLVM not found. WASM builds will fail!\n"
printf "Install with: brew install llvm\n\n"
fi
fi
if [[ -f "$PWD/.envrc.local" ]]; then
echo direnv: using .envrc.local
source "$PWD/.envrc.local"
fi
if [[ ! -d util/toolkit-js/dist ]] || [[ ! -d util/toolkit-js/test/contract/managed/counter ]]; then
BRED='\033[1;31m' # Bold Red
RED='\033[0;31m' # Red
GREEN='\033[0;32m' # Green
NC='\033[0m' # No Color
printf "${BRED}WARNING:${RED} toolkit-js artifacts are missing${NC}, ${GREEN}cargo test${NC} ${RED}will fail!${NC} To generate them, run:\n$ ${GREEN}earthly --secret GITHUB_TOKEN=<github-token-here> +toolkit-js-prep-local${NC} # Tip: Add it to your .envrc.local\n\n"
fi
export MIDNIGHT_LEDGER_TEST_STATIC_DIR=$PWD/static/contracts