Skip to content

Commit

Permalink
chore: upgrade all dependencies (#294)
Browse files Browse the repository at this point in the history
Upgrade all dependencies. Notable changes:

- Upgrade of `ic-stable-structures`: Starting with version
[0.6.0](https://github.com/dfinity/stable-structures/releases/tag/v0.6.0),
the trait `BoundedStorable` was merged into `Storable`
- Migrated all integration tests to using [Pocket
IC](https://crates.io/crates/pocket-ic) to avoid having to depend on the
unreleased `ic-state-machine-tests` crate from the IC repository, which
would require additional dependencies to be built.
  • Loading branch information
gregorydemay authored Oct 3, 2024
1 parent a043a32 commit f968d1e
Show file tree
Hide file tree
Showing 15 changed files with 883 additions and 4,637 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: Checkout
uses: actions/checkout@master

- name: Provision Pocket IC
run: bash .github/workflows/provision-pocket-ic-server.sh

- uses: Swatinem/rust-cache@v2

- name: Install Protoc
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/provision-pocket-ic-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -ex

POCKET_IC_SERVER_VERSION=${POCKET_IC_SERVER_VERSION:=6.0.0}
POCKET_IC_SERVER_PATH=${POCKET_IC_SERVER_PATH:="${HOME}/bin/pocket-ic-server"}

if [[ $OSTYPE == "linux-gnu"* ]] || [[ $RUNNER_OS == "Linux" ]]
then
PLATFORM=linux
elif [[ $OSTYPE == "darwin"* ]] || [[ $RUNNER_OS == "macOS" ]]
then
PLATFORM=darwin
else
echo "OS not supported: ${OSTYPE:-$RUNNER_OS}"
exit 1
fi

if [ ! -f "$POCKET_IC_SERVER_PATH" ]; then
echo "Downloading PocketIC."
mkdir -p "$(dirname "${POCKET_IC_SERVER_PATH}")"
curl -sSL "https://github.com/dfinity/pocketic/releases/download/${POCKET_IC_SERVER_VERSION}/pocket-ic-x86_64-${PLATFORM}.gz" -o "${POCKET_IC_SERVER_PATH}".gz
gunzip "${POCKET_IC_SERVER_PATH}.gz"
chmod +x "${POCKET_IC_SERVER_PATH}"
else
echo "PocketIC server already exists, skipping download."
fi

# Set environment variables.
echo "POCKET_IC_BIN=${POCKET_IC_SERVER_PATH}" >> "$GITHUB_ENV"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ target/
*.generated.did
*.wasm
*.wasm.gz
pocket-ic
Loading

0 comments on commit f968d1e

Please sign in to comment.