Skip to content

Commit

Permalink
Use dex binary (serum-community#29)
Browse files Browse the repository at this point in the history
* Download dex binary

* Remove dex build from workflow
  • Loading branch information
michaelhly authored Sep 14, 2020
1 parent 43cfe1b commit 2b9698c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
- name: Install libudev-dev
run: sudo apt-get install libudev-dev

- name: Build dex
run: ./serum-dex/do.sh build dex

- name: Install test dependencies
run: pipenv install --skip-lock pytest

Expand Down
16 changes: 13 additions & 3 deletions scripts/run_int_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,27 @@

set -e

os_type=""

if [[ $OSTYPE == "linux-gnu"* ]]; then
os_type="linux"
elif [[ $OSTYPE == "darwin"* ]]; then
os_type="darwin"
else
echo $OSTYPE is not supported
exit 1
fi

if [ ! -d "serum-dex" ]; then
git clone https://github.com/serum-community/serum-dex.git
fi

cd serum-dex
docker-compose up -d
solana config set --url "http://localhost:8899"
./do.sh build dex
sleep 1.5
curl -s -L "https://github.com/serum-community/serum-dex/releases/download/refs%2Fheads%2Fmaster/serum_dex-$os_type.so" > serum_dex.so
solana airdrop 10000
DEX_PROGRAM_ID="$(solana deploy --use-deprecated-loader dex/target/bpfel-unknown-unknown/release/serum_dex.so | jq .programId -r)"
DEX_PROGRAM_ID="$(solana deploy --use-deprecated-loader serum_dex.so | jq .programId -r)"
echo DEX_PROGRAM_ID: $DEX_PROGRAM_ID
cd crank
cargo run -- l pyserum-setup ~/.config/solana/id.json $DEX_PROGRAM_ID
Expand Down

0 comments on commit 2b9698c

Please sign in to comment.