diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 6112c761..d9a95903 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,13 +11,14 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.16.1 + DFX_VERSION: 0.18.0-beta.3 IC_REPL_VERSION: 0.6.2 - MOC_VERSION: 0.10.4 + MOC_VERSION: 0.11.0 IC_WASM_VERSION: 0.7.0 - RUSTC_VERSION: 1.75.0 + RUSTC_VERSION: 1.76.0 + MOC_ARTIFACT: 1313046367 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 @@ -26,7 +27,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/ @@ -37,14 +38,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" @@ -53,20 +54,24 @@ 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 npm i -g ic-mops dfx cache install - cd $(dfx cache show) - wget https://github.com/dfinity/motoko/releases/download/$MOC_VERSION/motoko-Darwin-x86_64-$MOC_VERSION.tar.gz - tar zxvf motoko-Darwin-x86_64-$MOC_VERSION.tar.gz + wget https://nightly.link/dfinity/motoko/actions/artifacts/$MOC_ARTIFACT.zip + unzip $MOC_ARTIFACT.zip + chmod a+x bin/moc + cp -rf bin/moc $(dfx cache show) wget https://github.com/dfinity/ic-wasm/releases/download/$IC_WASM_VERSION/ic-wasm-macos cp ./ic-wasm-macos /usr/local/bin/ic-wasm chmod a+x /usr/local/bin/ic-wasm @@ -173,7 +178,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: | diff --git a/Cargo.lock b/Cargo.lock index f9b88e00..589c6788 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "arrayvec" @@ -98,9 +98,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "candid" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "182543fbc03b4ad0bfc384e6b68346e0b0aad0b11d075b71b4fcaa5d07f8862c" +checksum = "7fcd70c7bed52cb20e38dd933c19c0c9abf0302b60db3fa3186e27ec53edf6ad" dependencies = [ "anyhow", "binread", @@ -121,24 +121,21 @@ dependencies = [ [[package]] name = "candid_derive" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970c220da8aa2fa6f7ef5dbbf3ea5b620a59eb3ac107cfb95ae8c6eebdfb7a08" +checksum = "3de398570c386726e7a59d9887b68763c481477f9a043fb998a2e09d428df1a9" dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" [[package]] name = "certified_map" @@ -275,7 +272,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -329,9 +326,9 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "hashmap" @@ -379,9 +376,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "ic-cdk" -version = "0.12.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3d204af0b11c45715169c997858edb58fa8407d08f4fae78a6b415dd39a362" +checksum = "c63a6fceb94127bda86bd6d05f859a0e2a67d128a8ffb5ddab17e1f15ac8f555" dependencies = [ "candid", "ic-cdk-macros", @@ -392,9 +389,9 @@ dependencies = [ [[package]] name = "ic-cdk-macros" -version = "0.8.4" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a618e4020cea88e933d8d2f8c7f86d570ec06213506a80d4f2c520a9bba512" +checksum = "2fde5ca6ef1e69825c68916ff1bf7256b8f7ed69ac5ea3f1756f6e57f1503e27" dependencies = [ "candid", "proc-macro2", @@ -406,9 +403,9 @@ dependencies = [ [[package]] name = "ic-cdk-timers" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c43b9706fef3ad10c4192a14801d16bd9539068239f0f06f257857441364329" +checksum = "054727a3a1c486528b96349817d54290ff70df6addf417def456ea708a16f7fb" dependencies = [ "futures", "ic-cdk", @@ -623,9 +620,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -651,13 +648,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -755,9 +752,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -781,7 +778,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ee3660a6..8fb93292 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/Makefile b/Makefile index 6e335a94..ff73eb21 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -APPS = dapps collections crypto pub-sub heartbeat motoko +#APPS = dapps collections crypto pub-sub heartbeat motoko +APPS = crypto all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true diff --git a/crypto/motoko/dfx.json b/crypto/motoko/dfx.json index 923b11b6..f0cc76e9 100644 --- a/crypto/motoko/dfx.json +++ b/crypto/motoko/dfx.json @@ -12,7 +12,7 @@ "defaults": { "build": { "packtool": "mops sources", - "args": "" + "args": "--experimental-rtti" } } } diff --git a/dapps/rust/dip721-nft/src/lib.rs b/dapps/rust/dip721-nft/src/lib.rs index c8934048..736c1d30 100644 --- a/dapps/rust/dip721-nft/src/lib.rs +++ b/dapps/rust/dip721-nft/src/lib.rs @@ -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 @@ -211,7 +211,7 @@ struct ExtendedMetadataResult<'a> { fn get_metadata_for_user(/* user: Principal */) /* -> Vec */ { 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 diff --git a/heartbeat/motoko/timer.mo b/heartbeat/motoko/timer.mo index e7da55a2..67c3dfda 100644 --- a/heartbeat/motoko/timer.mo +++ b/heartbeat/motoko/timer.mo @@ -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(#seconds sec, func () : async () {}); }; public func cancelTimer(id : Nat) : async () { Timer.cancelTimer(id);