Skip to content

Commit

Permalink
bump ic-cdk and moc (#111)
Browse files Browse the repository at this point in the history
* bump rust cdk

* fix

* fix

* bump moc

* try rtti for sha2

* revert back rtti

* bump ic-repl

* rerun CI
  • Loading branch information
chenyan-dfinity authored Mar 14, 2024
1 parent 5f0a6c8 commit dc27a26
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 47 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
strategy:
fail-fast: false
env:
DFX_VERSION: 0.16.1
IC_REPL_VERSION: 0.6.2
MOC_VERSION: 0.10.4
DFX_VERSION: 0.18.0
IC_REPL_VERSION: 0.7.0
MOC_VERSION: 0.11.0
IC_WASM_VERSION: 0.7.0
RUSTC_VERSION: 1.75.0
RUSTC_VERSION: 1.76.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Checkout out gh-pages report
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'build_base')
uses: actions/checkout@v3
Expand All @@ -26,7 +26,7 @@ jobs:
path: main/_out
- name: Checkout out base branch
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'build_base')
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: main/
Expand All @@ -37,14 +37,14 @@ jobs:
override: true
target: wasm32-unknown-unknown
- name: Cache cargo build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ env.RUSTC_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
if: github.event_name == 'pull_request'
with:
python-version: "3.10"
Expand All @@ -53,12 +53,15 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pandas markdown lxml html5lib bs4 tabulate scipy
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install ic-repl, mops, dfx, and moc
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: ${{ env.DFX_VERSION }}
- name: Install ic-repl, mops and moc
run: |
echo y | DFX_VERSION=$DFX_VERSION bash -ci "$(curl -fsSL https://smartcontracts.org/install.sh)"
wget https://github.com/chenyan2002/ic-repl/releases/download/$IC_REPL_VERSION/ic-repl-macos
cp ./ic-repl-macos /usr/local/bin/ic-repl
chmod a+x /usr/local/bin/ic-repl
Expand Down Expand Up @@ -173,7 +176,7 @@ jobs:
edit-mode: replace
- name: Save tables as artifact for forked PR
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reports
path: |
Expand Down
55 changes: 26 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ lto = true
opt-level = 2

[workspace.dependencies]
ic-cdk = "0.12.0"
ic-cdk-timers = "0.6.0"
candid = "0.10.0"
ic-cdk = "0.13.1"
ic-cdk-timers = "0.7"
candid = "0.10.4"
serde = "1"
ic-stable-structures = "0.6"
4 changes: 2 additions & 2 deletions dapps/rust/dip721-nft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ fn total_supply() -> u64 {
fn get_metadata(/* token_id: u64 */) /* -> Result<&'static MetadataDesc> */
{
ic_cdk::setup();
let token_id = call::arg_data::<(u64,)>().0;
let token_id = call::arg_data::<(u64,)>(call::ArgDecoderConfig::default()).0;
let res: Result<()> = STATE.with(|state| {
let state = state.borrow();
let metadata = &state
Expand All @@ -211,7 +211,7 @@ struct ExtendedMetadataResult<'a> {
fn get_metadata_for_user(/* user: Principal */) /* -> Vec<ExtendedMetadataResult> */
{
ic_cdk::setup();
let user = call::arg_data::<(Principal,)>().0;
let user = call::arg_data::<(Principal,)>(call::ArgDecoderConfig::default()).0;
STATE.with(|state| {
let state = state.borrow();
let metadata: Vec<_> = state
Expand Down
2 changes: 1 addition & 1 deletion heartbeat/motoko/timer.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Timer "mo:base/Timer";

actor {
public func setTimer(sec : Nat) : async Nat {
Timer.setTimer(#seconds sec, func () : async () {});
Timer.setTimer<system>(#seconds sec, func () : async () {});
};
public func cancelTimer(id : Nat) : async () {
Timer.cancelTimer(id);
Expand Down

0 comments on commit dc27a26

Please sign in to comment.