Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
lwshang committed Dec 4, 2024
2 parents a061429 + b3090c3 commit 605abca
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
jobs:
build:
name: cargo build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13-large]
os: [ubuntu-24.04, macos-13-large]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

fmt:
name: cargo fmt
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -94,7 +94,7 @@ jobs:
clippy:
name: cargo clippy
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -117,7 +117,7 @@ jobs:
doc:
name: cargo doc
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -142,7 +142,7 @@ jobs:
name: ci:required
if: ${{ always() }}
needs: [build, test, fmt, clippy, doc]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: check build result
if: ${{ needs.build.result != 'success' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
jobs:
check:
name: conventional-pr-title:required
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
# Conventional commit patterns:
# verb: description
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ sha2.workspace = true

[dev-dependencies]
hex.workspace = true
pocket-ic = { git = "https://github.com/dfinity/ic", tag = "release-2024-09-26_01-31-base" }
pocket-ic = { git = "https://github.com/dfinity/ic", tag = "release-2024-11-28_03-15-base" }
2 changes: 1 addition & 1 deletion e2e-tests/src/bin/call_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use ic_cdk::prelude::*;
async fn create_canister_via_struct() -> Principal {
let res: (CanisterIdRecord,) = Call::new(Principal::management_canister(), "create_canister")
.with_args((CreateCanisterArgument::default(),))
.with_cycles(200_000_000_000)
.with_cycles(1_000_000_000_000)
.with_guaranteed_response()
.call()
.await
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/src/bin/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use ic_cdk::update;
async fn call_create_canister() -> Principal {
let arg = CreateCanisterArgument::default();

create_canister(arg, 200_000_000_000u128)
create_canister(arg, 1_000_000_000_000u128)
.await
.unwrap()
.0
Expand Down
8 changes: 8 additions & 0 deletions e2e-tests/src/bin/management_caller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use ic_cdk::prelude::*;
/// - chunk.rs
mod main {
use super::*;
use candid::Principal;
use ic_cdk::api::management_canister::main::*;
#[update]
async fn execute_main_methods() {
Expand Down Expand Up @@ -73,6 +74,13 @@ mod main {
let response = raw_rand().await.unwrap().0;
assert_eq!(response.len(), 32);
}

#[update]
async fn execute_subnet_info(subnet_id: Principal) {
let arg = SubnetInfoArgs { subnet_id };
let response = subnet_info(arg).await.unwrap().0;
assert!(!response.replica_version.is_empty());
}
}

mod provisional {
Expand Down
5 changes: 5 additions & 0 deletions ic-cdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

### Added

- Support management canister method: `subnet_info`. (#532)
- Add types: `SubnetInfoArgs` and `SubnetInfoResult`.

### Fixed

- Fix update/query macro could not handle function arguments with the same name as the function itself. (#525)
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_pocket_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cd "$SCRIPTS_DIR/../e2e-tests"
uname_sys=$(uname -s | tr '[:upper:]' '[:lower:]')
echo "uname_sys: $uname_sys"

tag="release-2024-09-26_01-31-base"
tag="release-2024-11-28_03-15-base"

curl -sL "https://github.com/dfinity/ic/releases/download/$tag/pocket-ic-x86_64-$uname_sys.gz" --output pocket-ic.gz
gzip -df pocket-ic.gz
Expand Down

0 comments on commit 605abca

Please sign in to comment.