Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from dfinity:main #6

Open
wants to merge 234 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
319795e
feat: a library of types for communicating with the ICP ledger (#168)
roman-kashitsyn Dec 21, 2021
f431c8d
feat: mark suitable functions as const (#183)
hpeebles Jan 12, 2022
bb76b2b
feat: expose constants for the governance and cycles minting canister…
hpeebles Jan 12, 2022
4b969f5
chore: use rust 1.55.0 in CI (#185)
lwshang Jan 13, 2022
e55f6a5
chore: release ic-certified-map v0.3.0 (#186)
lwshang Jan 13, 2022
6c0aa52
refactor: deprecate block_on in favour of the new spawn function (#189)
roman-kashitsyn Jan 24, 2022
4064156
chore: Remove default features (#190)
dsarlis Jan 26, 2022
8ff016f
fix: update broken links in Cargo.toml (#191)
roman-kashitsyn Jan 27, 2022
da46094
feat: Add ic-certified-assets crate for serving certified assets from…
jplevyak Feb 3, 2022
f287539
Prepare Cargo.toml for publish (#193)
lwshang Feb 3, 2022
c627f3b
Update ic-certified-assets README. (#194)
jplevyak Feb 3, 2022
76da97d
Bump up ic-ledger-types version (#195)
lwshang Feb 4, 2022
b7c952e
fix: Actually print version with --version (#196)
nmattia Feb 7, 2022
f3923ac
Release optimizer v0.3.4 (#198)
lwshang Feb 7, 2022
5360899
Add rust-toolchain.toml and point to 1.55.0 (#200)
lwshang Feb 8, 2022
1991c58
fix: Remove uniqueness check on export macros (#203)
adamspofford-dfinity Feb 14, 2022
a253119
Remove out-of-bounds vulnerability (#208)
adamspofford-dfinity Feb 16, 2022
30b6d84
Add Clone and Copy to RejectionCode (#202)
hpeebles Feb 17, 2022
b24a8b2
chore: Update clap to 3.1 (#209)
adamspofford-dfinity Feb 17, 2022
28eb8f7
chore(deps): bump url-parse from 1.5.3 to 1.5.7 in /examples/chess (#…
dependabot[bot] Feb 21, 2022
b8d0749
feat: Allow configuring export macros to not reply (#210)
adamspofford-dfinity Feb 22, 2022
01ad902
feat: Remove non-stable storage API (#215)
adamspofford-dfinity Feb 22, 2022
5a0206b
fix: do not call done() in stable_restore() (#216)
roman-kashitsyn Feb 24, 2022
9fa3005
Take slice rather than owned Vec as input arg (#217)
hpeebles Feb 25, 2022
dfb6889
chore: add CHANGELOG files (#220)
lwshang Mar 8, 2022
63a81d1
Update manifest metadata (#222)
adamspofford-dfinity Mar 11, 2022
0759a28
feat: Redirect the uncertified mainnet endpoint to the certified one …
adamspofford-dfinity Mar 15, 2022
3bbbd30
docs: guard attribute of all export macros (#225)
lwshang Mar 15, 2022
a443166
feat: Implement remaining 128-bit functions (#228)
adamspofford-dfinity Mar 17, 2022
ac3c965
feat: Add stdin param and auto-select output file (#230)
adamspofford-dfinity Mar 21, 2022
fbfe6eb
chore: Add PR template (#231)
lwshang Mar 22, 2022
4147564
docs: Add example of using init args (#234)
nmattia Mar 24, 2022
095be3b
feat: Add cleanup code in case of await trap (#232)
adamspofford-dfinity Mar 28, 2022
c0522af
fix: Run inter-canister calls without awaiting (#233)
adamspofford-dfinity Mar 29, 2022
fa0b136
chore: release cdk 0.5.0 (#236)
lwshang Mar 29, 2022
8853016
chore: Update Rust to 1.58.1 (#237)
adamspofford-dfinity Mar 30, 2022
085b1c6
docs: Add warning to `stable_write` explaining scenario in which it p…
hpeebles Apr 6, 2022
05536a9
chore: Update dfx to 0.9.3 in CI (#242)
lwshang Apr 6, 2022
8a2843f
feat: Add `grow_then_write_stable_bytes` helper method (#240)
hpeebles Apr 6, 2022
50739f0
Revert "feat: Add `grow_then_write_stable_bytes` helper method (#240)…
hpeebles Apr 7, 2022
20c4f8d
feat: Add a TryFrom instance for AccountIdentifier that checks CRC-32…
ninegua Apr 7, 2022
43044af
feat: Add `BufferedStableWriter` which aims to minimise system calls …
hpeebles Apr 12, 2022
cfcf720
feat: Add `BufferedStableReader` for efficient reading from stable me…
hpeebles Apr 19, 2022
20dc31d
chore(SDK-417): e2e tests for Rust CDK (#246)
roman-kashitsyn Apr 20, 2022
4ff7235
chore(SDK-417): add an e2d test for async cleanup (#250)
roman-kashitsyn Apr 26, 2022
976c4b8
chore: add asset canister did interface check (#251)
roman-kashitsyn May 4, 2022
30d0b24
refactor: move pure assets certification code into a module (#252)
roman-kashitsyn May 9, 2022
8e41a19
feat: support ETags in certified assets (#254)
roman-kashitsyn May 10, 2022
c80ebd9
feat: add support for max_age field (#255)
roman-kashitsyn May 10, 2022
936d61e
chore: release ic-certified-assets 0.2.0 (#257)
roman-kashitsyn May 11, 2022
7b289bc
fix: make StableState public again (#258)
roman-kashitsyn May 11, 2022
d823c7c
fix: certified assets: parse and produce ETag headers with quotes (#259)
roman-kashitsyn May 12, 2022
334f2aa
chore: ic-certified-assets v0.2.2 (#260)
lwshang May 12, 2022
c4aa446
feat: adds serialization-agnostic API for reading arguments and reply…
chmllr May 12, 2022
8d52f0f
feat: support for one-way notifications (#261)
roman-kashitsyn May 16, 2022
d056a9c
Prepare for release 0.5.1 (#262)
lwshang May 16, 2022
760e298
fix: use explicitly type u8 in vector initialization (#264)
lwshang May 19, 2022
a0246df
Create CODEOWNERS (#266)
lwshang May 19, 2022
bff7a59
fix: CODEOWNERS needs a pattern (#271)
lwshang May 24, 2022
1396c77
fix: switch to correct DFX environment variable (#270)
adamspofford-dfinity May 25, 2022
468cc63
feat: public function: arg_data_raw_size (#263)
levifeldman May 26, 2022
a080645
do not append on empty buffer (#268)
chmllr May 26, 2022
ec218cf
feat: interface to query ledger blocks (#269)
roman-kashitsyn May 31, 2022
ebcd6f0
feat: integrate with the ledger's `token_symbol` method (#267)
hpeebles May 31, 2022
3c18d24
chore: relase ic-ledger-types v0.1.2 (#272)
lwshang May 31, 2022
dcf6c94
chore: aggregate matrix checks for required statuses (#274)
ericswanson-dfinity May 31, 2022
7e42edb
Future-proof against multithreading (#273)
adamspofford-dfinity May 31, 2022
67fd25c
feat: support performance_counter (#277)
lwshang Jun 22, 2022
6f646b0
chore: release cdk v0.5.2 (#279)
lwshang Jun 23, 2022
a253ef4
Update CODEOWNERS (#280)
Jun 29, 2022
51df528
feat: make CanisterStableMemory public (#281)
lwshang Jun 30, 2022
58d2763
feat: support for setting custom HTTP headers on asset creation (#282)
Jul 6, 2022
39688bd
refactor: move performance_counter to ic_cdk::api module (#283)
roman-kashitsyn Jul 9, 2022
230c734
fix: candid spec to support setting multiple custom HTTP headers on a…
smallstepman Jul 12, 2022
39cd49a
chore: Upgrade candid to v0.7.15 (#285)
lwshang Jul 15, 2022
c7b00d6
fix(doc): update comments for ManualReply (#286)
roman-kashitsyn Jul 18, 2022
00c7e73
chore: release icd-cdk v0.5.3 (#288)
lwshang Jul 19, 2022
9f0a14e
derive CandidType for RejectionCode (#291)
Jul 22, 2022
8a0bd0a
chore: release ic-cdk v0.5.4 (#292)
lwshang Jul 22, 2022
b7e3aba
feat: Derive Deserialize for RejectionCode (#293)
Jul 22, 2022
b1408f8
feat: Implement common traits for RejectionCode (#294)
Jul 26, 2022
f5a8fb5
Update call.rs (#296)
nmattia Aug 2, 2022
07a3b55
feat: ManualReply::reject API (#297)
roman-kashitsyn Aug 4, 2022
826493e
feat: methods and types for management canister (#295)
lwshang Aug 6, 2022
6f67a93
chore: improve CI (#299)
lwshang Aug 9, 2022
b61bd49
chore: remove patch for candid (#300)
lwshang Aug 9, 2022
637f69c
fix: do not trap in call() if decoder fails (#301)
roman-kashitsyn Aug 10, 2022
c22cbd4
chore: release cdk v0.5.6 (#302)
lwshang Aug 10, 2022
ff4e4ee
chore: fix badges (#303)
lwshang Aug 10, 2022
fcecc76
fix(ic-certified-assets): disable etags and redirects (#305)
smallstepman Aug 22, 2022
c87bb33
chore: release `ic-certified-assets` `0.2.5` (#306)
Aug 22, 2022
84a9065
fix: tutorial links in readme (#307)
rvanasa Aug 29, 2022
32434e5
chore: prefix decode_etag_seq with _ (#308)
lwshang Aug 29, 2022
1cf6f29
chore: remove ic-certified-assets and leave a notice (#309)
lwshang Aug 30, 2022
7900be5
chore: deprecate optimizer (#313)
lwshang Sep 16, 2022
fea8796
chore: update outdated sha2 dependency of ic-certified-map (#314)
Sep 16, 2022
49c3ce1
chore(ci): cancel previous CI run after new push (#315)
lwshang Sep 19, 2022
4efff8e
refactor: move crates into library/ or legacy/ (#316)
lwshang Sep 22, 2022
fd396ab
fix: Update http_request transform type. (#312)
qj-yu Sep 27, 2022
9ee66f2
chore: release ic-cdk v0.5.7 (#318)
lwshang Sep 27, 2022
c7aaadd
feat: upgrade candid to 0.8.0 (#321)
lwshang Oct 3, 2022
2515432
feat: specify cycles when create canister (#322)
lwshang Oct 14, 2022
30fa7f2
refactor: make system API a separate crate (#324)
lwshang Oct 24, 2022
936a7b5
fix: no build script for ic0 (#327)
lwshang Oct 26, 2022
bfc7c50
feat: expose offsets in reader and writer (#330)
ncpenke Oct 28, 2022
4610c4f
chore: release ic-ledger-types v0.2.0 (#332)
lwshang Nov 4, 2022
14267d8
chore: BREAKING CHANGE: Update for HTTPS Outcalls transform function …
qj-yu Nov 4, 2022
a8e7733
feat: generalize stable storage API by adding 64-bit support for std:…
ncpenke Nov 9, 2022
14666cd
fix: ic0 can build on non-wasm (#338)
lwshang Nov 10, 2022
c6bab2f
refactor: make `RbTree` more `const` (#337)
Daniel-Bloom-dfinity Nov 10, 2022
f7ed2ae
chore: Have a nicer error message on trap while decoding arguments (#…
Nov 16, 2022
bf65dd5
feat: reverse dependency order (#343)
adamspofford-dfinity Nov 19, 2022
b8b0ff2
chore: Add safety comments (#248)
adamspofford-dfinity Nov 23, 2022
3eea10b
feat: Implement canister timers API (#342)
adamspofford-dfinity Nov 28, 2022
2b13607
feat: Implement composite queries (#344)
adamspofford-dfinity Nov 28, 2022
fafb181
refactor: change from pleco to tanton (#345)
chase-manning Nov 28, 2022
5df52cc
chore(deps): bump decode-uri-component in /examples/chess (#347)
dependabot[bot] Dec 7, 2022
bf05469
chore(deps): bump qs and express in /examples/chess (#349)
dependabot[bot] Dec 7, 2022
5b622a8
chore(deps): bump json5 from 1.0.1 to 1.0.2 in /examples/chess (#358)
dependabot[bot] Jan 9, 2023
ae67718
Add documentation for time() (#359)
nmattia Jan 11, 2023
37e9ad2
RUN-515: Allow timers to cancel themselves (#360)
dfinity-berestovskyy Jan 18, 2023
719625f
chore: release ic-cdk v0.6.9 and ic0 v0.18.9 (#362)
lwshang Jan 19, 2023
16dc6fe
feat: impl From<Principal> for Subaccount (#361)
hpeebles Jan 19, 2023
13278ef
feat: add ic0.canister_version to cdk-rs (#350)
mraszyk Jan 20, 2023
70ecd34
chore: release ic-cdk v0.6.10 and ic-ledger-types v0.2.1 (#363)
lwshang Jan 20, 2023
0ee7a3c
chore: update the toolchain and `ic-state-machine-tests` (#365)
dfinity-berestovskyy Jan 31, 2023
5879194
fix: RUN-527: retry timers execution (#366)
dfinity-berestovskyy Feb 1, 2023
c1aba15
refactor(timers): move timers into a separate library (#368)
roman-kashitsyn Feb 3, 2023
f7a0d98
bump version and changelog (#369)
lwshang Feb 3, 2023
43c1dac
chore: release continue (#370)
lwshang Feb 3, 2023
75e84bc
feat: add ICRC-2 transaction types (#364)
roman-kashitsyn Feb 6, 2023
fb32fa0
chore(ic-ledger-types): release version 0.4.0 (#371)
roman-kashitsyn Feb 13, 2023
b730f82
chore: fix documents and release affected crates (#372)
lwshang Feb 22, 2023
68fb05b
fix: Refactor executor (#357)
adamspofford-dfinity Feb 27, 2023
65efdbc
chore: use state machine client in e2e tests (#375)
lwshang Feb 27, 2023
893f9ea
fix: Only call `ic0.global_timer_set` if there isn't a more recent ti…
adamspofford-dfinity Feb 27, 2023
bfd976a
chore: Update lint settings and add missing documentation (#376)
adamspofford-dfinity Feb 28, 2023
01d987a
chore: update timers readme and links (#377)
dfinity-berestovskyy Mar 1, 2023
9856ff6
fix: incorrect types in error messages (#355)
hpeebles Mar 1, 2023
6a15aa1
bump version and changelog (#378)
lwshang Mar 1, 2023
2e877f5
fix: call futures implement Send + Sync (#379)
adamspofford-dfinity Mar 1, 2023
573d040
feat: WASM_PAGE_SIZE_IN_BYTES made pub (#380)
vporton Mar 9, 2023
a350e42
feat: http_request_with_cycles (#381)
lwshang Mar 21, 2023
b590d63
ic-cdk v0.7.4 (#382)
lwshang Mar 21, 2023
f4d48dc
docs: fix link to documentation site of the IC (#384)
peterpeterparker Apr 3, 2023
24bdf5e
feat: add ic0.is_controller to ic0 and cdk-rs (#383)
sesi200 Apr 4, 2023
f69356d
chore: Improve doc comments for max_response_bytes (#387)
dsarlis Apr 24, 2023
1b7cf27
feat: Implement closure-based http transform API (#385)
adamspofford-dfinity May 3, 2023
307a83b
Fail CI for explicitly enabled warnings (#395)
adamspofford-dfinity May 8, 2023
259ece4
fix: lazy CallFuture (#391)
mraszyk May 12, 2023
d6eec23
Revert 286faae (#397)
adamspofford-dfinity May 12, 2023
cefe7a1
chore: release ic-cdk v0.8.0 (#398)
lwshang May 26, 2023
a8454cb
fix: Fix docs.rs build (#400)
adamspofford-dfinity May 30, 2023
0478ba2
feat: set sender_canister_version and support canister_info (#401)
mraszyk Jun 9, 2023
bfa2b38
fix: no hard-coded fees for management canister calls (#404)
lwshang Jun 20, 2023
7140125
bump ver (#405)
lwshang Jun 21, 2023
46cc4ea
feat: Bitcoin API handles cycles cost under the hood. (#406)
lwshang Jun 21, 2023
155c2df
feat: Hardcodes the fee for `sign_with_ecdsa`. (#407)
ielashi Jun 22, 2023
c96af21
Check panic after await freeing resources (#408)
adamspofford-dfinity Jun 22, 2023
d06afe8
feat: Add some conversion methods to AccountIdentifier in ic-ledger-t…
witter-deland Jul 4, 2023
838ad9e
chore: Update example http_request_required_cycles (#409)
AlexandraZapuc Jul 5, 2023
83f4598
feat: upgrade candid to v0.9 (#411)
lwshang Jul 13, 2023
bfa8bf6
chore: Rust v1.65.0 and cargo workspace (#415)
lwshang Jul 13, 2023
185f49f
update README and CHANGELOG (#416)
lwshang Jul 13, 2023
779306c
fix: only update/query macros can take guard function (#418)
lwshang Jul 27, 2023
e29d873
chore: update Rust toolchain (#420)
sesi200 Aug 4, 2023
0f674bd
Revert MSRV (#421)
lwshang Aug 4, 2023
e64b923
fix: export composite query correctly (#419)
chenyan-dfinity Aug 23, 2023
b264573
feat: introduce candid-extractor for candid export (#424)
lwshang Sep 18, 2023
a2623bc
chore: CI for release candid-extractor (#427)
lwshang Sep 19, 2023
0ef0353
chore: unify Rust toolchain version (#429)
lwshang Sep 21, 2023
847d689
fix: Remove global state from `ic-cdk-macros` (#430)
adamspofford-dfinity Oct 2, 2023
9d1b929
Release [email protected], [email protected] (#433)
adamspofford-dfinity Oct 11, 2023
2f8b47b
feat: cycles_burn (#434)
lwshang Oct 11, 2023
cf6611b
Release [email protected] (#437)
adamspofford-dfinity Oct 12, 2023
cda6077
feat: RUN-798: Add call context perf counter (#435)
dfinity-berestovskyy Oct 12, 2023
6bc4b33
test: refactor management_canister tests (#438)
lwshang Oct 26, 2023
a14d272
chore(ci): use `dfinity/setup-dfx` GitHub Action to install `dfx` (#439)
Oct 30, 2023
38be74d
fix (#440)
lwshang Nov 1, 2023
0b201e9
test: remove vendored actions (#441)
lwshang Nov 1, 2023
56e9899
test: fix print example (#443)
lwshang Nov 7, 2023
0b14fac
Adding icrc1_memo to the Transaction (#445)
maciejdfinity Nov 9, 2023
917a02e
feat: Added query stats to canister status endpoint (#432)
Dfinity-skaestle Nov 20, 2023
710a6cd
chore: Upgrade candid to v0.10 (#448)
Nov 23, 2023
5440fec
feat: Add `reserved_cycles` and `reserved_cycles_limit` (#449)
ulan Dec 7, 2023
fbacb22
feat: "hidden" attribute to exclude exporting method in export_candid…
chenyan-dfinity Dec 13, 2023
c01fc17
fix: query stats: make members public (#453)
Dfinity-skaestle Jan 11, 2024
1da310b
feat: Serde Serialize and Deserialize traits for the RbTree in the ic…
levifeldman Jan 12, 2024
edcbe3a
docs: more informative README and call* methods (#454)
lwshang Jan 12, 2024
c4daa31
feat: `is_recovering_from_trap` (#456)
adamspofford-dfinity Jan 18, 2024
67cd416
Raise MSRV to 1.70.0 (#457)
adamspofford-dfinity Jan 26, 2024
852f7b0
chore(deps): bump zerocopy from 0.7.26 to 0.7.32 (#458)
dependabot[bot] Jan 26, 2024
e630e83
fix(bindgen): look for standardized environment variables (#467)
lwshang Feb 27, 2024
f6c1820
chore(ci): examples run with latest dfx (#468)
lwshang Feb 28, 2024
bbd6339
feat!: config canister endpoint decoding quota (#465)
chenyan-dfinity Mar 1, 2024
406e8aa
chore: release ic-cdk v0.13.0 (#469)
lwshang Mar 1, 2024
ad36d90
chore: release ic-cdk v0.13.1 and ic-cdk-macros v0.9.0 (#470)
lwshang Mar 1, 2024
08cbe39
chore: release ic-cdk-timers v0.7.0 (#471)
lwshang Mar 1, 2024
ab458c4
chore: examples overhaul (#473)
lwshang Mar 14, 2024
a47fd6d
feat: provide safe wrapper of global_timer_set in ic-cdk (#475)
lwshang Mar 29, 2024
db3b0ef
chore(ci): remove temporary fix for bitcoin integration canister (#474)
lwshang Apr 2, 2024
2d3f76e
feat: add management canister methods for interacting with the chunk …
hpeebles Apr 8, 2024
a7650a2
chore: release ic-cdk v0.13.2 (#478)
lwshang Apr 8, 2024
681008a
feat: Re-generate bindings if canister id or candid path change (#479)
sesi200 Apr 10, 2024
dc582ae
refactor!: move Rust code generation logic from candid_parser. (#480)
lwshang Apr 12, 2024
2797f87
replace deprecated URLs (#481)
lwshang Apr 12, 2024
70ddb3a
feat: Add `wasm_memory_limit` to the management canister (#483)
ulan Apr 19, 2024
2abc860
chore: bump dependencies & improve doc tests (#484)
lwshang Apr 22, 2024
8620c0e
feat: candid-extractor supports --version (#485)
lwshang Apr 22, 2024
58faf92
feat: add API `in_replicated_execution()` (#489)
lwshang May 6, 2024
05ca571
chore: release 20240510 (#491)
lwshang May 10, 2024
223c282
chore: Release 0.14.0 (#494)
adamspofford-dfinity May 17, 2024
7fa27b0
test: use pocket-ic in e2e-tests (#495)
lwshang May 28, 2024
8857ee4
feat: support log_visibility canister setting (#497)
sesi200 Jun 27, 2024
1a1cb07
feat!: Stable Memory always use 64-bit addresses and `stable64_*` sys…
lwshang Jul 1, 2024
cdb98e4
chore: release 0.15.0 (#499)
lwshang Jul 1, 2024
5ae0552
fix: ld-compatible symbols (#500)
adamspofford-dfinity Jul 5, 2024
5979571
Use ld-compatible symbol in ic-cdk-timers (#503)
adamspofford-dfinity Jul 24, 2024
a8a7d4e
feat!: canister state snapshots (#504)
lwshang Aug 8, 2024
3a42917
chore: update deprecated actions (#507)
adamspofford-dfinity Aug 14, 2024
deb1e15
docs: clarify post_upgrade argument types (#508)
lwshang Aug 15, 2024
bd17d57
fix: Fix memory leak in CallFuture (#509)
adamspofford-dfinity Aug 16, 2024
3e54016
chore: release ic-cdk v0.16.0 (#513)
lwshang Aug 27, 2024
97c4e19
feat: add AllowedViewers variant to LogVisibility enum (#512)
maksymar Sep 6, 2024
19bfaf3
feat: Add Schnorr signing API (#518)
lwshang Sep 17, 2024
882fa28
feat(ic-ledger-types): Add AccountIdentifier.as_bytes() (#520)
bitdivine Sep 25, 2024
13d01ed
chore: update license file (#526)
sesi200 Oct 28, 2024
9a65c41
feat: Implement low wasm memory hook (#528)
adamspofford-dfinity Nov 4, 2024
4e628a8
fix: Update CanisterInstallMode signature (#527)
adamspofford-dfinity Nov 4, 2024
2ebd180
Release ic-cdk 0.17 (#529)
adamspofford-dfinity Nov 5, 2024
8f57d6d
chore: release ic-ledger-types v0.14 (#531)
adamspofford-dfinity Nov 8, 2024
b3090c3
feat: support subnet_info (#532)
lwshang Dec 4, 2024
f6b9749
Add bitcoin_get_block_headers (#537)
adamspofford-dfinity Dec 16, 2024
929fd0b
chore: release ic-cdk v0.17.1 (#541)
lwshang Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @dfinity/sdk
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

# Checklist:

- [ ] The title of this PR complies with [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
- [ ] I have edited the CHANGELOG accordingly.
- [ ] I have made corresponding changes to the documentation.
158 changes: 158 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: CI

on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 4 * * 0,3" # 4 a.m. UTC every Sun and Wed, keep actions-cache available

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: cargo build
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run builds
run: |
cargo build --workspace --exclude ic-cdk-e2e-tests --exclude candid-extractor --target wasm32-unknown-unknown
cargo build --workspace --exclude ic-cdk-e2e-tests --exclude candid-extractor --target wasm32-unknown-unknown --release
cargo build --example=work

test:
name: cargo test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-13-large]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-test-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-test-
${{ runner.os }}-
- name: Download pocket-ic
run: |
bash scripts/download_pocket_ic.sh
- name: Run tests
run:
| # https://github.com/rust-lang/cargo/issues/6669 we have to run ALL tests with two commands
cargo test --all-targets
cargo test --doc

fmt:
name: cargo fmt
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-fmt-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-fmt-
${{ runner.os }}-
- name: Check formatting
run: |
cargo fmt --all -- --check

clippy:
name: cargo clippy
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-clippy-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-clippy-
${{ runner.os }}-
- name: Run clippy
run: |
cargo clippy --tests --benches -- -D warnings

doc:
name: cargo doc
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-doc-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-doc-
${{ runner.os }}-
- name: Run doc
run: |
RUSTDOCFLAGS="-D warnings" cargo doc

aggregate:
name: ci:required
if: ${{ always() }}
needs: [build, test, fmt, clippy, doc]
runs-on: ubuntu-24.04
steps:
- name: check build result
if: ${{ needs.build.result != 'success' }}
run: exit 1
- name: check test result
if: ${{ needs.test.result != 'success' }}
run: exit 1
- name: check fmt result
if: ${{ needs.fmt.result != 'success' }}
run: exit 1
- name: check clippy result
if: ${{ needs.clippy.result != 'success' }}
run: exit 1
34 changes: 25 additions & 9 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Check PR title

on:
pull_request_target:
types:
Expand All @@ -7,15 +8,30 @@ on:
- edited
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
name: conventional-pr-title:required
runs-on: ubuntu-24.04
steps:
- uses: dfinity/[email protected]
with:
success-state: Title follows the specification.
failure-state: Title does not follow the specification.
context-name: conventional-pr-title
preset: conventional-changelog-angular@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Conventional commit patterns:
# verb: description
# verb!: description of breaking change
# verb(scope): Description of change to $scope
# verb(scope)!: Description of breaking change to $scope
# verb: feat, fix, ...
# scope: refers to the part of code being changed. E.g. " (accounts)" or " (accounts,canisters)"
# !: Indicates that the PR contains a breaking change.
- env:
TITLE: ${{ github.event.pull_request.title }}
run: |
echo "PR title: $TITLE"
if [[ "$TITLE" =~ ^(feat|fix|chore|build|ci|docs|style|refactor|perf|test)(\([-a-zA-Z0-9,]+\))?\!?\: ]]; then
echo pass
else
echo "PR title does not match conventions"
exit 1
fi
139 changes: 102 additions & 37 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,132 @@

name: Examples

on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 4 * * 0,3" # 4 a.m. UTC every Sun and Wed, keep actions-cache available

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
ic-wasm-version: 0.4.0

jobs:
build-candid-extractor:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-candid-extractor-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-candid-extractor-
${{ runner.os }}-

- name: Build candid-extractor
run: cargo build -p candid-extractor --release

- uses: actions/upload-artifact@v4
with:
name: candid-extractor
path: target/release/candid-extractor

test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-24.04
needs: build-candid-extractor
strategy:
fail-fast: false
matrix:
build: [ linux-stable ]
include:
- build: linux-stable
os: ubuntu-latest
rust: 1.52.1
dfx: 0.8.1
project-name:
[asset_storage, chess, counter, management_canister, print, profile]

steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "recursive"

- uses: actions/cache@v2
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
**/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
examples/${{ matrix.project-name }}/target/
key: ${{ runner.os }}-${{ matrix.project-name }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.project-name }}-
${{ runner.os }}-

- name: Install Rust
- name: Install ic-wasm
# might already in cache
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
wget https://github.com/dfinity/ic-wasm/releases/download/${{env.ic-wasm-version }}/ic-wasm-linux64
chmod 755 ic-wasm-linux64
mv ic-wasm-linux64 /usr/local/bin/ic-wasm

- name: Install DFX
- name: Download candid-extractor
uses: actions/download-artifact@v4
with:
name: candid-extractor

- name: Install candid-extractor
run: |
export DFX_VERSION=${{ matrix.dfx }}
echo Install DFX Version: $DFX_VERSION
yes | sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
chmod 755 candid-extractor
mv candid-extractor /usr/local/bin/candid-extractor

- name: Setup BATS
uses: mig4/[email protected]
with:
bats-version: 1.2.1
- name: Install DFX
uses: dfinity/setup-dfx@main

- name: Install bitcoin
if: ${{ matrix.project-name == 'management_canister' }}
run: |
CWD=$(pwd)
cd "$(mktemp -d)"
BITCOIN_CORE_VERSION=22.0
BITCOIN_CORE_FILENAME="bitcoin-$BITCOIN_CORE_VERSION-x86_64-linux-gnu.tar.gz"
BITCOIN_CORE_TARBALL_SHA="59ebd25dd82a51638b7a6bb914586201e67db67b919b2a1ff08925a7936d1b16"
wget -nv "https://bitcoin.org/bin/bitcoin-core-$BITCOIN_CORE_VERSION/$BITCOIN_CORE_FILENAME"
echo "$BITCOIN_CORE_TARBALL_SHA $BITCOIN_CORE_FILENAME" | shasum -c
tar xzf "$BITCOIN_CORE_FILENAME"
cd "bitcoin-$BITCOIN_CORE_VERSION/bin"
sudo install -m 0755 -o root -g root -t /usr/local/bin *
cd "$CWD"

- name: Run Tests
shell: bash
run: |
echo CWD: $(pwd)
export PATH=$PATH:$HOME/bin
bats -r examples
./examples/bats/bats-core/bin/bats -r examples/${{ matrix.project-name }}
env:
RUST_BACKTRACE: 1

- name: Purge for OSX
if: matrix.os == 'macos-latest'
- name: cargo fmt # no clippy because build.rs using ic-cdk-bindgen would fail
run: |
# There is a bug with BSD tar on macOS where the first 8MB of the file are
# sometimes all NUL bytes. See https://github.com/actions/cache/issues/403
# and https://github.com/rust-lang/cargo/issues/8603 for some more
# information. An alternative solution here is to install GNU tar, but
# flushing the disk cache seems to work, too.
sudo /usr/sbin/purge
pushd examples/${{ matrix.project-name }}
cargo fmt --check
popd

aggregate:
name: examples:required
if: ${{ always() }}
needs: test
runs-on: ubuntu-24.04
steps:
- name: Check step result directly
if: ${{ needs.test.result != 'success' }}
run: exit 1
Loading