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: Use the latest nearcore version #909

Merged
merged 1 commit into from
Jul 4, 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
8 changes: 5 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
name: E2E tests
jobs:
test:
runs-on: self-hosted
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -30,8 +30,10 @@ jobs:

name: ${{ matrix.job-name }}
steps:
- name: Install LFS
run: apt-get install git-lfs
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"

- name: Clone the repository
uses: actions/checkout@v3
Expand Down
36 changes: 18 additions & 18 deletions utils/scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@ esac
if test -z "$LOCAL_CORE_SRC"
then
echo "near-core home not specified..."
# if [ "$MACHINE" == "Linux" ]; then
# if [[ -z "$NEAR_CHAIN_ID" ]]; then
# NEAR_CHAIN_ID=testnet
# fi
# NEAR_RELEASE=$(curl https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/$NEAR_CHAIN_ID/latest_release)
# NEAR_DEPLOY=$(curl https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/$NEAR_CHAIN_ID/latest_deploy)
# NEAR_CORE_BINARY_URL="https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore/Linux/$NEAR_RELEASE/$NEAR_DEPLOY/neard"
# NEAR_CORE_BINARY_DIR="$CORE_SRC/target/debug"
# NEAR_CORE_BINARY_PATH="$NEAR_CORE_BINARY_DIR/neard"
# mkdir -p $NEAR_CORE_BINARY_DIR
# status=$(curl $NEAR_CORE_BINARY_URL --output $NEAR_CORE_BINARY_PATH --write-out "%{http_code}")
# if [ "$status" != "200" ]; then
# echo "Download neard failed"
# exit 1
# fi
# chmod +x $NEAR_CORE_BINARY_PATH
# else
if [ "$MACHINE" == "Linux" ]; then
if [[ -z "$NEAR_CHAIN_ID" ]]; then
NEAR_CHAIN_ID=testnet
fi
NEAR_RELEASE=$(curl https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/$NEAR_CHAIN_ID/latest_release)
NEAR_DEPLOY=$(curl https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/$NEAR_CHAIN_ID/latest_deploy)
NEAR_CORE_BINARY_URL="https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore/Linux/$NEAR_RELEASE/$NEAR_DEPLOY/neard"
NEAR_CORE_BINARY_DIR="$CORE_SRC/target/debug"
NEAR_CORE_BINARY_PATH="$NEAR_CORE_BINARY_DIR/neard"
mkdir -p $NEAR_CORE_BINARY_DIR
status=$(curl $NEAR_CORE_BINARY_URL --output $NEAR_CORE_BINARY_PATH --write-out "%{http_code}")
if [ "$status" != "200" ]; then
echo "Download neard failed"
exit 1
fi
chmod +x $NEAR_CORE_BINARY_PATH
else
git clone --depth 1 --branch "1.31.0" "https://github.com/nearprotocol/nearcore" $CORE_SRC
cd $CORE_SRC
cargo build --package neard --bin neard
# fi
fi
else
echo "Linking the specified local repo from ${LOCAL_CORE_SRC} to ${CORE_SRC}"
ln -s $LOCAL_CORE_SRC $CORE_SRC
Expand Down