Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 13 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: 'Setup mise'
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3
with:
# Disable cache to avoid issues with wasm32 target
# See https://github.com/jdx/mise-action/issues/215
cache: false

- name: 'Check code'
run: |
cargo fmt --all -- --check
cargo clippy --locked --verbose --tests --benches --workspace -- -D clippy::all
cargo clippy --locked --verbose --target wasm32-unknown-unknown -p cksol_minter -- -D clippy::all

- name: 'Install cargo-sort'
uses: taiki-e/install-action@97a5807a604e12de3a13b52d868ebecaeeea757c # v2.75.4
with:
tool: cargo-sort@2.0.1

- name: 'Check Cargo.toml'
run: cargo sort --workspace --check

Expand Down Expand Up @@ -72,8 +74,12 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: 'Install canbench'
run: cargo install canbench --version 0.4.1 --locked
- name: 'Setup mise'
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3
with:
# Disable cache to avoid issues with wasm32 target
# See https://github.com/jdx/mise-action/issues/215
cache: false

- name: 'Run benchmarks'
run: cd minter && canbench --less-verbose
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,22 @@ icp canister call -e prod cksol_minter withdrawal_status \

### Prerequisites

- [Rust](https://rustup.rs/) — the correct toolchain version is pinned in `rust-toolchain.toml`.
- [`ic-wasm`](https://github.com/dfinity/ic-wasm) version 0.3.5 — used for Wasm post-processing.
- `jq` — used by `./scripts/build` to generate Wasm metadata.
- `gzip` — used by `./scripts/build` to compress the output Wasm.

Install the Rust toolchain and `ic-wasm` by running:
Install [`mise`](https://mise.jdx.dev/) and then provision the pinned toolchain
(Rust 1.93.0 with the `wasm32-unknown-unknown` target, `cargo-sort`, `canbench`):

```sh
./scripts/bootstrap
mise install
```

Tool versions are defined in [`mise.toml`](./mise.toml) so local and CI
environments stay in sync.

Additionally:

- [`ic-wasm`](https://github.com/dfinity/ic-wasm) version 0.3.5 — used for Wasm post-processing. Install via `./scripts/bootstrap`.
- `jq` — used by `./scripts/build` to generate Wasm metadata.
- `gzip` — used by `./scripts/build` to compress the output Wasm.

### Building

Build the minter Wasm:
Expand Down
6 changes: 6 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tools]
"cargo:cargo-sort" = "2.0.1"
"cargo:canbench" = "0.4.1"

[settings]
idiomatic_version_file_enable_tools = ["rust"]
Loading